qemu_monitor.h 22.2 KB
Newer Older
1 2 3
/*
 * qemu_monitor.h: interaction with QEMU monitor console
 *
4
 * Copyright (C) 2006-2012 Red Hat, Inc.
5 6 7 8 9 10 11 12 13 14 15 16 17
 * Copyright (C) 2006 Daniel P. Berrange
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library.  If not, see
O
Osier Yang 已提交
19
 * <http://www.gnu.org/licenses/>.
20 21 22 23 24 25
 *
 * Author: Daniel P. Berrange <berrange@redhat.com>
 */


#ifndef QEMU_MONITOR_H
26
# define QEMU_MONITOR_H
27

28
# include "internal.h"
29

30
# include "qemu_capabilities.h"
31
# include "domain_conf.h"
32
# include "qemu_conf.h"
33
# include "bitmap.h"
34
# include "virhash.h"
35
# include "json.h"
36
# include "device_conf.h"
37

38 39
typedef struct _qemuMonitor qemuMonitor;
typedef qemuMonitor *qemuMonitorPtr;
40

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
typedef struct _qemuMonitorMessage qemuMonitorMessage;
typedef qemuMonitorMessage *qemuMonitorMessagePtr;

typedef int (*qemuMonitorPasswordHandler)(qemuMonitorPtr mon,
                                          qemuMonitorMessagePtr msg,
                                          const char *data,
                                          size_t len,
                                          void *opaque);

struct _qemuMonitorMessage {
    int txFD;

    char *txBuffer;
    int txOffset;
    int txLength;

57
    /* Used by the text monitor reply / error */
58 59
    char *rxBuffer;
    int rxLength;
60 61
    /* Used by the JSON monitor to hold reply / error */
    void *rxObject;
62

63 64 65 66
    /* True if rxBuffer / rxObject are ready, or a
     * fatal error occurred on the monitor channel
     */
    bool finished;
67 68 69 70 71

    qemuMonitorPasswordHandler passwordHandler;
    void *passwordOpaque;
};

72 73 74
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
typedef qemuMonitorCallbacks *qemuMonitorCallbacksPtr;
struct _qemuMonitorCallbacks {
75 76 77
    void (*destroy)(qemuMonitorPtr mon,
                    virDomainObjPtr vm);

78
    void (*eofNotify)(qemuMonitorPtr mon,
79 80 81 82
                      virDomainObjPtr vm);
    void (*errorNotify)(qemuMonitorPtr mon,
                        virDomainObjPtr vm);
    /* XXX we'd really like to avoid virConnectPtr here
83 84 85 86 87 88 89 90 91 92
     * It is required so the callback can find the active
     * secret driver. Need to change this to work like the
     * security drivers do, to avoid this
     */
    int (*diskSecretLookup)(qemuMonitorPtr mon,
                            virConnectPtr conn,
                            virDomainObjPtr vm,
                            const char *path,
                            char **secret,
                            size_t *secretLen);
93 94 95 96 97 98 99 100 101

    int (*domainShutdown)(qemuMonitorPtr mon,
                          virDomainObjPtr vm);
    int (*domainReset)(qemuMonitorPtr mon,
                       virDomainObjPtr vm);
    int (*domainPowerdown)(qemuMonitorPtr mon,
                           virDomainObjPtr vm);
    int (*domainStop)(qemuMonitorPtr mon,
                      virDomainObjPtr vm);
102 103 104
    int (*domainRTCChange)(qemuMonitorPtr mon,
                           virDomainObjPtr vm,
                           long long offset);
105 106 107
    int (*domainWatchdog)(qemuMonitorPtr mon,
                          virDomainObjPtr vm,
                          int action);
108 109 110
    int (*domainIOError)(qemuMonitorPtr mon,
                         virDomainObjPtr vm,
                         const char *diskAlias,
111 112
                         int action,
                         const char *reason);
113 114 115 116 117 118 119 120 121 122 123 124
    int (*domainGraphics)(qemuMonitorPtr mon,
                          virDomainObjPtr vm,
                          int phase,
                          int localFamily,
                          const char *localNode,
                          const char *localService,
                          int remoteFamily,
                          const char *remoteNode,
                          const char *remoteService,
                          const char *authScheme,
                          const char *x509dname,
                          const char *saslUsername);
125 126 127 128 129
    int (*domainBlockJob)(qemuMonitorPtr mon,
                          virDomainObjPtr vm,
                          const char *diskAlias,
                          int type,
                          int status);
130 131 132 133
    int (*domainTrayChange)(qemuMonitorPtr mon,
                            virDomainObjPtr vm,
                            const char *devAlias,
                            int reason);
O
Osier Yang 已提交
134 135
    int (*domainPMWakeup)(qemuMonitorPtr mon,
                          virDomainObjPtr vm);
O
Osier Yang 已提交
136 137
    int (*domainPMSuspend)(qemuMonitorPtr mon,
                           virDomainObjPtr vm);
138 139 140
    int (*domainBalloonChange)(qemuMonitorPtr mon,
                               virDomainObjPtr vm,
                               unsigned long long actual);
141 142
};

