projects
/
platform
/
upstream
/
nbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
902c07e
)
Be a bit more helpful when someone tries something silly.
author
Wouter Verhelst
<w@uter.be>
Mon, 11 Feb 2013 23:07:36 +0000
(
00:07
+0100)
committer
Wouter Verhelst
<w@uter.be>
Mon, 11 Feb 2013 23:07:36 +0000
(
00:07
+0100)
nbd-client.c
patch
|
blob
|
history
diff --git
a/nbd-client.c
b/nbd-client.c
index
1445621
..
83a68f8
100644
(file)
--- a/
nbd-client.c
+++ b/
nbd-client.c
@@
-278,8
+278,11
@@
void negotiate(int sock, u64 *rsize64, u32 *flags, char* name, uint32_t needed_f
if (write(sock, name, strlen(name)) < 0)
err("Failed/2.4: %m");
} else {
- if (magic != cliserv_magic)
- err("Not enough cliserv_magic");
+ if (magic != cliserv_magic) {
+ if(magic != opts_magic)
+ err("Not enough cliserv_magic");
+ else
+ err("It looks like you're trying to connect to a newstyle server with the oldstyle protocol. Try the -N option.");
printf(".");
}