Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCBjD-0002Th-Nu for qemu-devel@nongnu.org; Fri, 27 Jun 2008 07:02:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCBjC-0002Ri-0u for qemu-devel@nongnu.org; Fri, 27 Jun 2008 07:02:54 -0400 Received: from [199.232.76.173] (port=36752 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCBjB-0002RY-R7 for qemu-devel@nongnu.org; Fri, 27 Jun 2008 07:02:53 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:52927) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KCBjB-0008C3-Bq for qemu-devel@nongnu.org; Fri, 27 Jun 2008 07:02:53 -0400 Message-Id: <20080627110247.525137461@bull.net> References: <20080627110204.818732368@bull.net> Date: Fri, 27 Jun 2008 13:02:05 +0200 From: Laurent.Vivier@bull.net Content-Disposition: inline; filename=nbd-cleanup.patch Subject: [Qemu-devel] [patch 1/5] qemu-nbd: cleanup Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent.Vivier@bull.net This patch removes "#include " and correct a printf format. (from Carlo Marcelo Arenas Belon ). Fill the last element of lopt (for getopt_long()) to mark the end of parameters list. Add an entry in qemu-doc.texi. --- nbd.c | 4 ++-- qemu-doc.texi | 6 ++++++ qemu-nbd.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) Index: qemu/nbd.c =================================================================== --- qemu.orig/nbd.c 2008-06-27 11:34:18.000000000 +0200 +++ qemu/nbd.c 2008-06-27 11:34:28.000000000 +0200 @@ -388,8 +388,8 @@ int nbd_trip(BlockDriverState *bs, int c } if (len > sizeof(data)) { - LOG("len (%u) is larger than max len (%u)", - len, sizeof(data)); + LOG("len (%u) is larger than max len (%lu)", + len, (unsigned long)sizeof(data)); errno = EINVAL; return -1; } Index: qemu/qemu-nbd.c =================================================================== --- qemu.orig/qemu-nbd.c 2008-06-27 11:34:18.000000000 +0200 +++ qemu/qemu-nbd.c 2008-06-27 11:34:28.000000000 +0200 @@ -21,7 +21,6 @@ #include "block_int.h" #include "nbd.h" -#include #include #include #include @@ -168,6 +167,7 @@ int main(int argc, char **argv) { "partition", 1, 0, 'P' }, { "snapshot", 0, 0, 's' }, { "verbose", 0, 0, 'v' }, + { NULL, 0, 0, 0 } }; int ch; int opt_ind = 0; Index: qemu/qemu-doc.texi =================================================================== --- qemu.orig/qemu-doc.texi 2008-06-27 11:34:18.000000000 +0200 +++ qemu/qemu-doc.texi 2008-06-27 11:34:28.000000000 +0200 @@ -1307,6 +1307,7 @@ snapshots. * disk_images_snapshot_mode:: Snapshot mode * vm_snapshots:: VM snapshots * qemu_img_invocation:: qemu-img Invocation +* qemu_nbd_invocation:: qemu-nbd Invocation * host_drives:: Using host drives * disk_images_fat_images:: Virtual FAT disk images @end menu @@ -1389,6 +1390,11 @@ state is not saved or restored properly @include qemu-img.texi +@node qemu_nbd_invocation +@subsection @code{qemu-nbd} Invocation + +@include qemu-nbd.texi + @node host_drives @subsection Using host drives --