143
char *qemuMonitorEscapeArg(const char *in);
144
char *qemuMonitorUnescapeArg(const char *in);
145

146
qemuMonitorPtr qemuMonitorOpen(virDomainObjPtr vm,
147
                               virDomainChrSourceDefPtr config,
D
Daniel P. Berrange 已提交
148
                               int json,
149 150
                               qemuMonitorCallbacksPtr cb)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
151 152 153 154 155
qemuMonitorPtr qemuMonitorOpenFD(virDomainObjPtr vm,
                                 int sockfd,
                                 int json,
                                 qemuMonitorCallbacksPtr cb)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
156

157
void qemuMonitorClose(qemuMonitorPtr mon);
158

159
int qemuMonitorSetCapabilities(qemuMonitorPtr mon,
160
                               qemuCapsPtr caps);
161

162 163 164
void qemuMonitorLock(qemuMonitorPtr mon);
void qemuMonitorUnlock(qemuMonitorPtr mon);

165 166 167 168
int qemuMonitorSetLink(qemuMonitorPtr mon,
                       const char *name,
                       enum virDomainNetInterfaceLinkState state) ;

169
/* These APIs are for use by the internal Text/JSON monitor impl code only */
170
char *qemuMonitorNextCommandID(qemuMonitorPtr mon);
171 172
int qemuMonitorSend(qemuMonitorPtr mon,
                    qemuMonitorMessagePtr msg);
173 174 175 176 177 178
int qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
                                const char *cmd,
                                int scm_fd,
                                char **reply);
# define qemuMonitorHMPCommand(mon, cmd, reply) \
    qemuMonitorHMPCommandWithFd(mon, cmd, -1, reply)
179

180
/* XXX same comment about virConnectPtr as above */
181 182 183 184 185
int qemuMonitorGetDiskSecret(qemuMonitorPtr mon,
                             virConnectPtr conn,
                             const char *path,
                             char **secret,
                             size_t *secretLen);
186

187 188 189 190
int qemuMonitorEmitShutdown(qemuMonitorPtr mon);
int qemuMonitorEmitReset(qemuMonitorPtr mon);
int qemuMonitorEmitPowerdown(qemuMonitorPtr mon);
int qemuMonitorEmitStop(qemuMonitorPtr mon);
191
int qemuMonitorEmitRTCChange(qemuMonitorPtr mon, long long offset);
192
int qemuMonitorEmitWatchdog(qemuMonitorPtr mon, int action);
193 194
int qemuMonitorEmitIOError(qemuMonitorPtr mon,
                           const char *diskAlias,
195 196
                           int action,
                           const char *reason);
197 198 199 200 201 202 203 204 205 206 207
int qemuMonitorEmitGraphics(qemuMonitorPtr mon,
                            int phase,
                            int localFamily,
                            const char *localNode,
                            const char *localService,
                            int remoteFamily,
                            const char *remoteNode,
                            const char *remoteService,
                            const char *authScheme,
                            const char *x509dname,
                            const char *saslUsername);
208 209 210
int qemuMonitorEmitTrayChange(qemuMonitorPtr mon,
                              const char *devAlias,
                              int reason);
