[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 4581c1: qemu-img: show help for invalid globa
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 4581c1: qemu-img: show help for invalid global options |
Date: |
Mon, 27 Mar 2017 09:30:15 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 4581c16fce3c1078351f3424208f346b11b378f0
https://github.com/qemu/qemu/commit/4581c16fce3c1078351f3424208f346b11b378f0
Author: Stefan Hajnoczi <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M qemu-img.c
Log Message:
-----------
qemu-img: show help for invalid global options
The qemu-img sub-command executes regardless of invalid global options:
$ qemu-img --foo info test.img
qemu-img: unrecognized option '--foo'
image: test.img
...
The unrecognized option warning may be missed by the user. This can
hide incorrect command-lines in scripts and confuse users.
This patch prints the help information and terminates instead of
executing the sub-command.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: f7077624b036bd70b0b04d6b3f9a7effc80a74a9
https://github.com/qemu/qemu/commit/f7077624b036bd70b0b04d6b3f9a7effc80a74a9
Author: Stefan Hajnoczi <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M qemu-img.c
Log Message:
-----------
qemu-img: fix switch indentation in img_amend()
QEMU coding style indents 'case' to the same level as the 'switch'
statement:
switch (foo) {
case 1:
Fix this coding style violation so checkpatch.pl doesn't complain about
the next patch.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: c919297379e9980c2bcc4d2053addbc1fd6d762b
https://github.com/qemu/qemu/commit/c919297379e9980c2bcc4d2053addbc1fd6d762b
Author: Stefan Hajnoczi <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M qemu-img.c
Log Message:
-----------
qemu-img: print short help on getopt failure
Printing the full help output obscures the error message for an invalid
command-line option or missing argument.
Before this patch:
$ ./qemu-img --foo
...pages of output...
After this patch:
$ ./qemu-img --foo
qemu-img: unrecognized option '--foo'
Try 'qemu-img --help' for more information
This patch adds the getopt ':' character so that it can distinguish
between missing arguments and unrecognized options. This helps provide
more detailed error messages.
Suggested-by: Max Reitz <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: a12a712a7dfbd2e2f4882ef2c90a9b2162166dd7
https://github.com/qemu/qemu/commit/a12a712a7dfbd2e2f4882ef2c90a9b2162166dd7
Author: Paolo Bonzini <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M block/nbd-client.c
M nbd/client.c
Log Message:
-----------
nbd-client: fix handling of hungup connections
After the switch to reading replies in a coroutine, nothing is
reentering pending receive coroutines if the connection hangs.
Move nbd_recv_coroutines_enter_all to the reply read coroutine,
which is the place where hangups are detected. nbd_teardown_connection
can simply wait for the reply read coroutine to detect the hangup
and clean up after itself.
This wouldn't be enough though because nbd_receive_reply returns 0
(rather than -EPIPE or similar) when reading from a hung connection.
Fix the return value check in nbd_read_reply_entry.
This fixes qemu-iotests 083.
Reported-by: Max Reitz <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: e5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91
https://github.com/qemu/qemu/commit/e5bcf967fb80ff9cf4d0c0d643e985ec5ff94e91
Author: Kevin Wolf <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M block/file-posix.c
Log Message:
-----------
file-posix: Make bdrv_flush() failure permanent without O_DIRECT
Success for bdrv_flush() means that all previously written data is safe
on disk. For fdatasync(), the best semantics we can hope for on Linux
(without O_DIRECT) is that all data that was written since the last call
was successfully written back. Therefore, and because we can't redo all
writes after a flush failure, we have to give up after a single
fdatasync() failure. After this failure, we would never be able to make
the promise that a successful bdrv_flush() makes.
Signed-off-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 700f9ce0f9f49675818ac95c8953cbc65aa1d112
https://github.com/qemu/qemu/commit/700f9ce0f9f49675818ac95c8953cbc65aa1d112
Author: Peter Maydell <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M block/file-posix.c
Log Message:
-----------
block/file-posix.c: Fix unused variable warning on OpenBSD
On OpenBSD none of the ioctls probe_logical_blocksize() tries
exist, so the variable sector_size is unused. Refactor the
code to avoid this (and reduce the duplicated code).
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Jeff Cody <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 9366f53d509ae31bf7acb33e2eb7804e16fe70d4
https://github.com/qemu/qemu/commit/9366f53d509ae31bf7acb33e2eb7804e16fe70d4
Author: Peter Maydell <address@hidden>
Date: 2017-03-27 (Mon, 27 Mar 2017)
Changed paths:
M block/file-posix.c
M block/nbd-client.c
M nbd/client.c
M qemu-img.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2017-03-27'
into staging
Block patches for 2.9-rc2.
# gpg: Signature made Mon 27 Mar 2017 16:47:54 BST
# gpg: using RSA key 0xF407DB0061D5CF40
# gpg: Good signature from "Max Reitz <address@hidden>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* remotes/maxreitz/tags/pull-block-2017-03-27:
block/file-posix.c: Fix unused variable warning on OpenBSD
file-posix: Make bdrv_flush() failure permanent without O_DIRECT
nbd-client: fix handling of hungup connections
qemu-img: print short help on getopt failure
qemu-img: fix switch indentation in img_amend()
qemu-img: show help for invalid global options
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/a001631cb8ee...9366f53d509a
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 4581c1: qemu-img: show help for invalid global options,
GitHub <=