diff options
author | Johann Latocha | 2012-02-06 17:37:01 +0100 |
---|---|---|
committer | Johann Latocha | 2012-02-06 17:37:01 +0100 |
commit | 7c066f7d6d72154d0f5ef746b14190a5ad54421b (patch) | |
tree | fce14eed881524af6346577232126b97001bb476 /src/client | |
parent | [KERNEL] Segfault at closing device fixed (diff) | |
download | dnbd3-7c066f7d6d72154d0f5ef746b14190a5ad54421b.tar.gz dnbd3-7c066f7d6d72154d0f5ef746b14190a5ad54421b.tar.xz dnbd3-7c066f7d6d72154d0f5ef746b14190a5ad54421b.zip |
[ALL] Request latest available rid
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/client.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/client.c b/src/client/client.c index 723e650..0bb4a5b 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -35,17 +35,17 @@ char *_config_file_name = DEFAULT_CLIENT_CONFIG_FILE; void dnbd3_print_help(char* argv_0) { printf( - "Usage: %s -h <host> -p <port> -v <vid> -r <rid> -d <device> || -f <file> || -c <device>\n", + "Usage: %s -h <host> -p <port> -v <vid> [-r <rid>] -d <device> || -f <file> || -c <device>\n", argv_0); printf("Start the DNBD3 client.\n"); printf("-f or --file \t\t Configuration file (default /etc/dnbd3-client.conf)\n"); printf("-h or --host \t\t Host running dnbd3-server.\n"); printf("-p or --port \t\t Port used by server.\n"); printf("-v or --vid \t\t Volume-ID of exported image.\n"); - printf("-r or --rid \t\t Release-ID of exported image.\n"); + printf("-r or --rid \t\t Release-ID of exported image (if 0 latest available rid will be used).\n"); printf("-d or --device \t\t DNBD3 device name.\n"); printf("-c or --close \t\t Disconnect and close device.\n"); - printf("-s or --switch \t Switch dnbd3-server on device (DEBUG).\n"); + printf("-s or --switch \t\t Switch dnbd3-server on device (DEBUG).\n"); printf("-H or --help \t\t Show this help text and quit.\n"); printf("-V or --version \t Show version and quit.\n"); exit(EXIT_SUCCESS); @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) } // close device - if (close_dev && !msg.host && dev && !msg.port && (msg.vid == 0) && (msg.rid == 0)) + if (close_dev && !msg.host && dev && !msg.port && (msg.vid == 0)) { fd = open(dev, O_WRONLY); printf("INFO: Closing device %s\n", dev); @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) } // switch host - if (switch_host && msg.host && dev && !msg.port && (msg.vid == 0) && (msg.rid == 0)) + if (switch_host && msg.host && dev && !msg.port && (msg.vid == 0)) { fd = open(dev, O_WRONLY); printf("INFO: Switching device %s to %s\n", dev, msg.host); @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) } // connect - if (msg.host && msg.port && dev && (msg.vid != 0) && (msg.rid != 0)) + if (msg.host && msg.port && dev && (msg.vid != 0)) { fd = open(dev, O_WRONLY); printf("INFO: Connecting %s to %s:%s vid:%i rid:%i\n", dev, msg.host, msg.port, msg.vid, msg.rid); |