O
Osier Yang 已提交
211
int qemuMonitorEmitPMWakeup(qemuMonitorPtr mon);
O
Osier Yang 已提交
212
int qemuMonitorEmitPMSuspend(qemuMonitorPtr mon);
213 214 215 216
int qemuMonitorEmitBlockJob(qemuMonitorPtr mon,
                            const char *diskAlias,
                            int type,
                            int status);
217 218
int qemuMonitorEmitBalloonChange(qemuMonitorPtr mon,
                                 unsigned long long actual);
219

220 221 222
int qemuMonitorStartCPUs(qemuMonitorPtr mon,
                         virConnectPtr conn);
int qemuMonitorStopCPUs(qemuMonitorPtr mon);
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246

typedef enum {
    QEMU_MONITOR_VM_STATUS_DEBUG,
    QEMU_MONITOR_VM_STATUS_INMIGRATE,
    QEMU_MONITOR_VM_STATUS_INTERNAL_ERROR,
    QEMU_MONITOR_VM_STATUS_IO_ERROR,
    QEMU_MONITOR_VM_STATUS_PAUSED,
    QEMU_MONITOR_VM_STATUS_POSTMIGRATE,
    QEMU_MONITOR_VM_STATUS_PRELAUNCH,
    QEMU_MONITOR_VM_STATUS_FINISH_MIGRATE,
    QEMU_MONITOR_VM_STATUS_RESTORE_VM,
    QEMU_MONITOR_VM_STATUS_RUNNING,
    QEMU_MONITOR_VM_STATUS_SAVE_VM,
    QEMU_MONITOR_VM_STATUS_SHUTDOWN,
    QEMU_MONITOR_VM_STATUS_WATCHDOG,

    QEMU_MONITOR_VM_STATUS_LAST
} qemuMonitorVMStatus;
VIR_ENUM_DECL(qemuMonitorVMStatus)
int qemuMonitorVMStatusToPausedReason(const char *status);

int qemuMonitorGetStatus(qemuMonitorPtr mon,
                         bool *running,
                         virDomainPausedReason *reason);
247

248
int qemuMonitorSystemReset(qemuMonitorPtr mon);
249 250 251 252
int qemuMonitorSystemPowerdown(qemuMonitorPtr mon);

int qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
                          int **pids);
253 254
int qemuMonitorGetVirtType(qemuMonitorPtr mon,
                           int *virtType);
255
int qemuMonitorGetBalloonInfo(qemuMonitorPtr mon,
256
                              unsigned long long *currmem);
257 258 259
int qemuMonitorGetMemoryStats(qemuMonitorPtr mon,
                              virDomainMemoryStatPtr stats,
                              unsigned int nr_stats);
260

261
int qemuMonitorBlockIOStatusToError(const char *status);
262 263 264 265 266
virHashTablePtr qemuMonitorGetBlockInfo(qemuMonitorPtr mon);
struct qemuDomainDiskInfo *
qemuMonitorBlockInfoLookup(virHashTablePtr blockInfo,
                           const char *devname);

267
int qemuMonitorGetBlockStatsInfo(qemuMonitorPtr mon,
268
                                 const char *dev_name,
269 270
                                 long long *rd_req,
                                 long long *rd_bytes,
271
                                 long long *rd_total_times,
272 273
                                 long long *wr_req,
                                 long long *wr_bytes,
274 275 276
                                 long long *wr_total_times,
                                 long long *flush_req,
                                 long long *flush_total_times,
277
                                 long long *errs);
278 279
int qemuMonitorGetBlockStatsParamsNumber(qemuMonitorPtr mon,
                                         int *nparams);
280

281
int qemuMonitorGetBlockExtent(qemuMonitorPtr mon,
282
                              const char *dev_name,
283
                              unsigned long long *extent);
284 285 286
int qemuMonitorBlockResize(qemuMonitorPtr mon,
                           const char *devname,
                           unsigned long long size);
287 288
int qemuMonitorSetVNCPassword(qemuMonitorPtr mon,
                              const char *password);
289 290 291 292 293 294 295
int qemuMonitorSetPassword(qemuMonitorPtr mon,
                           int type,
                           const char *password,
                           const char *action_if_connected);
int qemuMonitorExpirePassword(qemuMonitorPtr mon,
                              int type,
                              const char *expire_time);
296 297
int qemuMonitorSetBalloon(qemuMonitorPtr mon,
                          unsigned long newmem);
298 299
int qemuMonitorSetCPU(qemuMonitorPtr mon, int cpu, int online);

300 301 302 303 304 305

/* XXX should we pass the virDomainDiskDefPtr instead
 * and hide devname details inside monitor. Reconsider
 * this when doing the QMP implementation
 */
int qemuMonitorEjectMedia(qemuMonitorPtr mon,
306
                          const char *dev_name,
307
                          bool force);
308
int qemuMonitorChangeMedia(qemuMonitorPtr mon,
309
                           const char *dev_name,
310 311
                           const char *newmedia,
                           const char *format);
312 313 314 315 316 317 318 319 320 321 322 323 324 325


int qemuMonitorSaveVirtualMemory(qemuMonitorPtr mon,
                                 unsigned long long offset,
                                 size_t length,
                                 const char *path);
int qemuMonitorSavePhysicalMemory(qemuMonitorPtr mon,
                                  unsigned long long offset,
                                  size_t length,
                                  const char *path);

int qemuMonitorSetMigrationSpeed(qemuMonitorPtr mon,
                                 unsigned long bandwidth);

326 327 328
int qemuMonitorSetMigrationDowntime(qemuMonitorPtr mon,
                                    unsigned long long downtime);

329 330 331 332 333 334 335 336 337 338
enum {
    QEMU_MONITOR_MIGRATION_STATUS_INACTIVE,
    QEMU_MONITOR_MIGRATION_STATUS_ACTIVE,
    QEMU_MONITOR_MIGRATION_STATUS_COMPLETED,
    QEMU_MONITOR_MIGRATION_STATUS_ERROR,
    QEMU_MONITOR_MIGRATION_STATUS_CANCELLED,

    QEMU_MONITOR_MIGRATION_STATUS_LAST
};

339 340
VIR_ENUM_DECL(qemuMonitorMigrationStatus)

341 342 343 344 345
int qemuMonitorGetMigrationStatus(qemuMonitorPtr mon,
                                  int *status,
                                  unsigned long long *transferred,
                                  unsigned long long *remaining,
                                  unsigned long long *total);
346 347
int qemuMonitorGetSpiceMigrationStatus(qemuMonitorPtr mon,
                                       bool *spice_migrated);
348

349
typedef enum {
E
Eric Blake 已提交
350
  QEMU_MONITOR_MIGRATE_BACKGROUND	= 1 << 0,
351 352 353 354 355
  QEMU_MONITOR_MIGRATE_NON_SHARED_DISK  = 1 << 1, /* migration with non-shared storage with full disk copy */
  QEMU_MONITOR_MIGRATE_NON_SHARED_INC   = 1 << 2, /* migration with non-shared storage with incremental copy */
  QEMU_MONITOR_MIGRATION_FLAGS_LAST
} QEMU_MONITOR_MIGRATE;

E
Eric Blake 已提交
356 357 358 359
int qemuMonitorMigrateToFd(qemuMonitorPtr mon,
                           unsigned int flags,
                           int fd);

360
int qemuMonitorMigrateToHost(qemuMonitorPtr mon,
361
                             unsigned int flags,
362 363 364 365
                             const char *hostname,
                             int port);

int qemuMonitorMigrateToCommand(qemuMonitorPtr mon,
366
                                unsigned int flags,
367 368
                                const char * const *argv);

369 370 371 372 373 374 375
/* In general, BS is the smallest fundamental block size we can use to
 * access a block device; everything must be aligned to a multiple of
 * this.  Linux generally supports a BS as small as 512, but with
 * newer disks with 4k sectors, performance is better if we guarantee
 * alignment to the sector size.  However, operating on BS-sized
 * blocks is painfully slow, so we also have a transfer size that is
 * larger but only aligned to the smaller block size.
376
 */
