Use a more natural order
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7234 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
00ea18d19e
commit
fc1f79f71c
@ -189,7 +189,7 @@ static int con_init(struct XenDevice *xendev)
|
|||||||
free(dom);
|
free(dom);
|
||||||
|
|
||||||
type = xenstore_read_str(con->console, "type");
|
type = xenstore_read_str(con->console, "type");
|
||||||
if (!type || 0 != strcmp(type, "ioemu")) {
|
if (!type || strcmp(type, "ioemu" != 0)) {
|
||||||
xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
|
xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ static int ioreq_parse(struct ioreq *ioreq)
|
|||||||
switch (ioreq->req.operation) {
|
switch (ioreq->req.operation) {
|
||||||
case BLKIF_OP_READ:
|
case BLKIF_OP_READ:
|
||||||
ioreq->prot = PROT_WRITE; /* to memory */
|
ioreq->prot = PROT_WRITE; /* to memory */
|
||||||
if (BLKIF_OP_READ != ioreq->req.operation && blkdev->mode[0] != 'w') {
|
if (ioreq->req.operation != BLKIF_OP_READ && blkdev->mode[0] != 'w') {
|
||||||
xen_be_printf(&blkdev->xendev, 0, "error: write req for ro device\n");
|
xen_be_printf(&blkdev->xendev, 0, "error: write req for ro device\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@ -513,7 +513,7 @@ static void blk_handle_requests(struct XenBlkDev *blkdev)
|
|||||||
|
|
||||||
if (use_aio)
|
if (use_aio)
|
||||||
blk_send_response_all(blkdev);
|
blk_send_response_all(blkdev);
|
||||||
while ((rc != rp)) {
|
while (rc != rp) {
|
||||||
/* pull request from ring */
|
/* pull request from ring */
|
||||||
if (RING_REQUEST_CONS_OVERFLOW(&blkdev->rings.common, rc))
|
if (RING_REQUEST_CONS_OVERFLOW(&blkdev->rings.common, rc))
|
||||||
break;
|
break;
|
||||||
|
@ -137,7 +137,7 @@ static void xen_domain_poll(void *opaque)
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = xc_domain_getinfo(xen_xc, xen_domid, 1, &info);
|
rc = xc_domain_getinfo(xen_xc, xen_domid, 1, &info);
|
||||||
if ((1 != rc) || (info.domid != xen_domid)) {
|
if ((rc != 1) || (info.domid != xen_domid)) {
|
||||||
qemu_log("xen: domain %d is gone\n", xen_domid);
|
qemu_log("xen: domain %d is gone\n", xen_domid);
|
||||||
goto quit;
|
goto quit;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ static void xen_domain_watcher(void)
|
|||||||
rc = read(fd[0], &byte, 1);
|
rc = read(fd[0], &byte, 1);
|
||||||
switch (rc) {
|
switch (rc) {
|
||||||
case -1:
|
case -1:
|
||||||
if (EINTR == errno)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
qemu_log("%s: Huh? read error: %s\n", __FUNCTION__, strerror(errno));
|
qemu_log("%s: Huh? read error: %s\n", __FUNCTION__, strerror(errno));
|
||||||
qemu_running = 0;
|
qemu_running = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user