From: Wouter Verhelst Date: Sat, 28 May 2011 08:47:21 +0000 (+0200) Subject: Merge branch 'alex' X-Git-Url: http://git.alex.org.uk?hp=417669be89cd9062d623f9e71e1642daf9c08a00 Merge branch 'alex' --- diff --git a/Makefile.am b/Makefile.am index 41e6358..8c51576 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 6ebfa1a..3c29625 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Configure script for NBD system dnl (c) 1998 Martin Mares , (c) 2000 Pavel Machek , dnl (c) 2003-2006 Wouter Verhelst -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 diff --git a/nbd-trdump.c b/nbd-trdump.c index 49f4f9e..82b7688 100644 --- a/nbd-trdump.c +++ b/nbd-trdump.c @@ -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));