aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-16 12:27:47 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-16 12:27:47 +0100
commit84219c5a21399e8d4d0e373168f610f65684c318 (patch)
tree4e4d18daaf077177180a933ab763510aad63edc9 /hw
parent0bbac62618356794097b99a9b8b7634357170b03 (diff)
parent98d896d978eef0fd6ff8d93a1ccea34e00b97f8c (diff)
downloadqemu-84219c5a21399e8d4d0e373168f610f65684c318.zip
qemu-84219c5a21399e8d4d0e373168f610f65684c318.tar.gz
qemu-84219c5a21399e8d4d0e373168f610f65684c318.tar.bz2
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request # gpg: Signature made Mon 16 Jun 2014 12:22:22 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (39 commits) QemuOpts: cleanup tmp 'allocated' member from QemuOptsList cleanup QEMUOptionParameter vpc.c: replace QEMUOptionParameter with QemuOpts vmdk.c: replace QEMUOptionParameter with QemuOpts vhdx.c: replace QEMUOptionParameter with QemuOpts vdi.c: replace QEMUOptionParameter with QemuOpts ssh.c: replace QEMUOptionParameter with QemuOpts sheepdog.c: replace QEMUOptionParameter with QemuOpts rbd.c: replace QEMUOptionParameter with QemuOpts raw_bsd.c: replace QEMUOptionParameter with QemuOpts raw-win32.c: replace QEMUOptionParameter with QemuOpts raw-posix.c: replace QEMUOptionParameter with QemuOpts qed.c: replace QEMUOptionParameter with QemuOpts qcow2.c: replace QEMUOptionParameter with QemuOpts QemuOpts: export qemu_opt_find qcow.c: replace QEMUOptionParameter with QemuOpts nfs.c: replace QEMUOptionParameter with QemuOpts iscsi.c: replace QEMUOptionParameter with QemuOpts gluster.c: replace QEMUOptionParameter with QemuOpts cow.c: replace QEMUOptionParameter with QemuOpts ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/block/onenand.c4
-rw-r--r--hw/ide/piix.c2
-rw-r--r--hw/usb/dev-storage.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 60d5311..5388122 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -335,9 +335,7 @@ static inline int onenand_prog_spare(OneNANDState *s, int sec, int secn,
dp, 1) < 0;
}
}
- if (dp) {
- g_free(dp);
- }
+ g_free(dp);
}
return result;
}
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 40757eb..8651726 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -184,7 +184,7 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev)
}
bdrv_close(di->bdrv);
pci_ide->bus[di->bus].ifs[di->unit].bs = NULL;
- drive_put_ref(di);
+ drive_del(di);
}
}
qdev_reset_all(DEVICE(dev));
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index e919100..ae4efcb 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -691,7 +691,7 @@ static USBDevice *usb_msd_init(USBBus *bus, const char *filename)
qemu_opt_set(opts, "if", "none");
/* create host drive */
- dinfo = drive_init(opts, 0);
+ dinfo = drive_new(opts, 0);
if (!dinfo) {
qemu_opts_del(opts);
return NULL;