Commit 975b092bd908029fb32e7372d8ae4de0d7412754
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
Showing
3 changed files
with
9 additions
and
3 deletions
nbd.c
... | ... | @@ -388,8 +388,8 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset, o |
388 | 388 | } |
389 | 389 | |
390 | 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 | 393 | errno = EINVAL; |
394 | 394 | return -1; |
395 | 395 | } | ... | ... |
qemu-doc.texi
... | ... | @@ -1318,6 +1318,7 @@ snapshots. |
1318 | 1318 | * disk_images_snapshot_mode:: Snapshot mode |
1319 | 1319 | * vm_snapshots:: VM snapshots |
1320 | 1320 | * qemu_img_invocation:: qemu-img Invocation |
1321 | +* qemu_nbd_invocation:: qemu-nbd Invocation | |
1321 | 1322 | * host_drives:: Using host drives |
1322 | 1323 | * disk_images_fat_images:: Virtual FAT disk images |
1323 | 1324 | @end menu |
... | ... | @@ -1400,6 +1401,11 @@ state is not saved or restored properly (in particular USB). |
1400 | 1401 | |
1401 | 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 | 1409 | @node host_drives |
1404 | 1410 | @subsection Using host drives |
1405 | 1411 | ... | ... |
qemu-nbd.c
... | ... | @@ -21,7 +21,6 @@ |
21 | 21 | #include "block_int.h" |
22 | 22 | #include "nbd.h" |
23 | 23 | |
24 | -#include <malloc.h> | |
25 | 24 | #include <stdarg.h> |
26 | 25 | #include <stdio.h> |
27 | 26 | #include <getopt.h> |
... | ... | @@ -168,6 +167,7 @@ int main(int argc, char **argv) |
168 | 167 | { "partition", 1, 0, 'P' }, |
169 | 168 | { "snapshot", 0, 0, 's' }, |
170 | 169 | { "verbose", 0, 0, 'v' }, |
170 | + { NULL, 0, 0, 0 } | |
171 | 171 | }; |
172 | 172 | int ch; |
173 | 173 | int opt_ind = 0; | ... | ... |