Commit 975b092bd908029fb32e7372d8ae4de0d7412754

Authored by ths
1 parent 96935aa4

Cleanup qemu-nbd related code, by Laurent Vivier.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4829 c046a42c-6fe2-441c-8c8c-71466251a162
@@ -388,8 +388,8 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset, o @@ -388,8 +388,8 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset, o
388 } 388 }
389 389
390 if (len > sizeof(data)) { 390 if (len > sizeof(data)) {
391 - LOG("len (%u) is larger than max len (%u)",  
392 - len, sizeof(data)); 391 + LOG("len (%u) is larger than max len (%lu)",
  392 + len, (unsigned long)sizeof(data));
393 errno = EINVAL; 393 errno = EINVAL;
394 return -1; 394 return -1;
395 } 395 }
qemu-doc.texi
@@ -1318,6 +1318,7 @@ snapshots. @@ -1318,6 +1318,7 @@ snapshots.
1318 * disk_images_snapshot_mode:: Snapshot mode 1318 * disk_images_snapshot_mode:: Snapshot mode
1319 * vm_snapshots:: VM snapshots 1319 * vm_snapshots:: VM snapshots
1320 * qemu_img_invocation:: qemu-img Invocation 1320 * qemu_img_invocation:: qemu-img Invocation
  1321 +* qemu_nbd_invocation:: qemu-nbd Invocation
1321 * host_drives:: Using host drives 1322 * host_drives:: Using host drives
1322 * disk_images_fat_images:: Virtual FAT disk images 1323 * disk_images_fat_images:: Virtual FAT disk images
1323 @end menu 1324 @end menu
@@ -1400,6 +1401,11 @@ state is not saved or restored properly (in particular USB). @@ -1400,6 +1401,11 @@ state is not saved or restored properly (in particular USB).
1400 1401
1401 @include qemu-img.texi 1402 @include qemu-img.texi
1402 1403
  1404 +@node qemu_nbd_invocation
  1405 +@subsection @code{qemu-nbd} Invocation
  1406 +
  1407 +@include qemu-nbd.texi
  1408 +
1403 @node host_drives 1409 @node host_drives
1404 @subsection Using host drives 1410 @subsection Using host drives
1405 1411
qemu-nbd.c
@@ -21,7 +21,6 @@ @@ -21,7 +21,6 @@
21 #include "block_int.h" 21 #include "block_int.h"
22 #include "nbd.h" 22 #include "nbd.h"
23 23
24 -#include <malloc.h>  
25 #include <stdarg.h> 24 #include <stdarg.h>
26 #include <stdio.h> 25 #include <stdio.h>
27 #include <getopt.h> 26 #include <getopt.h>
@@ -168,6 +167,7 @@ int main(int argc, char **argv) @@ -168,6 +167,7 @@ int main(int argc, char **argv)
168 { "partition", 1, 0, 'P' }, 167 { "partition", 1, 0, 'P' },
169 { "snapshot", 0, 0, 's' }, 168 { "snapshot", 0, 0, 's' },
170 { "verbose", 0, 0, 'v' }, 169 { "verbose", 0, 0, 'v' },
  170 + { NULL, 0, 0, 0 }
171 }; 171 };
172 int ch; 172 int ch;
173 int opt_ind = 0; 173 int opt_ind = 0;