From 3f744076dffdcfd7c7ebe3a425421b18329ee0dd Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 22 Aug 2013 15:07:35 +0200 Subject: [CLIENT] Fix daemon-kill command --- src/client/client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/client.c b/src/client/client.c index e2a482b..ae6879e 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -165,6 +165,7 @@ int main(int argc, char *argv[]) int close_dev = 0; int switch_host = 0; + int killSwitch = FALSE; dnbd3_ioctl_t msg; memset( &msg, 0, sizeof(dnbd3_ioctl_t) ); @@ -220,6 +221,9 @@ int main(int argc, char *argv[]) case 'D': dnbd3_client_daemon(); break; + case 'k': + killSwitch = TRUE; + break; } opt = getopt_long( argc, argv, optString, longOpts, &longIndex ); } @@ -588,7 +592,6 @@ static void dnbd3_print_help(char *argv_0) printf( "\t--kill \t Kill running helper daemon\n" ); printf( "The helper daemon makes it possible for normal users to connect dnbd3 devices.\n" ); printf( "The client binary needs to be a setuid program for this to work!\n\n" ); - exit( EXIT_SUCCESS ); } void dnbd3_print_version() -- cgit v1.2.3-55-g7522