}
path_combine(backing_filename, sizeof(backing_filename),
filename, bs->backing_file);
- if (bdrv_open2(bs->backing_hd, backing_filename, 0, &bdrv_raw) < 0)
- if (bdrv_open(bs->backing_hd, backing_filename, open_flags) < 0)
++ if (bdrv_open2(bs->backing_hd, backing_filename, open_flags, &bdrv_raw) < 0)
goto fail;
}
#define SENSE_HARDWARE_ERROR 4
#define SENSE_ILLEGAL_REQUEST 5
+ #define STATUS_GOOD 0
+ #define STATUS_CHECK_CONDITION 2
+
+#ifdef CONFIG_STUBDOM
+#include <xen/io/blkif.h>
+#define SCSI_DMA_BUF_SIZE ((BLKIF_MAX_SEGMENTS_PER_REQUEST - 1) * PAGE_SIZE)
+#else
#define SCSI_DMA_BUF_SIZE 131072
+#endif
typedef struct SCSIRequest {
SCSIDeviceState *dev;
#include "qemu-char.h"
#include "block.h"
#include "audio/audio.h"
+#include "qemu-xen.h"
+ #include "migration.h"
#include <unistd.h>
+#include <stdlib.h>
#include <fcntl.h>
#include <signal.h>
#include <time.h>
}
}
- int parse_host_port(struct sockaddr_in *saddr, const char *str);
-#ifndef _WIN32
+#ifndef NO_UNIX_SOCKETS
static int parse_unix_path(struct sockaddr_un *uaddr, const char *str);
#endif
int parse_host_src_port(struct sockaddr_in *haddr,
const char *pid_file = NULL;
VLANState *vlan;
int autostart;
+ const char *incoming = NULL;
+ logfile = stderr; /* initial value */
+
+#if !defined(__sun__) && !defined(CONFIG_STUBDOM)
+ /* Maximise rlimits. Needed where default constraints are tight (*BSD). */
+ if (getrlimit(RLIMIT_STACK, &rl) != 0) {
+ perror("getrlimit(RLIMIT_STACK)");
+ exit(1);
+ }
+ rl.rlim_cur = rl.rlim_max;
+ if (setrlimit(RLIMIT_STACK, &rl) != 0)
+ perror("setrlimit(RLIMIT_STACK)");
+ if (getrlimit(RLIMIT_DATA, &rl) != 0) {
+ perror("getrlimit(RLIMIT_DATA)");
+ exit(1);
+ }
+ rl.rlim_cur = rl.rlim_max;
+ if (setrlimit(RLIMIT_DATA, &rl) != 0)
+ perror("setrlimit(RLIMIT_DATA)");
+ rl.rlim_cur = RLIM_INFINITY;
+ rl.rlim_max = RLIM_INFINITY;
+ if (setrlimit(RLIMIT_RSS, &rl) != 0)
+ perror("setrlimit(RLIMIT_RSS)");
+ rl.rlim_cur = RLIM_INFINITY;
+ rl.rlim_max = RLIM_INFINITY;
+ if (setrlimit(RLIMIT_MEMLOCK, &rl) != 0)
+ perror("setrlimit(RLIMIT_MEMLOCK)");
+ #endif
+
LIST_INIT (&vm_change_state_head);
#ifndef _WIN32
{