All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements
@ 2011-07-01 13:46 Luiz Capitulino
  2011-07-01 13:46 ` [Qemu-devel] [PATCH 1/2] block: drive_init(): Simplify interface type setting Luiz Capitulino
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luiz Capitulino @ 2011-07-01 13:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru

Please, see individual patches for details.

v1 -> v2:
---------

o Drop indentation patch
o Use error message suggested by Markus

 blockdev.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 1/2] block: drive_init(): Simplify interface type setting
  2011-07-01 13:46 [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Luiz Capitulino
@ 2011-07-01 13:46 ` Luiz Capitulino
  2011-07-01 13:46 ` [Qemu-devel] [PATCH 2/2] block: drive_init(): Improve CHS setting error message Luiz Capitulino
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Luiz Capitulino @ 2011-07-01 13:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 blockdev.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 7d579d6..470be71 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -240,14 +240,6 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
     int ret;
 
     translation = BIOS_ATA_TRANSLATION_AUTO;
-
-    if (default_to_scsi) {
-        type = IF_SCSI;
-        pstrcpy(devname, sizeof(devname), "scsi");
-    } else {
-        type = IF_IDE;
-        pstrcpy(devname, sizeof(devname), "ide");
-    }
     media = MEDIA_DISK;
 
     /* extract parameters */
@@ -273,7 +265,11 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
             error_report("unsupported bus type '%s'", buf);
             return NULL;
 	}
+    } else {
+        type = default_to_scsi ? IF_SCSI : IF_IDE;
+        pstrcpy(devname, sizeof(devname), if_name[type]);
     }
+
     max_devs = if_max_devs[type];
 
     if (cyls || heads || secs) {
-- 
1.7.6.49.g033c2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/2] block: drive_init(): Improve CHS setting error message
  2011-07-01 13:46 [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Luiz Capitulino
  2011-07-01 13:46 ` [Qemu-devel] [PATCH 1/2] block: drive_init(): Simplify interface type setting Luiz Capitulino
@ 2011-07-01 13:46 ` Luiz Capitulino
  2011-07-04 11:41 ` [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Markus Armbruster
  2011-07-04 12:34 ` Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Luiz Capitulino @ 2011-07-01 13:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, armbru

The current message doesn't clearly communicate the error cause.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 blockdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 470be71..a97a801 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -310,7 +310,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
 	    media = MEDIA_DISK;
 	} else if (!strcmp(buf, "cdrom")) {
             if (cyls || secs || heads) {
-                error_report("'%s' invalid physical CHS format", buf);
+                error_report("CHS can't be set with media=%s", buf);
 	        return NULL;
             }
 	    media = MEDIA_CDROM;
-- 
1.7.6.49.g033c2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements
  2011-07-01 13:46 [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Luiz Capitulino
  2011-07-01 13:46 ` [Qemu-devel] [PATCH 1/2] block: drive_init(): Simplify interface type setting Luiz Capitulino
  2011-07-01 13:46 ` [Qemu-devel] [PATCH 2/2] block: drive_init(): Improve CHS setting error message Luiz Capitulino
@ 2011-07-04 11:41 ` Markus Armbruster
  2011-07-04 12:34 ` Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2011-07-04 11:41 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: kwolf, qemu-devel

Luiz Capitulino <lcapitulino@redhat.com> writes:

> Please, see individual patches for details.
>
> v1 -> v2:
> ---------
>
> o Drop indentation patch
> o Use error message suggested by Markus
>
>  blockdev.c |   14 +++++---------
>  1 files changed, 5 insertions(+), 9 deletions(-)

Reviewed-by: Markus Armbruster <armbru@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements
  2011-07-01 13:46 [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Luiz Capitulino
                   ` (2 preceding siblings ...)
  2011-07-04 11:41 ` [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Markus Armbruster
@ 2011-07-04 12:34 ` Kevin Wolf
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2011-07-04 12:34 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: qemu-devel, armbru

Am 01.07.2011 15:46, schrieb Luiz Capitulino:
> Please, see individual patches for details.
> 
> v1 -> v2:
> ---------
> 
> o Drop indentation patch
> o Use error message suggested by Markus
> 
>  blockdev.c |   14 +++++---------
>  1 files changed, 5 insertions(+), 9 deletions(-)

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-04 12:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 13:46 [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Luiz Capitulino
2011-07-01 13:46 ` [Qemu-devel] [PATCH 1/2] block: drive_init(): Simplify interface type setting Luiz Capitulino
2011-07-01 13:46 ` [Qemu-devel] [PATCH 2/2] block: drive_init(): Improve CHS setting error message Luiz Capitulino
2011-07-04 11:41 ` [Qemu-devel] [PATCH v2 0/2]: block: Small drive_init() improvements Markus Armbruster
2011-07-04 12:34 ` Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.