Patchwork [2/2] block: drive_init(): Improve CHS setting error message

login
register
mail settings
Submitter Luiz Capitulino
Date July 1, 2011, 1:46 p.m.
Message ID <1309527973-11127-3-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/102909/
State New
Headers show

Comments

Luiz Capitulino - July 1, 2011, 1:46 p.m.
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(-)

Patch

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;