Hello community, here is the log from the commit of package mbuffer for openSUSE:Factory checked in at 2015-01-29 09:56:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mbuffer (Old) and /work/SRC/openSUSE:Factory/.mbuffer.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mbuffer" Changes: -------- --- /work/SRC/openSUSE:Factory/mbuffer/mbuffer.changes 2014-04-22 10:06:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.mbuffer.new/mbuffer.changes 2015-01-29 09:56:08.000000000 +0100 @@ -1,0 +2,10 @@ +Sat Jan 24 21:55:43 UTC 2015 - [email protected] + +- version 20141227: + + added option --pid to print PID of current process + + updated usage to include option -W + + man page formatting fixes + + configure updates + + support compiling on systems that do not define PATH_MAX + +------------------------------------------------------------------- Old: ---- mbuffer-20140310.tgz New: ---- mbuffer-20141227.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mbuffer.spec ++++++ --- /var/tmp/diff_new_pack.H2gUhC/_old 2015-01-29 09:56:09.000000000 +0100 +++ /var/tmp/diff_new_pack.H2gUhC/_new 2015-01-29 09:56:09.000000000 +0100 @@ -1,5 +1,7 @@ -# vim: set ts=4 sw=4 et: - +# +# spec file for package mbuffer +# +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 Pascal Bleser <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -12,19 +14,21 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + Name: mbuffer -Version: 20140310 +Version: 20141227 Release: 0 Summary: Replacement for "buffer" with many more Features +License: GPL-3.0+ +Group: Productivity/Text/Utilities +Url: http://www.maier-komor.de/mbuffer.html Source: http://www.maier-komor.de/software/mbuffer/mbuffer-%{version}.tgz Patch1: mbuffer-fix_pointer_cast.patch -URL: http://www.maier-komor.de/mbuffer.html -Group: Productivity/Text/Utilities -License: GPL-3.0+ -BuildRoot: %{_tmppath}/build-%{name}-%{version} -BuildRequires: openssl-devel BuildRequires: libtool +BuildRequires: openssl-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description mbuffer is a raplacement for buffer with additional functionality: @@ -45,14 +49,11 @@ --enable-md5 \ --disable-debug -%__make %{?_smp_flags} SHELL=/bin/sh +make %{?_smp_mflags} SHELL=/bin/sh %install -%__install -D -m 0755 mbuffer "%{buildroot}%{_bindir}/mbuffer" -%__install -D -m 0644 mbuffer.1 "%{buildroot}%{_mandir}/man1/mbuffer.1" - -%clean -%{?buildroot:%__rm -rf "%{buildroot}"} +install -D -m 0755 mbuffer "%{buildroot}%{_bindir}/mbuffer" +install -D -m 0644 mbuffer.1 "%{buildroot}%{_mandir}/man1/mbuffer.1" %files %defattr(-,root,root) ++++++ mbuffer-20140310.tgz -> mbuffer-20141227.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/.hg_archival.txt new/mbuffer-20141227/.hg_archival.txt --- old/mbuffer-20140310/.hg_archival.txt 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/.hg_archival.txt 2014-12-27 20:10:06.000000000 +0100 @@ -1,5 +1,5 @@ repo: 6e3b485d74645931e2408ed1f57e659029b5639a -node: d98ef1ef3a25043dbae9b29d0f6bd96d873c3934 +node: 5804411962c0a986c14d1898168ed27b210e0a0c branch: default -latesttag: R20140310 +latesttag: R20141227 latesttagdistance: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/.hgtags new/mbuffer-20141227/.hgtags --- old/mbuffer-20140310/.hgtags 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/.hgtags 2014-12-27 20:10:06.000000000 +0100 @@ -84,3 +84,4 @@ 35bfc3c313d416df09cfabca9ca691b60f7816b6 20130220 d93542af23e7750fc8e50c502f84ae7c62ec7856 R20140126 3f18779d5fda082e6093e69de8c9c4098c67823d R20140310 +08bdb2cb811b3ea374cd18a777761da445cea8d7 R20141227 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/ChangeLog new/mbuffer-20141227/ChangeLog --- old/mbuffer-20140310/ChangeLog 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/ChangeLog 2014-12-27 20:10:06.000000000 +0100 @@ -1,3 +1,10 @@ +20141227: +- added option --pid to print PID of current process +- updated usage to include option -W +- man page formatting fixes +- configure updates +- support compiling on systems that do not define PATH_MAX + 20140310: - added memory advise for buffer memory - compatibility fix for Solars st driver diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/config.h.in new/mbuffer-20141227/config.h.in --- old/mbuffer-20140310/config.h.in 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/config.h.in 2014-12-27 20:10:06.000000000 +0100 @@ -24,7 +24,7 @@ #undef PACKAGE /* version of mbuffer */ -#undef VERSION +#undef PACKAGE_VERSION /* Define if you want support for debugging messages. */ #undef DEBUG diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/configure new/mbuffer-20141227/configure --- old/mbuffer-20140310/configure 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/configure 2014-12-27 20:10:06.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. +# Generated by GNU Autoconf 2.69 for mbuffer 20141227. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -575,12 +575,12 @@ MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= +PACKAGE_NAME='mbuffer' +PACKAGE_TARNAME='mbuffer' +PACKAGE_VERSION='20141227' +PACKAGE_STRING='mbuffer 20141227' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' ac_unique_file="mbuffer.c" ac_default_prefix=/usr/local @@ -623,8 +623,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS AUTOCONF -VERSION -PACKAGE DEBUG ALLOCA EGREP @@ -749,7 +747,7 @@ localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1249,7 +1247,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. +\`configure' configures mbuffer 20141227 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1297,7 +1295,7 @@ --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/mbuffer] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1314,7 +1312,9 @@ fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of mbuffer 20141227:";; + esac cat <<\_ACEOF Optional Features: @@ -1402,7 +1402,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure +mbuffer configure 20141227 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1878,7 +1878,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was +It was created by mbuffer $as_me 20141227, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2229,6 +2229,7 @@ ac_config_headers="$ac_config_headers config.h" + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -2371,9 +2372,6 @@ -PACKAGE=mbuffer -VERSION=20140302 - if test "${LD_LIBRARY_PATH}" != "" ; then echo "" echo " WARNING: LD_LIBRARY_PATH is set. This can cause severe problems!!!" @@ -4156,7 +4154,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4202,7 +4200,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4226,7 +4224,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4271,7 +4269,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4295,7 +4293,7 @@ We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -5036,7 +5034,8 @@ ac_res=$ac_cv_search_seteuid if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $as_echo "#define HAVE_SETEUID 1" >>confdefs.h + +$as_echo "#define HAVE_SETEUID 1" >>confdefs.h fi @@ -5095,9 +5094,8 @@ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else - cat >>confdefs.h <<_ACEOF -#define atoll atol -_ACEOF + +$as_echo "#define atoll atol" >>confdefs.h fi @@ -5154,7 +5152,8 @@ ac_res=$ac_cv_search_hstrerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h + +$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h fi @@ -5211,7 +5210,8 @@ ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h + +$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h fi @@ -5605,9 +5605,8 @@ fi if test x$enable_debug = xyes ; then - cat >>confdefs.h <<_ACEOF -#define DEBUG 1 -_ACEOF + +$as_echo "#define DEBUG 1" >>confdefs.h fi @@ -5673,9 +5672,8 @@ ac_res=$ac_cv_search_mhash_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMHASH 1 -_ACEOF + +$as_echo "#define HAVE_LIBMHASH 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5 @@ -5731,9 +5729,8 @@ ac_res=$ac_cv_search_MD5Init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMD5 1 -_ACEOF + +$as_echo "#define HAVE_LIBMD5 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5_Init" >&5 @@ -5789,9 +5786,8 @@ ac_res=$ac_cv_search_MD5_Init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCRYPTO 1 -_ACEOF + +$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h else if test x$enable_md5 = xauto ; then @@ -5810,16 +5806,6 @@ fi -cat >>confdefs.h <<_ACEOF -#define PACKAGE "${PACKAGE}" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define VERSION "${VERSION}" -_ACEOF - - - @@ -6334,7 +6320,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by $as_me, which was +This file was extended by mbuffer $as_me 20141227, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6396,7 +6382,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -config.status +mbuffer config.status 20141227 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/configure.in new/mbuffer-20141227/configure.in --- old/mbuffer-20140310/configure.in 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/configure.in 2014-12-27 20:10:06.000000000 +0100 @@ -1,12 +1,10 @@ -AC_INIT(mbuffer.c) -AC_CONFIG_HEADER(config.h) +AC_INIT([mbuffer],[20141227]) +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_SRCDIR([mbuffer.c]) AC_CANONICAL_SYSTEM AC_EXEEXT -PACKAGE=mbuffer -VERSION=20140310 - if test "${LD_LIBRARY_PATH}" != "" ; then echo "" echo " WARNING: LD_LIBRARY_PATH is set. This can cause severe problems!!!" @@ -87,14 +85,14 @@ AC_SEARCH_LIBS(clock_gettime,rt,,AC_MSG_ERROR(could not find the library containing clock_gettime!)) AC_SEARCH_LIBS(sem_init,rt posix,,AC_MSG_ERROR(could not find semaphore functions!)) AC_SEARCH_LIBS(rint,m,,AC_MSG_ERROR(unable to find rint)) -AC_SEARCH_LIBS(seteuid,c,AC_DEFINE(HAVE_SETEUID),) -AC_SEARCH_LIBS(atoll,c,,AC_DEFINE_UNQUOTED(atoll,atol)) -AC_SEARCH_LIBS(hstrerror,resolv socket nsl,AC_DEFINE(HAVE_HSTRERROR),) -AC_SEARCH_LIBS(getaddrinfo,resolv socket nsl,AC_DEFINE(HAVE_GETADDRINFO),) +AC_SEARCH_LIBS(seteuid,c,AC_DEFINE([HAVE_SETEUID], [1], [Define to 1 if you have the seteuid() function]),) +AC_SEARCH_LIBS(atoll,c,,AC_DEFINE([atoll],[atol],[Define to 1 if you do not have the atoll() function to use atol() instead])) +AC_SEARCH_LIBS(hstrerror,resolv socket nsl,AC_DEFINE([HAVE_HSTRERROR], [1], [Define to 1 if you have the hstrerror() function]),) +AC_SEARCH_LIBS(getaddrinfo,resolv socket nsl,AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the getaddrinfo() function]),) AC_SEARCH_LIBS(socket,socket,,AC_MSG_ERROR(could not find the library containing network functions!)) AC_SEARCH_LIBS(gethostbyname,nsl,,AC_MSG_ERROR(could not find the library containing name convertion functions!)) -AC_SEARCH_LIBS(sendfile,sendfile,AC_DEFINE(HAVE_SENDFILE,1,libsendfile is available),) -AC_CHECK_HEADER(sys/sendfile.h,AC_DEFINE(HAVE_SENDFILE_H,1,sendfile in sendfile.h),) +AC_SEARCH_LIBS(sendfile,sendfile,AC_DEFINE([HAVE_SENDFILE],[1],[libsendfile is available]),) +AC_CHECK_HEADER(sys/sendfile.h,AC_DEFINE([HAVE_SENDFILE_H],[1],[sendfile in sendfile.h]),) AC_FUNC_ALLOCA @@ -103,7 +101,7 @@ ,enable_debug=yes ) if test x$enable_debug = xyes ; then - AC_DEFINE_UNQUOTED(DEBUG) + AC_DEFINE([DEBUG], [1], [Define to 1 to build in debugging mode]) fi AC_ARG_ENABLE(md5, @@ -111,9 +109,9 @@ ,enable_md5=auto ) if test x$enable_md5 != xno ; then - AC_SEARCH_LIBS(mhash_init,mhash,AC_DEFINE_UNQUOTED(HAVE_LIBMHASH), - AC_SEARCH_LIBS(MD5Init,md5,AC_DEFINE_UNQUOTED(HAVE_LIBMD5), - AC_SEARCH_LIBS(MD5_Init,crypto,AC_DEFINE_UNQUOTED(HAVE_LIBCRYPTO), + AC_SEARCH_LIBS(mhash_init,mhash,AC_DEFINE([HAVE_LIBMHASH], [1], [Define to 1 if you have the mhash library]), + AC_SEARCH_LIBS(MD5Init,md5,AC_DEFINE([HAVE_LIBMD5], [1], [Define to 1 if you have the md5 library]), + AC_SEARCH_LIBS(MD5_Init,crypto,AC_DEFINE([HAVE_LIBCRYPTO], [1], [Define to 1 if you have the OpenSSL crypto library]), if test x$enable_md5 = xauto ; then AC_MSG_WARN(could not find a library containing the md5 hash functions - md5 support disabled) else @@ -123,10 +121,6 @@ fi AC_SUBST(DEBUG) -AC_DEFINE_UNQUOTED(PACKAGE,"${PACKAGE}") -AC_DEFINE_UNQUOTED(VERSION,"${VERSION}") -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) AC_SUBST(prefix) AC_SUBST(AUTOCONF) AC_DEFINE(_REENTRANT,1,Needed for thread safe compilation) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/log.c new/mbuffer-20141227/log.c --- old/mbuffer-20140310/log.c 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/log.c 2014-12-27 20:10:06.000000000 +0100 @@ -217,3 +217,32 @@ } +void printmsg(const char *msg, ...) +{ + va_list val; + char buf[256], *b = buf + PrefixLen; + size_t s; + + va_start(val,msg); + (void) memcpy(buf,Prefix,PrefixLen); + b += vsnprintf(b,sizeof(buf)-(b-buf),msg,val); + s = b - buf; + assert(s < sizeof(buf)); +#ifdef NEED_IO_INTERLOCK + if (s <= PIPE_BUF) { + (void) write(Log,buf,s); + } else { + int err; + err = pthread_mutex_lock(&LogMut); + assert(err == 0); + (void) write(Log,buf,s); + err = pthread_mutex_unlock(&LogMut); + assert(err == 0); + } +#else + (void) write(Log,buf,s); +#endif + va_end(val); +} + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/log.h new/mbuffer-20141227/log.h --- old/mbuffer-20140310/log.h 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/log.h 2014-12-27 20:10:06.000000000 +0100 @@ -49,6 +49,7 @@ void warningmsg(const char *msg, ...); void errormsg(const char *msg, ...); void fatal(const char *msg, ...); +void printmsg(const char *msg, ...); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/mbuffer.1.in new/mbuffer-20141227/mbuffer.1.in --- old/mbuffer-20140310/mbuffer.1.in 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/mbuffer.1.in 2014-12-27 20:10:06.000000000 +0100 @@ -1,4 +1,4 @@ -.TH "mbuffer" "1" "@VERSION@" "Thomas Maier-Komor" "console utility" +.TH "mbuffer" "1" "@PACKAGE_VERSION@" "Thomas Maier-Komor" "console utility" .SH "NAME" mbuffer \- measuring buffer .SH "SYNTAX" @@ -14,7 +14,7 @@ .TP \fB\-i\fR <\fIfilename\fP> Use \fIfilename\fP as input instead of the standard input (needs to be -given for multi volume support). If \fIfilename\fP is -, input is read +given for multi volume support). If \fIfilename\fP is \-, input is read from standard input. .TP \fB\-I\fR <\fIport\fP> @@ -41,13 +41,13 @@ Use blocks of \fIsize\fP bytes for buffer (default pagesize of system). .TP \fB\-m\fR <\fIsize\fP> -Use a total of \fIsize\fP bytes for buffer (default 2MB) - size can be +Use a total of \fIsize\fP bytes for buffer (default 2MB) \- size can be set with a trailing character (b and B for Byte, k for kByte, M for MByte, G for Gigabyte, and with % for a percentage of total physical memory). .TP \fB\-L\fR -Lock buffer in memory - this option is not available for file-based +Lock buffer in memory \- this option is not available for file-based buffers and requires mbuffer to be set-UID root (use with care). .TP \fB\-n\fR <\fInum\fP> @@ -109,7 +109,7 @@ overwrite output file if it exists already .TP \fB\-c\fR -write with synchronous data integrity support - This option forces all +write with synchronous data integrity support \- This option forces all writes to complete before continuing. This enables errors to be reported earlier and more precisely, but might decrease performance. Especially systems with high level of data integrity support suffer a huge @@ -138,10 +138,10 @@ O_DIRECT. .TP \fB\-\-append\fR -Open next output file given via option -o in append mode. +Open next output file given via option \-o in append mode. .TP \fB\-\-truncate\fR -Truncate next output file given via option -o when opening it. +Truncate next output file given via option \-o when opening it. .TP \fB\-6\fR Force IPv6 mode for the following network I/O options on command line. @@ -156,6 +156,12 @@ \fB\-H, \-\-md5\fR Generate a MD5 hash of transferred data. .TP +\fB\-H, \-\-pid\fR +Print PID of current process. This option can help you to figure out +which instance of mbuffer to kill, if multiple are running and one is +hanging due to a network issue. Printing of the PID can also be +triggered by adding "printpid = 1" to your .mbuffer.rc file. +.TP \fB\-V, \-\-version\fR Output version information and exit. .TP @@ -170,31 +176,31 @@ The default values for following options can be set as \fIkey = value\fP pairs in the ~/.mbuffer.rc file: .br -\fIblocksize\fP: block size (option -s) +\fIblocksize\fP: block size (option \-s) .br -\fItimeout\fP: watchdog timeout (option -W) +\fItimeout\fP: watchdog timeout (option \-W) .br -\fItotalmem\fP: total buffer size (option -m) +\fItotalmem\fP: total buffer size (option \-m) .br -\fImaxreadspeed\fP: maximum read speed (option -r) +\fImaxreadspeed\fP: maximum read speed (option \-r) .br -\fImaxwritespeed\fP: maximum write speed (option -R) +\fImaxwritespeed\fP: maximum write speed (option \-R) .br -\fIstartwrite\fP: threshold for start writing (option -P) +\fIstartwrite\fP: threshold for start writing (option \-P) .br -\fIstartread\fP: threshold for start reading (option -p) +\fIstartread\fP: threshold for start reading (option \-p) .br -\fIpause\fP: pause after writing a block (option -u) +\fIpause\fP: pause after writing a block (option \-u) .br -\fInumblocks\fP: number of blocks in buffer (option -b) +\fInumblocks\fP: number of blocks in buffer (option \-b) .br -\fImemlock\fP: lock buffer in memory (option -L) +\fImemlock\fP: lock buffer in memory (option \-L) .br -\fIshowstatus\fP: print transfer status on console (option -q) +\fIshowstatus\fP: print transfer status on console (option \-q) .br -\fIlogstatus\fP: write transfer status to logfile (option -Q) +\fIlogstatus\fP: write transfer status to logfile (option \-Q) .br -\fItcpbuffer\fP: TCP buffer size (option --tcpbuffer) +\fItcpbuffer\fP: TCP buffer size (option \-\-tcpbuffer) .br diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20140310/mbuffer.c new/mbuffer-20141227/mbuffer.c --- old/mbuffer-20140310/mbuffer.c 2014-03-10 23:41:15.000000000 +0100 +++ new/mbuffer-20141227/mbuffer.c 2014-12-27 20:10:06.000000000 +0100 @@ -58,14 +58,6 @@ #ifdef HAVE_SENDFILE_H #include <sys/sendfile.h> #endif -/* if this sendfile implementation does not support sending from buffers, - disable sendfile support */ - #ifndef SFV_FD_SELF - #ifdef __GNUC__ - #warning sendfile is unable to send from buffers - #endif - #undef HAVE_SENDFILE - #endif #endif #ifndef EBADRQC @@ -122,6 +114,15 @@ #include "network.h" #include "log.h" +/* if this sendfile implementation does not support sending from buffers, + disable sendfile support */ + #ifndef SFV_FD_SELF + #ifdef __GNUC__ + #warning sendfile is unable to send from buffers + #endif + #undef HAVE_SENDFILE + #endif + char *Prefix; int @@ -1349,7 +1350,7 @@ static void version(void) { (void) fprintf(stderr, - "mbuffer version "VERSION"\n"\ + "mbuffer version "PACKAGE_VERSION"\n"\ "Copyright 2001-2014 - T. Maier-Komor\n"\ "License: GPLv3 - see file LICENSE\n"\ "This program comes with ABSOLUTELY NO WARRANTY!!!\n" @@ -1415,6 +1416,8 @@ "-H\n" "--md5 : generate md5 hash of transfered data\n" "--hash <a> : use alogritm <a>, if <a> is 'list' possible algorithms are listed\n" + "--pid : print PID of this instance\n" + "-W <time> : set watchdog timeout to <time> seconds\n" #endif "-4 : force use of IPv4\n" "-6 : force use of IPv6\n" @@ -1654,7 +1657,12 @@ static void initDefaults() { - char dfname[PATH_MAX+1], line[256]; +#ifdef PATH_MAX + char dfname[PATH_MAX+1]; +#else + char dfname[1024]; +#endif + char line[256]; const char *home = getenv("HOME"); size_t l; int df; @@ -1665,7 +1673,7 @@ warningmsg("HOME environment variable not set - unable to find defaults file\n"); return; } - strncpy(dfname,home,PATH_MAX); + strncpy(dfname,home,sizeof(dfname)-1); dfname[sizeof(dfname)-1] = 0; l = strlen(dfname); if (l + 12 > PATH_MAX) { @@ -1787,6 +1795,13 @@ } else warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr); continue; + } else if (strcasecmp(key,"printpid") == 0) { + if ((strcasecmp(valuestr,"yes") == 0) || (strcasecmp(valuestr,"on") == 0) || (strcmp(valuestr,"1") == 0)) { + printmsg("PID is %d\n",getpid()); + } else if ((strcasecmp(valuestr,"no") == 0) || (strcasecmp(valuestr,"off") == 0) || (strcmp(valuestr,"0") == 0)) { + } else + warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr); + continue; } const char *argerror = calcval(valuestr,&value); if (argerror) { @@ -2128,6 +2143,8 @@ fatal("hash calculation support has not been compiled in!\n"); #endif addHashAlgorithm(argv[c]); + } else if (!strcmp("--pid",argv[c])) { + printmsg("PID is %d\n",getpid()); } else if (!argcheck("-D",argv,&c,argc)) { OutVolsize = calcint(argv,c,0); debugmsg("OutVolsize = %llu\n",OutVolsize); @@ -2160,7 +2177,7 @@ fatal("multi-volume support is unsupported with multiple outputs\n"); if (Autoloader) { if ((!outfile) && (!Infile)) - fatal("Setting autoloader time without using a device doesn't make any sense!\n"); + fatal("Setting autoloader time or command without using a device doesn't make any sense!\n"); if (outfile && Infile) { fatal("Which one is your autoloader? Input or output? Replace input or output with a pipe.\n"); } @@ -2336,7 +2353,7 @@ int tty = open("/dev/tty",O_RDWR); if (-1 == tty) { Terminal = 0; - if (Autoloader == 0) + if ((Autoloader == 0) && (outfile)) warningmsg("No controlling terminal and no autoloader command specified.\n"); } else { Terminal = 1; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
