summary refs log tree commit diff stats
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-09-21 17:50:58 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2010-09-21 17:50:58 -0500
commite1bb0a1a6c7c6d51443856ca90bd538b1ef5feeb (patch)
treeec271a0d224608382eb146d68298fd9e9fd0d3c9 /qemu-nbd.c
parentf36d53ef6cb848d5cf204b0854b12e0359f0fd7e (diff)
parentd9d334176c5dba23b47be07192f431b0c030928d (diff)
downloadfocaccia-qemu-e1bb0a1a6c7c6d51443856ca90bd538b1ef5feeb.tar.gz
focaccia-qemu-e1bb0a1a6c7c6d51443856ca90bd538b1ef5feeb.zip
Merge remote branch 'kwolf/for-anthony' into staging
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 91b569f8e6..99f1d22884 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -44,7 +44,7 @@ static void usage(const char *name)
 "Usage: %s [OPTIONS] FILE\n"
 "QEMU Disk Network Block Device Server\n"
 "\n"
-"  -p, --port=PORT      port to listen on (default `1024')\n"
+"  -p, --port=PORT      port to listen on (default `%d')\n"
 "  -o, --offset=OFFSET  offset into the image\n"
 "  -b, --bind=IFACE     interface to bind to (default `0.0.0.0')\n"
 "  -k, --socket=PATH    path to the unix socket\n"
@@ -62,7 +62,7 @@ static void usage(const char *name)
 "  -V, --version        output version information and exit\n"
 "\n"
 "Report bugs to <anthony@codemonkey.ws>\n"
-    , name, "DEVICE");
+    , name, NBD_DEFAULT_PORT, "DEVICE");
 }
 
 static void version(const char *name)
@@ -188,7 +188,7 @@ int main(int argc, char **argv)
     bool readonly = false;
     bool disconnect = false;
     const char *bindto = "0.0.0.0";
-    int port = 1024;
+    int port = NBD_DEFAULT_PORT;
     struct sockaddr_in addr;
     socklen_t addr_len = sizeof(addr);
     off_t fd_size;
@@ -446,7 +446,7 @@ int main(int argc, char **argv)
     max_fd = sharing_fds[0];
     nb_fds++;
 
-    data = qemu_memalign(512, NBD_BUFFER_SIZE);
+    data = qemu_blockalign(bs, NBD_BUFFER_SIZE);
     if (data == NULL)
         errx(EXIT_FAILURE, "Cannot allocate data buffer");