377 378
# define QEMU_MONITOR_MIGRATE_TO_FILE_BS (1024llu * 4)
# define QEMU_MONITOR_MIGRATE_TO_FILE_TRANSFER_SIZE (1024llu * 1024)
379 380

int qemuMonitorMigrateToFile(qemuMonitorPtr mon,
381
                             unsigned int flags,
382 383 384
                             const char * const *argv,
                             const char *target,
                             unsigned long long offset);
385 386

int qemuMonitorMigrateToUnix(qemuMonitorPtr mon,
387
                             unsigned int flags,
388 389 390 391
                             const char *unixfile);

int qemuMonitorMigrateCancel(qemuMonitorPtr mon);

392
int qemuMonitorDumpToFd(qemuMonitorPtr mon,
393
                        int fd);
394

395 396 397 398 399 400
int qemuMonitorGraphicsRelocate(qemuMonitorPtr mon,
                                int type,
                                const char *hostname,
                                int port,
                                int tlsPort,
                                const char *tlsSubject);
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416

/* XXX disk driver type eg,  qcow/etc.
 * XXX cache mode
 */
int qemuMonitorAddUSBDisk(qemuMonitorPtr mon,
                          const char *path);

int qemuMonitorAddUSBDeviceExact(qemuMonitorPtr mon,
                                 int bus,
                                 int dev);
int qemuMonitorAddUSBDeviceMatch(qemuMonitorPtr mon,
                                 int vendor,
                                 int product);


int qemuMonitorAddPCIHostDevice(qemuMonitorPtr mon,
417 418
                                virDevicePCIAddress *hostAddr,
                                virDevicePCIAddress *guestAddr);
419 420 421 422 423 424 425

/* XXX disk driver type eg,  qcow/etc.
 * XXX cache mode
 */
int qemuMonitorAddPCIDisk(qemuMonitorPtr mon,
                          const char *path,
                          const char *bus,
426
                          virDevicePCIAddress *guestAddr);
427 428 429 430 431 432

/* XXX do we really want to hardcode 'nicstr' as the
 * sendable item here
 */
int qemuMonitorAddPCINetwork(qemuMonitorPtr mon,
                             const char *nicstr,
433
                             virDevicePCIAddress *guestAddr);
434 435

int qemuMonitorRemovePCIDevice(qemuMonitorPtr mon,
436
                               virDevicePCIAddress *guestAddr);
437 438 439 440 441 442


int qemuMonitorSendFileHandle(qemuMonitorPtr mon,
                              const char *fdname,
                              int fd);

443 444 445
/* The function preserves previous error and only sets it's own error if no
 * error was set before.
 */
446 447 448 449 450 451 452 453
int qemuMonitorCloseFileHandle(qemuMonitorPtr mon,
                               const char *fdname);


/* XXX do we really want to hardcode 'netstr' as the
 * sendable item here
 */
int qemuMonitorAddHostNetwork(qemuMonitorPtr mon,
454 455 456
                              const char *netstr,
                              int tapfd, const char *tapfd_name,
                              int vhostfd, const char *vhostfd_name);
457 458 459 460 461

int qemuMonitorRemoveHostNetwork(qemuMonitorPtr mon,
                                 int vlan,
                                 const char *netname);

462
int qemuMonitorAddNetdev(qemuMonitorPtr mon,
463 464 465
                         const char *netdevstr,
                         int tapfd, const char *tapfd_name,
                         int vhostfd, const char *vhostfd_name);
466 467 468 469

int qemuMonitorRemoveNetdev(qemuMonitorPtr mon,
                            const char *alias);

470 471
int qemuMonitorGetPtyPaths(qemuMonitorPtr mon,
                           virHashTablePtr paths);
472

473 474
int qemuMonitorAttachPCIDiskController(qemuMonitorPtr mon,
                                       const char *bus,
475
                                       virDevicePCIAddress *guestAddr);
476

477 478
int qemuMonitorAttachDrive(qemuMonitorPtr mon,
                           const char *drivestr,
479
                           virDevicePCIAddress *controllerAddr,
480 481
                           virDomainDeviceDriveAddress *driveAddr);

