Re: [Nbd] nbd 2.9.16: nbd-client -c exit code is incorrect for disconnected on ubuntu lucid
- To: Richard Huddleston <rhuddusa@...17...>
- Cc: nbd-general <nbd-general@lists.sourceforge.net>
- Subject: Re: [Nbd] nbd 2.9.16: nbd-client -c exit code is incorrect for disconnected on ubuntu lucid
- From: Wouter Verhelst <w@...112...>
- Date: Tue, 27 Jul 2010 18:42:10 -0400
- Message-id: <20100727224210.GN31357@...510...>
- In-reply-to: <AANLkTik2geZ+o4Y4A30U_gQ-Bh7aWN_nXCu-Cgjk1kL3@...18...>
- References: <AANLkTik2geZ+o4Y4A30U_gQ-Bh7aWN_nXCu-Cgjk1kL3@...18...>
On Tue, Jul 27, 2010 at 06:08:13PM -0400, Richard Huddleston wrote:
> i'm not the most intelligent linux user/person in general, so perhaps
> i'm doing something stupid
[...]
> as you can see, nbd-2.9.15 returns the correct results, and nbd-2.9.16
> always returns 0
>
> is there an incompatability between the kernel module and the nbd code
> i've downloaded?
No, it's a result of me introducing a bug when rewriting the command
line parsing code. This fixes it:
diff --git a/nbd-client.c b/nbd-client.c
index c98446a..8ba9264 100644
--- a/nbd-client.c
+++ b/nbd-client.c
@@ -331,8 +331,7 @@ int main(int argc, char *argv[]) {
blocksize=(int)strtol(optarg, NULL, 0);
break;
case 'c':
- check_conn(optarg, 1);
- exit(EXIT_SUCCESS);
+ return check_conn(optarg, 1);
case 'd':
disconnect(optarg);
exit(EXIT_SUCCESS);
I've just applied this to the git master branch, too.
--
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
http://www.schneier.com/blog/archives/2009/01/biometrics.html
Reply to: