projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d208e07
)
Fix command-line oldstyle export
author
Wouter Verhelst <w@uter.be>
Thu, 5 Aug 2010 23:47:19 +0000
(19:47 -0400)
committer
Wouter Verhelst <w@uter.be>
Thu, 5 Aug 2010 23:47:19 +0000
(19:47 -0400)
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index
11fa5d7
..
7e97e45
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-515,6
+515,8
@@
SERVER* cmdline(int argc, char *argv[]) {
if(nonspecial<2) {
g_free(serve);
serve=NULL;
+ } else {
+ do_oldstyle = TRUE;
}
if(do_output) {
if(!serve) {
@@
-1231,7
+1233,11
@@
CLIENT* negotiate(int net, CLIENT *client, GArray* servers) {
if(client)
exit(EXIT_FAILURE);
}
- magic = htonll(opts_magic);
+ if(client && client->modern) {
+ magic = htonll(opts_magic);
+ } else {
+ magic = htonll(cliserv_magic);
+ }
if (write(net, &magic, sizeof(magic)) < 0) {
err_nonfatal("Negotiation failed: %m");
if(client)