Skip to content

Commit

Permalink
Merge pull request #154 from grondo/updates
Browse files Browse the repository at this point in the history
log conflicting module options with -d (and other cleanup)
  • Loading branch information
mergify[bot] committed Dec 19, 2023
2 parents 15c433d + 38eda25 commit f0ef614
Show file tree
Hide file tree
Showing 51 changed files with 779 additions and 761 deletions.
3 changes: 2 additions & 1 deletion doc/pdcp.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ List info on all loaded \fBpdcp\fR modules and quit.
.TP
.I "-d"
Include more complete thread status when SIGINT is received, and display
connect and command time statistics on stderr when done.
connect and command time statistics on stderr when done. Also, display any
module loading errors on stderr, include option conflicts.
.TP
.I "-V"
Output \fBpdcp\fR version information, along with list of currently
Expand Down
3 changes: 2 additions & 1 deletion doc/pdsh.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ Disable hostname: prefix on lines of output.
.TP
.I "-d"
Include more complete thread status when SIGINT is received, and display
connect and command time statistics on stderr when done.
connect and command time statistics on stderr when done. Also, display
any module loading errors to stderr, including option conflicts.
.TP
.I "-V"
Output \fBpdsh\fR version information, along with list of currently
Expand Down
20 changes: 10 additions & 10 deletions src/common/err.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Jim Garlick <[email protected]>.
* UCRL-CODE-2003-005.
*
*
* This file is part of Pdsh, a parallel remote shell program.
* For details, see <http://www.llnl.gov/linux/pdsh/>.
*
*
* Pdsh is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
*
* Pdsh is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
*
* You should have received a copy of the GNU General Public License along
* with Pdsh; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
Expand All @@ -44,7 +44,7 @@

#include "xstring.h"
#include "xmalloc.h"
#include "macros.h"
#include "macros.h"

static char *prog = NULL;
static char *host = NULL;
Expand All @@ -55,7 +55,7 @@ static char *host = NULL;
static bool keep_host_domain = false;

/*
* Call this before calling err() or errx(). Sets hostname and program name
* Call this before calling err() or errx(). Sets hostname and program name
* for %H, %p, and %P.
* str (IN) program name
*/
Expand Down Expand Up @@ -85,15 +85,15 @@ void err_cleanup(void)
Free((void **) &host);
}

/*
/*
* _verr() is like vfprintf, but handles (only) the following formats:
* following formats:
* %s string
* %S string, but treat as hostname and truncate after dot
* %c character
* %m string (sys_errlist[errno])
* %d int
* %z equivalent to %.3d
* %z equivalent to %.3d
* %p program name with @host attached
* %P program name
* %H hostname for this host
Expand All @@ -115,8 +115,8 @@ static void _verr(FILE * stream, char *format, va_list ap)
xstrcat(&buf, va_arg(ap, char *));
} else if (*format == 'S') { /* %S - string, trunc */
snprintf(tmpstr, sizeof(tmpstr), "%s", va_arg(ap, char *));
if ( !isdigit(*tmpstr)
&& !keep_host_domain
if ( !isdigit(*tmpstr)
&& !keep_host_domain
&& (q = strchr(tmpstr, '.')))
*q = '\0';
xstrcat(&buf, tmpstr);
Expand Down
8 changes: 4 additions & 4 deletions src/common/err.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Jim Garlick <[email protected]>.
* UCRL-CODE-2003-005.
*
*
* This file is part of Pdsh, a parallel remote shell program.
* For details, see <http://www.llnl.gov/linux/pdsh/>.
*
*
* Pdsh is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
*
* Pdsh is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
*
* You should have received a copy of the GNU General Public License along
* with Pdsh; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
Expand Down
2 changes: 1 addition & 1 deletion src/common/fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fd_null_read_n (int fd, void *buf, size_t n)
ssize_t nread;
unsigned char *p;
unsigned char *q;

q = p = (unsigned char *)buf;
nleft = n;
while (nleft > 0) {
Expand Down
Loading

0 comments on commit f0ef614

Please sign in to comment.