482 483 484 485 486

typedef struct _qemuMonitorPCIAddress qemuMonitorPCIAddress;
struct _qemuMonitorPCIAddress {
    unsigned int vendor;
    unsigned int product;
487
    virDevicePCIAddress addr;
488 489 490 491 492
};

int qemuMonitorGetAllPCIAddresses(qemuMonitorPtr mon,
                                  qemuMonitorPCIAddress **addrs);

493 494 495
int qemuMonitorAddDevice(qemuMonitorPtr mon,
                         const char *devicestr);

496 497 498 499 500
int qemuMonitorAddDeviceWithFd(qemuMonitorPtr mon,
                               const char *devicestr,
                               int fd,
                               const char *fdname);

501
int qemuMonitorDelDevice(qemuMonitorPtr mon,
502
                         const char *devalias);
503

504 505 506
int qemuMonitorAddDrive(qemuMonitorPtr mon,
                        const char *drivestr);

507
int qemuMonitorDriveDel(qemuMonitorPtr mon,
508 509
                        const char *drivestr);

510 511 512 513
int qemuMonitorSetDrivePassphrase(qemuMonitorPtr mon,
                                  const char *alias,
                                  const char *passphrase);

C
Chris Lalancette 已提交
514 515 516 517
int qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name);

518
int qemuMonitorDiskSnapshot(qemuMonitorPtr mon,
519
                            virJSONValuePtr actions,
520
                            const char *device,
521 522 523
                            const char *file,
                            const char *format,
                            bool reuse);
524 525
int qemuMonitorTransaction(qemuMonitorPtr mon, virJSONValuePtr actions)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
526

527 528 529 530
int qemuMonitorArbitraryCommand(qemuMonitorPtr mon,
                                const char *cmd,
                                char **reply,
                                bool hmp);
531

532 533
int qemuMonitorInjectNMI(qemuMonitorPtr mon);

534 535 536
int qemuMonitorScreendump(qemuMonitorPtr mon,
                          const char *file);

537 538 539 540 541
int qemuMonitorSendKey(qemuMonitorPtr mon,
                       unsigned int holdtime,
                       unsigned int *keycodes,
                       unsigned int nkeycodes);

542
typedef enum {
543 544 545 546 547
    BLOCK_JOB_ABORT,
    BLOCK_JOB_INFO,
    BLOCK_JOB_SPEED,
    BLOCK_JOB_PULL,
} qemuMonitorBlockJobCmd;
548 549 550

int qemuMonitorBlockJob(qemuMonitorPtr mon,
                        const char *device,
551
                        const char *back,
552 553
                        unsigned long bandwidth,
                        virDomainBlockJobInfoPtr info,
554 555
                        qemuMonitorBlockJobCmd mode,
                        bool modern)
556
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
557

558 559 560 561 562 563
int qemuMonitorOpenGraphics(qemuMonitorPtr mon,
                            const char *protocol,
                            int fd,
                            const char *fdname,
                            bool skipauth);

564 565 566 567 568 569 570 571
int qemuMonitorSetBlockIoThrottle(qemuMonitorPtr mon,
                                  const char *device,
                                  virDomainBlockIoTuneInfoPtr info);

int qemuMonitorGetBlockIoThrottle(qemuMonitorPtr mon,
                                  const char *device,
                                  virDomainBlockIoTuneInfoPtr reply);

572 573
int qemuMonitorSystemWakeup(qemuMonitorPtr mon);

574 575 576 577 578 579 580 581 582 583 584 585 586
/**
 * When running two dd process and using <> redirection, we need a
 * shell that will not truncate files.  These two strings serve that
 * purpose.
 */
# ifdef VIR_WRAPPER_SHELL
#  define VIR_WRAPPER_SHELL_PREFIX VIR_WRAPPER_SHELL " -c '"
#  define VIR_WRAPPER_SHELL_SUFFIX "'"
# else
#  define VIR_WRAPPER_SHELL_PREFIX /* nothing */
#  define VIR_WRAPPER_SHELL_SUFFIX /* nothing */
# endif

587
#endif /* QEMU_MONITOR_H */