qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Trivial patches
@ 2014-03-16 21:10 Maria Kustova
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev Maria Kustova
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Maria Kustova @ 2014-03-16 21:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Maria Kustova, stefanha

These patches are the part of OPW application.
Two of them update help messages of qemu-io utility.
And last one replaces fprintf() with error_setg() in curl.c

Maria Kustova (3):
  qemu-io-cmds: Fixed typo in example for writev.
  block: Replaced old error handling with error reporting API.
  qemu-io: Extended "--cmd" description in usage text

 block/curl.c   | 2 +-
 qemu-io-cmds.c | 2 +-
 qemu-io.c      | 9 ++++++---
 3 files changed, 8 insertions(+), 5 deletions(-)

-- 
1.8.2.1

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

* [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev.
  2014-03-16 21:10 [Qemu-devel] [PATCH 0/3] Trivial patches Maria Kustova
@ 2014-03-16 21:10 ` Maria Kustova
  2014-03-17 15:12   ` Stefan Hajnoczi
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API Maria Kustova
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Maria Kustova @ 2014-03-16 21:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Maria Kustova, stefanha

Signed-off-by: Maria Kustova <maria.k@catit.be>
---
 qemu-io-cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index f1de24c..5707bda 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1087,7 +1087,7 @@ writev_help(void)
 " writes a range of bytes from the given offset source from multiple buffers\n"
 "\n"
 " Example:\n"
-" 'write 512 1k 1k' - writes 2 kilobytes at 512 bytes into the open file\n"
+" 'writev 512 1k 1k' - writes 2 kilobytes at 512 bytes into the open file\n"
 "\n"
 " Writes into a segment of the currently open file, using a buffer\n"
 " filled with a set pattern (0xcdcdcdcd).\n"
-- 
1.8.2.1

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

* [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API.
  2014-03-16 21:10 [Qemu-devel] [PATCH 0/3] Trivial patches Maria Kustova
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev Maria Kustova
@ 2014-03-16 21:10 ` Maria Kustova
  2014-03-17 13:22   ` Peter Crosthwaite
  2014-03-17 15:12   ` Stefan Hajnoczi
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 3/3] qemu-io: Extended "--cmd" description in usage text Maria Kustova
  2014-03-17 13:25 ` [Qemu-devel] [PATCH 0/3] Trivial patches Peter Crosthwaite
  3 siblings, 2 replies; 9+ messages in thread
From: Maria Kustova @ 2014-03-16 21:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Maria Kustova, stefanha

Signed-off-by: Maria Kustova <maria.k@catit.be>
---
 block/curl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/curl.c b/block/curl.c
index 3494c6d..359637e 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -538,7 +538,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
     return 0;
 
 out:
-    fprintf(stderr, "CURL: Error opening file: %s\n", state->errmsg);
+    error_setg(errp, "CURL: Error opening file: %s\n", state->errmsg);
     curl_easy_cleanup(state->curl);
     state->curl = NULL;
 out_noclean:
-- 
1.8.2.1

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

* [Qemu-devel] [PATCH 3/3] qemu-io: Extended "--cmd" description in usage text
  2014-03-16 21:10 [Qemu-devel] [PATCH 0/3] Trivial patches Maria Kustova
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev Maria Kustova
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API Maria Kustova
@ 2014-03-16 21:10 ` Maria Kustova
  2014-03-17 15:12   ` Stefan Hajnoczi
  2014-03-17 13:25 ` [Qemu-devel] [PATCH 0/3] Trivial patches Peter Crosthwaite
  3 siblings, 1 reply; 9+ messages in thread
From: Maria Kustova @ 2014-03-16 21:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Maria Kustova, stefanha

It's not clear from the usage description that "--cmd" option accepts its argument as a string, so any special symbols have to be quoted from the shell.
Updates in usage text:
 - Specified parameter format for "--cmd" option.
 - Added an instruction how to get help for "--cmd" option.

Signed-off-by: Maria Kustova <maria.k@catit.be>
---
 qemu-io.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/qemu-io.c b/qemu-io.c
index fc38608..be68d96 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -194,10 +194,11 @@ static const cmdinfo_t quit_cmd = {
 static void usage(const char *name)
 {
     printf(
-"Usage: %s [-h] [-V] [-rsnm] [-c cmd] ... [file]\n"
+"Usage: %s [-h] [-V] [-rsnm] [-c STRING] ... [file]\n"
 "QEMU Disk exerciser\n"
 "\n"
-"  -c, --cmd            command to execute\n"
+"  -c, --cmd STRING     execute command with its arguments\n"
+"                       from the given string\n"
 "  -r, --read-only      export read-only\n"
 "  -s, --snapshot       use snapshot file\n"
 "  -n, --nocache        disable host cache\n"
@@ -208,8 +209,10 @@ static void usage(const char *name)
 "  -T, --trace FILE     enable trace events listed in the given file\n"
 "  -h, --help           display this help and exit\n"
 "  -V, --version        output version information and exit\n"
+"\n"
+"See '%s -c help' for information on available commands."
 "\n",
-    name);
+    name, name);
 }
 
 static char *get_prompt(void)
-- 
1.8.2.1

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

* Re: [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API.
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API Maria Kustova
@ 2014-03-17 13:22   ` Peter Crosthwaite
  2014-03-17 15:12   ` Stefan Hajnoczi
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Crosthwaite @ 2014-03-17 13:22 UTC (permalink / raw)
  To: Maria Kustova
  Cc: Kevin Wolf, qemu-devel@nongnu.org Developers, Stefan Hajnoczi,
	Maria Kustova

On Mon, Mar 17, 2014 at 7:10 AM, Maria Kustova <maxa@catit.be> wrote:
> Signed-off-by: Maria Kustova <maria.k@catit.be>
> ---
>  block/curl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/curl.c b/block/curl.c
> index 3494c6d..359637e 100644
> --- a/block/curl.c
> +++ b/block/curl.c
> @@ -538,7 +538,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
>      return 0;
>
>  out:
> -    fprintf(stderr, "CURL: Error opening file: %s\n", state->errmsg);
> +    error_setg(errp, "CURL: Error opening file: %s\n", state->errmsg);

You should drop \n from error_setg calls.

Regards,
Peter

>      curl_easy_cleanup(state->curl);
>      state->curl = NULL;
>  out_noclean:
> --
> 1.8.2.1
>
>

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

* Re: [Qemu-devel] [PATCH 0/3] Trivial patches
  2014-03-16 21:10 [Qemu-devel] [PATCH 0/3] Trivial patches Maria Kustova
                   ` (2 preceding siblings ...)
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 3/3] qemu-io: Extended "--cmd" description in usage text Maria Kustova
@ 2014-03-17 13:25 ` Peter Crosthwaite
  3 siblings, 0 replies; 9+ messages in thread
From: Peter Crosthwaite @ 2014-03-17 13:25 UTC (permalink / raw)
  To: Maria Kustova
  Cc: Kevin Wolf, qemu-trivial, qemu-devel@nongnu.org Developers,
	Stefan Hajnoczi, Maria Kustova

Hi Maria,

Thanks for the patches. We have a trivial patches lists mailing lists
(that you cc in addition to qemu-devel) that is intended for this kind
of stuff.

CCd.

Regards,
Peter

On Mon, Mar 17, 2014 at 7:10 AM, Maria Kustova <maxa@catit.be> wrote:
> These patches are the part of OPW application.
> Two of them update help messages of qemu-io utility.
> And last one replaces fprintf() with error_setg() in curl.c
>
> Maria Kustova (3):
>   qemu-io-cmds: Fixed typo in example for writev.
>   block: Replaced old error handling with error reporting API.
>   qemu-io: Extended "--cmd" description in usage text
>
>  block/curl.c   | 2 +-
>  qemu-io-cmds.c | 2 +-
>  qemu-io.c      | 9 ++++++---
>  3 files changed, 8 insertions(+), 5 deletions(-)
>
> --
> 1.8.2.1
>
>

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

* Re: [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API.
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API Maria Kustova
  2014-03-17 13:22   ` Peter Crosthwaite
@ 2014-03-17 15:12   ` Stefan Hajnoczi
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-17 15:12 UTC (permalink / raw)
  To: Maria Kustova; +Cc: kwolf, qemu-devel, Maria Kustova

On Mon, Mar 17, 2014 at 01:10:58AM +0400, Maria Kustova wrote:
> Signed-off-by: Maria Kustova <maria.k@catit.be>
> ---
>  block/curl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/curl.c b/block/curl.c
> index 3494c6d..359637e 100644
> --- a/block/curl.c
> +++ b/block/curl.c
> @@ -538,7 +538,7 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
>      return 0;
>  
>  out:
> -    fprintf(stderr, "CURL: Error opening file: %s\n", state->errmsg);
> +    error_setg(errp, "CURL: Error opening file: %s\n", state->errmsg);

error_setg() does not require newline at the end of the line.  Please
remove the '\n'.

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

* Re: [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev.
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev Maria Kustova
@ 2014-03-17 15:12   ` Stefan Hajnoczi
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-17 15:12 UTC (permalink / raw)
  To: Maria Kustova; +Cc: kwolf, qemu-devel, Maria Kustova

On Mon, Mar 17, 2014 at 01:10:57AM +0400, Maria Kustova wrote:
> Signed-off-by: Maria Kustova <maria.k@catit.be>
> ---
>  qemu-io-cmds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

* Re: [Qemu-devel] [PATCH 3/3] qemu-io: Extended "--cmd" description in usage text
  2014-03-16 21:10 ` [Qemu-devel] [PATCH 3/3] qemu-io: Extended "--cmd" description in usage text Maria Kustova
@ 2014-03-17 15:12   ` Stefan Hajnoczi
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-17 15:12 UTC (permalink / raw)
  To: Maria Kustova; +Cc: kwolf, qemu-devel, Maria Kustova

On Mon, Mar 17, 2014 at 01:10:59AM +0400, Maria Kustova wrote:
> It's not clear from the usage description that "--cmd" option accepts its argument as a string, so any special symbols have to be quoted from the shell.
> Updates in usage text:
>  - Specified parameter format for "--cmd" option.
>  - Added an instruction how to get help for "--cmd" option.
> 
> Signed-off-by: Maria Kustova <maria.k@catit.be>
> ---
>  qemu-io.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

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

end of thread, other threads:[~2014-03-17 15:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-16 21:10 [Qemu-devel] [PATCH 0/3] Trivial patches Maria Kustova
2014-03-16 21:10 ` [Qemu-devel] [PATCH 1/3] qemu-io-cmds: Fixed typo in example for writev Maria Kustova
2014-03-17 15:12   ` Stefan Hajnoczi
2014-03-16 21:10 ` [Qemu-devel] [PATCH 2/3] block: Replaced old error handling with error reporting API Maria Kustova
2014-03-17 13:22   ` Peter Crosthwaite
2014-03-17 15:12   ` Stefan Hajnoczi
2014-03-16 21:10 ` [Qemu-devel] [PATCH 3/3] qemu-io: Extended "--cmd" description in usage text Maria Kustova
2014-03-17 15:12   ` Stefan Hajnoczi
2014-03-17 13:25 ` [Qemu-devel] [PATCH 0/3] Trivial patches Peter Crosthwaite

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).