From: Gerd Hoffmann <kraxel@redhat.com>
To: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org,
wlm.libvirt@googlemail.com
Subject: Re: [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del
Date: Mon, 21 Sep 2009 09:53:56 +0200 [thread overview]
Message-ID: <4AB73114.4050508@redhat.com> (raw)
In-Reply-To: <1253287594-12905-4-git-send-email-wolfgang.mauerer@siemens.com>
Hi,
> + dinfo = drive_get(type, bus, unit);
> + if (!dinfo) {
> + monitor_printf(mon, "Trying to remove non-existent device\n");
> + return;
> + }
No. Just don't do this silly if/bus/unit parsing. At very minimum use
drive_get_by_id() here, then have something like 'drive_del $id'.
IMHO much better would be to go qdev instead though. We should have
generic device_add + device_del monitor commands which work for any
device, pretty much like the -device command line switch.
cheers,
Gerd
next prev parent reply other threads:[~2009-09-21 7:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 15:26 [Qemu-devel] [PATCH 0/4] SCSI-hotdel: Implement removal of SCSI hard disks Wolfgang Mauerer
2009-09-18 15:26 ` [Qemu-devel] [PATCH 1/4] SCSI-hotdel: Add detach method to LSI SCSI driver Wolfgang Mauerer
2009-09-18 15:26 ` [Qemu-devel] [PATCH 2/4] SCSI-hotdel: Factor out IF argument parsing Wolfgang Mauerer
2009-09-18 15:26 ` [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del Wolfgang Mauerer
2009-09-18 15:26 ` [Qemu-devel] [PATCH 4/4] Small cleanup for drive_hot_add Wolfgang Mauerer
2009-09-21 7:53 ` Gerd Hoffmann [this message]
2009-09-30 15:45 ` [Qemu-devel] [PATCH 3/4] SCSI-Hotdel: Implement drive_hot_del Wolfgang Mauerer
2009-09-30 19:04 ` Gerd Hoffmann
2009-10-01 7:54 ` Wolfgang Mauerer
2009-10-01 8:50 ` Gerd Hoffmann
2009-09-21 7:46 ` [Qemu-devel] [PATCH 1/4] SCSI-hotdel: Add detach method to LSI SCSI driver Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AB73114.4050508@redhat.com \
--to=kraxel@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=wlm.libvirt@googlemail.com \
--cc=wolfgang.mauerer@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).