[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch 1/5] qemu-nbd: cleanup
From: |
Laurent . Vivier |
Subject: |
[Qemu-devel] [patch 1/5] qemu-nbd: cleanup |
Date: |
Fri, 27 Jun 2008 13:02:05 +0200 |
User-agent: |
quilt/0.45-1 |
This patch removes "#include <malloc.h>" and correct a printf format.
(from Carlo Marcelo Arenas Belon <address@hidden>).
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 <malloc.h>
#include <stdarg.h>
#include <stdio.h>
#include <getopt.h>
@@ -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
address@hidden qemu_nbd_invocation
address@hidden @code{qemu-nbd} Invocation
+
address@hidden qemu-nbd.texi
+
@node host_drives
@subsection Using host drives
--