diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 1999-09-15 02:50:52 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 1999-09-15 02:50:52 +0000 |
commit | 179d036e252d325d8a57a2b058c7066bdfc48869 (patch) | |
tree | babaa2d3f02bbec865446438f974c81f18ae2607 /contrib/amd/amq | |
parent | 75cb9b41f6a12ac4b05d08c9dcba1872400f9166 (diff) | |
download | src-179d036e252d325d8a57a2b058c7066bdfc48869.tar.gz src-179d036e252d325d8a57a2b058c7066bdfc48869.zip |
Notes
Diffstat (limited to 'contrib/amd/amq')
-rw-r--r-- | contrib/amd/amq/amq.8 | 4 | ||||
-rw-r--r-- | contrib/amd/amq/amq.c | 43 | ||||
-rw-r--r-- | contrib/amd/amq/amq.h | 4 | ||||
-rw-r--r-- | contrib/amd/amq/amq_clnt.c | 4 | ||||
-rw-r--r-- | contrib/amd/amq/amq_xdr.c | 4 | ||||
-rw-r--r-- | contrib/amd/amq/pawd.1 | 4 | ||||
-rw-r--r-- | contrib/amd/amq/pawd.c | 18 |
7 files changed, 40 insertions, 41 deletions
diff --git a/contrib/amd/amq/amq.8 b/contrib/amd/amq/amq.8 index 4c7c2fa42a4a..fc428e6e3cd8 100644 --- a/contrib/amd/amq/amq.8 +++ b/contrib/amd/amq/amq.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-1998 Erez Zadok +.\" Copyright (c) 1997-1999 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ .\" .\" %W% (Berkeley) %G% .\" -.\" $Id: amq.8,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ +.\" $Id: amq.8,v 1.2 1999/01/10 21:53:58 ezk Exp $ .\" .TH AMQ 8 "25 April 1989" .SH NAME diff --git a/contrib/amd/amq/amq.c b/contrib/amd/amq/amq.c index b40044608ad5..acad7bcc9aea 100644 --- a/contrib/amd/amq/amq.c +++ b/contrib/amd/amq/amq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq.c,v 1.2 1998/12/27 06:24:50 ezk Exp $ + * $Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $ * */ @@ -48,13 +48,13 @@ #ifndef lint char copyright[] = "\ -@(#)Copyright (c) 1997-1998 Erez Zadok\n\ +@(#)Copyright (c) 1997-1999 Erez Zadok\n\ @(#)Copyright (c) 1990 Jan-Simon Pendry\n\ @(#)Copyright (c) 1990 Imperial College of Science, Technology & Medicine\n\ @(#)Copyright (c) 1990 The Regents of the University of California.\n\ @(#)All rights reserved.\n"; #if __GNUC__ < 2 -static char rcsid[] = "$Id: amq.c,v 1.2 1998/12/27 06:24:50 ezk Exp $"; +static char rcsid[] = "$Id: amq.c,v 1.6 1999/09/08 23:36:40 ezk Exp $"; static char sccsid[] = "%W% (Berkeley) %G%"; #endif /* __GNUC__ < 2 */ #endif /* not lint */ @@ -66,9 +66,6 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #include <amq.h> /* locals */ -#if 0 -char *progname; -#endif static int flush_flag; static int minfo_flag; static int getpid_flag; @@ -96,15 +93,6 @@ static int amq_bind_resv_port(int td, u_short *pp); static int privsock(int ty); #endif /* not HAVE_TRANSPORT_TYPE_TLI */ -/* dummy variables */ -#if 0 -char hostname[MAXHOSTNAMELEN]; -pid_t mypid; -serv_state amd_state; -int foreground, orig_umask; -int debug_flags; -#endif - /* structures */ enum show_opt { Full, Stats, Calc, Short, ShowDone @@ -247,7 +235,11 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twi if (mi->mi_error > 0) { extern int sys_nerr; if (mi->mi_error < sys_nerr) +#ifdef HAVE_STRERROR + printf(" (%s)", strerror(mi->mi_error)); +#else /* not HAVE_STRERROR */ printf(" (%s)", sys_errlist[mi->mi_error]); +#endif /* not HAVE_STRERROR */ else printf(" (Error %d)", mi->mi_error); } else if (mi->mi_error < 0) { @@ -337,7 +329,11 @@ main(int argc, char *argv[]) /* * Parse arguments */ +#ifdef ENABLE_AMQ_MOUNT while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:pP:TU")) != -1) +#else /* not ENABLE_AMQ_MOUNT */ + while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:pP:TU")) != -1) +#endif /* not ENABLE_AMQ_MOUNT */ switch (opt_ch) { case 'f': flush_flag = 1; @@ -388,10 +384,12 @@ main(int argc, char *argv[]) nodefault = 1; break; +#ifdef ENABLE_AMQ_MOUNT case 'M': mount_map = optarg; nodefault = 1; break; +#endif /* ENABLE_AMQ_MOUNT */ case 'P': amd_program_number = atoi(optarg); @@ -418,11 +416,20 @@ main(int argc, char *argv[]) show_usage: fprintf(stderr, "\ Usage: %s [-h host] [[-f] [-m] [-p] [-v] [-s]] | [[-u] directory ...]]\n\ -\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts] [-M mapent]\n\ -\t[-P prognum] [-T] [-U]\n", am_get_progname()); +\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts]%s\n\ +\t[-P prognum] [-T] [-U]\n", + am_get_progname(), +#ifdef ENABLE_AMQ_MOUNT + " [-M mapent]" +#else /* not ENABLE_AMQ_MOUNT */ + "" +#endif /* not ENABLE_AMQ_MOUNT */ + ); exit(1); } + + /* set use_udp and use_tcp flags both to on if none are defined */ if (!use_tcp_flag && !use_udp_flag) use_tcp_flag = use_udp_flag = 1; diff --git a/contrib/amd/amq/amq.h b/contrib/amd/amq/amq.h index 15ee2aa1527a..cebe62407d69 100644 --- a/contrib/amd/amq/amq.h +++ b/contrib/amd/amq/amq.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq.h,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ + * $Id: amq.h,v 1.2 1999/01/10 21:53:59 ezk Exp $ * */ diff --git a/contrib/amd/amq/amq_clnt.c b/contrib/amd/amq/amq_clnt.c index 606377b369cd..1251c879fccf 100644 --- a/contrib/amd/amq/amq_clnt.c +++ b/contrib/amd/amq/amq_clnt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq_clnt.c,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ + * $Id: amq_clnt.c,v 1.2 1999/01/10 21:53:59 ezk Exp $ * */ diff --git a/contrib/amd/amq/amq_xdr.c b/contrib/amd/amq/amq_xdr.c index 33093b5f0dfe..26b93b3748af 100644 --- a/contrib/amd/amq/amq_xdr.c +++ b/contrib/amd/amq/amq_xdr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: amq_xdr.c,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ + * $Id: amq_xdr.c,v 1.2 1999/01/10 21:53:59 ezk Exp $ * */ diff --git a/contrib/amd/amq/pawd.1 b/contrib/amd/amq/pawd.1 index aa2015979878..1785afada166 100644 --- a/contrib/amd/amq/pawd.1 +++ b/contrib/amd/amq/pawd.1 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-1998 Erez Zadok +.\" Copyright (c) 1997-1999 Erez Zadok .\" Copyright (c) 1990 Jan-Simon Pendry .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine .\" Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ .\" .\" %W% (Berkeley) %G% .\" -.\" $Id: pawd.1,v 1.1.1.1 1998/11/05 02:04:52 ezk Exp $ +.\" $Id: pawd.1,v 1.2 1999/01/10 21:53:59 ezk Exp $ .\" .TH PAWD 1 "6 Jan 1998" .SH NAME diff --git a/contrib/amd/amq/pawd.c b/contrib/amd/amq/pawd.c index 3479929075e0..cf9dce6ef5bc 100644 --- a/contrib/amd/amq/pawd.c +++ b/contrib/amd/amq/pawd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1998 Erez Zadok + * Copyright (c) 1997-1999 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: pawd.c,v 1.2 1998/12/27 06:24:50 ezk Exp $ + * $Id: pawd.c,v 1.5 1999/09/08 23:36:40 ezk Exp $ * */ @@ -58,16 +58,6 @@ #include <am_defs.h> #include <amq.h> -/* dummy variables */ -#if 0 -char *progname; -char hostname[MAXHOSTNAMELEN]; -pid_t mypid; -serv_state amd_state; -int foreground, orig_umask; -int debug_flags; -#endif - /* statics */ static char *localhost="localhost"; static char newdir[MAXPATHLEN]; @@ -77,7 +67,9 @@ static int find_mt(amq_mount_tree *mt, char *dir) { while (mt) { - if (STREQ(mt->mt_type, "link") || STREQ(mt->mt_type, "nfs")) { + if (STREQ(mt->mt_type, "link") || + STREQ(mt->mt_type, "nfs") || + STREQ(mt->mt_type, "nfsl")) { int len = strlen(mt->mt_mountpoint); if (NSTREQ(mt->mt_mountpoint, dir, len) && ((dir[len] == '\0') || (dir[len] == '/'))) { |