Merge branch 'alex'
authorWouter Verhelst <w@uter.be>
Sat, 28 May 2011 08:47:21 +0000 (10:47 +0200)
committerWouter Verhelst <w@uter.be>
Sat, 28 May 2011 08:47:21 +0000 (10:47 +0200)
Makefile.am
configure.ac
nbd-trdump.c

index 41e6358..8c51576 100644 (file)
@@ -1,7 +1,7 @@
 SUBDIRS = man
-bin_PROGRAMS = nbd-server
+bin_PROGRAMS = nbd-server nbd-trdump
 sbin_PROGRAMS = @NBD_CLIENT_NAME@
-EXTRA_PROGRAMS = nbd-client knbd-client nbd-trdump
+EXTRA_PROGRAMS = nbd-client knbd-client
 TESTS_ENVIRONMENT=$(srcdir)/simple_test
 TESTS = cmd cfg1 cfgmulti cfgnew cfgsize write flush integrity
 check_PROGRAMS = nbd-tester-client
index 6ebfa1a..3c29625 100644 (file)
@@ -1,7 +1,7 @@
 dnl Configure script for NBD system
 dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>,
 dnl (c) 2003-2006 Wouter Verhelst <wouter@debian.org>
-AC_INIT([nbd],[2.9.21a],[wouter@debian.org])
+AC_INIT([nbd],[2.9.22],[wouter@debian.org])
 AM_INIT_AUTOMAKE(foreign dist-bzip2)
 AM_MAINTAINER_MODE
 
index 49f4f9e..82b7688 100644 (file)
@@ -43,6 +43,17 @@ int main(int argc, char**argv) {
        char * ctext;
        int readfd = 0; /* stdin */
 
+       if(argc > 1) {
+               int retval=0;
+               if(strcmp(argv[1], "--help") && strcmp(argv[1], "-h")) {
+                       printf("E: unknown option %s.\n", argv[1]);
+                       retval=1;
+               }
+               printf("This is nbd-trdump, part of nbd %s.\n", PACKAGE_VERSION);
+               printf("Use: %s < transactionlog\n", argv[0]);
+               return retval;
+       }
+
        while (1) {
                /* Read a request or reply from the transaction file */
                doread(readfd, &magic, sizeof(magic));