diff options
author | obrien <obrien@FreeBSD.org> | 2001-09-02 17:19:13 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-09-02 17:19:13 +0000 |
commit | ac3e3d43d4bfa5d6b9dcc48360ec6bf36b03ed82 (patch) | |
tree | f360f5a4cfde557f960abf8a2685577136e077fd /contrib/amd/fsinfo | |
parent | af59541d88274a855749824b48db3943f4e68c34 (diff) | |
download | FreeBSD-src-ac3e3d43d4bfa5d6b9dcc48360ec6bf36b03ed82.zip FreeBSD-src-ac3e3d43d4bfa5d6b9dcc48360ec6bf36b03ed82.tar.gz |
Virgin import of AMD (am-utils) v6.0.7
Diffstat (limited to 'contrib/amd/fsinfo')
-rw-r--r-- | contrib/amd/fsinfo/fsi_analyze.c | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsi_data.h | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsi_dict.c | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsi_gram.y | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsi_lex.l | 6 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsi_util.c | 14 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsinfo.8 | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsinfo.c | 7 | ||||
-rw-r--r-- | contrib/amd/fsinfo/fsinfo.h | 22 | ||||
-rw-r--r-- | contrib/amd/fsinfo/wr_atab.c | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/wr_bparam.c | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/wr_dumpset.c | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/wr_exportfs.c | 4 | ||||
-rw-r--r-- | contrib/amd/fsinfo/wr_fstab.c | 4 |
14 files changed, 48 insertions, 41 deletions
diff --git a/contrib/amd/fsinfo/fsi_analyze.c b/contrib/amd/fsinfo/fsi_analyze.c index 7ba7a95..45d867b 100644 --- a/contrib/amd/fsinfo/fsi_analyze.c +++ b/contrib/amd/fsinfo/fsi_analyze.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_analyze.c,v 1.2 1999/01/10 21:54:27 ezk Exp $ + * $Id: fsi_analyze.c,v 1.3.2.1 2001/01/10 03:23:32 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_data.h b/contrib/amd/fsinfo/fsi_data.h index 96472bb..867866f 100644 --- a/contrib/amd/fsinfo/fsi_data.h +++ b/contrib/amd/fsinfo/fsi_data.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_data.h,v 1.2 1999/01/10 21:54:27 ezk Exp $ + * $Id: fsi_data.h,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_dict.c b/contrib/amd/fsinfo/fsi_dict.c index 395317d..141c9e4 100644 --- a/contrib/amd/fsinfo/fsi_dict.c +++ b/contrib/amd/fsinfo/fsi_dict.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_dict.c,v 1.2 1999/01/10 21:54:28 ezk Exp $ + * $Id: fsi_dict.c,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_gram.y b/contrib/amd/fsinfo/fsi_gram.y index 97a76bf..2d0ba33 100644 --- a/contrib/amd/fsinfo/fsi_gram.y +++ b/contrib/amd/fsinfo/fsi_gram.y @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_gram.y,v 1.3 1999/04/16 14:21:14 ezk Exp $ + * $Id: fsi_gram.y,v 1.4.2.1 2001/01/10 03:23:33 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/fsi_lex.l b/contrib/amd/fsinfo/fsi_lex.l index 545ed5c..f9a6d7c 100644 --- a/contrib/amd/fsinfo/fsi_lex.l +++ b/contrib/amd/fsinfo/fsi_lex.l @@ -1,6 +1,6 @@ %{ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_lex.l,v 1.3 1999/09/30 21:01:41 ezk Exp $ + * $Id: fsi_lex.l,v 1.4.2.2 2001/01/10 03:23:33 ezk Exp $ * */ @@ -236,7 +236,7 @@ yyerror(char *fmt, ...) va_start(ap, fmt); col_cleanup(0); fprintf(stderr, "%s:%d: ", fsi_filename ? fsi_filename : "/dev/stdin", yylineno); - fprintf(stderr, fmt, ap); + vfprintf(stderr, fmt, ap); fputc('\n', stderr); parse_errors++; va_end(ap); diff --git a/contrib/amd/fsinfo/fsi_util.c b/contrib/amd/fsinfo/fsi_util.c index f3fe793..e619bd9 100644 --- a/contrib/amd/fsinfo/fsi_util.c +++ b/contrib/amd/fsinfo/fsi_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -35,7 +35,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsi_util.c,v 1.2 1999/01/10 21:54:28 ezk Exp $ + * $Id: fsi_util.c,v 1.3.2.2 2001/01/10 03:23:33 ezk Exp $ * */ @@ -115,7 +115,7 @@ error(char *fmt, ...) va_start(ap, fmt); col_cleanup(0); fprintf(stderr, "%s: Error, ", progname); - fprintf(stderr, fmt, ap); + vfprintf(stderr, fmt, ap); fputc('\n', stderr); errors++; va_end(ap); @@ -130,7 +130,7 @@ lerror(ioloc *l, char *fmt, ...) va_start(ap, fmt); col_cleanup(0); fprintf(stderr, "%s:%d: ", l->i_file, l->i_line); - fprintf(stderr, fmt, ap); + vfprintf(stderr, fmt, ap); fputc('\n', stderr); errors++; va_end(ap); @@ -145,7 +145,7 @@ lwarning(ioloc *l, char *fmt, ...) va_start(ap, fmt); col_cleanup(0); fprintf(stderr, "%s:%d: ", l->i_file, l->i_line); - fprintf(stderr, fmt, ap); + vfprintf(stderr, fmt, ap); fputc('\n', stderr); va_end(ap); } @@ -159,7 +159,7 @@ fatal(char *fmt, ...) va_start(ap, fmt); col_cleanup(1); fprintf(stderr, "%s: Fatal, ", progname); - fprintf(stderr, fmt, ap); + vfprintf(stderr, fmt, ap); fputc('\n', stderr); va_end(ap); exit(1); @@ -178,7 +178,7 @@ log(char *fmt, ...) va_start(ap, fmt); fputc('#', stdout); fprintf(stdout, "%s: ", progname); - fprintf(stdout, fmt, ap); + vfprintf(stdout, fmt, ap); putc('\n', stdout); va_end(ap); } diff --git a/contrib/amd/fsinfo/fsinfo.8 b/contrib/amd/fsinfo/fsinfo.8 index 4d254d9..b9a330a 100644 --- a/contrib/amd/fsinfo/fsinfo.8 +++ b/contrib/amd/fsinfo/fsinfo.8 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1997-1999 Erez Zadok +.\" Copyright (c) 1997-2001 Erez Zadok .\" Copyright (c) 1993 Jan-Simon Pendry. .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93 -.\" $Id: fsinfo.8,v 1.2 1999/01/10 21:54:28 ezk Exp $ +.\" $Id: fsinfo.8,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $ .\" .TH FSINFO 8 "June 28, 1993" .SH NAME diff --git a/contrib/amd/fsinfo/fsinfo.c b/contrib/amd/fsinfo/fsinfo.c index 0e1cb40..c9c7546 100644 --- a/contrib/amd/fsinfo/fsinfo.c +++ b/contrib/amd/fsinfo/fsinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsinfo.c,v 1.4 1999/02/04 07:24:44 ezk Exp $ + * $Id: fsinfo.c,v 1.5.2.2 2001/01/10 03:23:34 ezk Exp $ * */ @@ -196,7 +196,7 @@ Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\ static char * find_username(void) { - char *u = getlogin(); + const char *u = getlogin(); if (!u) { struct passwd *pw = getpwuid(getuid()); @@ -233,6 +233,7 @@ main(int argc, char *argv[]) perror("gethostname"); exit(1); } + hostname[sizeof(hostname) - 1] = '\0'; /* * Get the username diff --git a/contrib/amd/fsinfo/fsinfo.h b/contrib/amd/fsinfo/fsinfo.h index a828d7b..4fc6cd9 100644 --- a/contrib/amd/fsinfo/fsinfo.h +++ b/contrib/amd/fsinfo/fsinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: fsinfo.h,v 1.3 1999/01/10 21:54:29 ezk Exp $ + * $Id: fsinfo.h,v 1.4.2.2 2001/01/10 03:23:34 ezk Exp $ * */ @@ -83,15 +83,20 @@ extern void analyze_automounts(qelem *); extern void analyze_hosts(qelem *); extern void compute_automount_point(char *, host *, char *); extern void dict_add(dict *, char *, char *); -extern void error(char *fmt, ...); -extern void fatal(char *fmt, ...); +extern void error(char *fmt, ...) + __attribute__((__format__(__printf__, 1, 2))); +extern void fatal(char *fmt, ...) + __attribute__((__format__(__printf__, 1, 2))); extern void gen_hdr(FILE *ef, char *hn); extern void info_hdr(FILE *ef, char *info); extern void init_que(qelem *); extern void ins_que(qelem *, qelem *); -extern void lerror(ioloc *l, char *fmt, ...); -extern void log(char *fmt, ...); -extern void lwarning(ioloc *l, char *fmt, ...); +extern void lerror(ioloc *l, char *fmt, ...) + __attribute__((__format__(__printf__, 2, 3))); +extern void log(char *fmt, ...) + __attribute__((__format__(__printf__, 1, 2))); +extern void lwarning(ioloc *l, char *fmt, ...) + __attribute__((__format__(__printf__, 2, 3))); extern void rem_que(qelem *); extern void set_disk_fs(disk_fs *, int, char *); extern void set_fsmount(fsmount *, int, char *); @@ -100,7 +105,8 @@ extern void show_area_being_processed(char *area, int n); extern void show_new(char *msg); extern void warning(void); -extern int yyerror(char *fmt, ...); +extern int yyerror(char *fmt, ...) + __attribute__((__format__(__printf__, 1, 2))); extern void domain_strip(char *otherdom, char *localdom); /* * some systems such as DU-4.x have a different GNU flex in /usr/bin diff --git a/contrib/amd/fsinfo/wr_atab.c b/contrib/amd/fsinfo/wr_atab.c index bf6bb40..fcec8ee 100644 --- a/contrib/amd/fsinfo/wr_atab.c +++ b/contrib/amd/fsinfo/wr_atab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_atab.c,v 1.2 1999/01/10 21:54:29 ezk Exp $ + * $Id: wr_atab.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_bparam.c b/contrib/amd/fsinfo/wr_bparam.c index 61956c6..0245799 100644 --- a/contrib/amd/fsinfo/wr_bparam.c +++ b/contrib/amd/fsinfo/wr_bparam.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_bparam.c,v 1.2 1999/01/10 21:54:29 ezk Exp $ + * $Id: wr_bparam.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_dumpset.c b/contrib/amd/fsinfo/wr_dumpset.c index 0428c09..205d55a 100644 --- a/contrib/amd/fsinfo/wr_dumpset.c +++ b/contrib/amd/fsinfo/wr_dumpset.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_dumpset.c,v 1.2 1999/01/10 21:54:30 ezk Exp $ + * $Id: wr_dumpset.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_exportfs.c b/contrib/amd/fsinfo/wr_exportfs.c index 16e18c8..d81c28b 100644 --- a/contrib/amd/fsinfo/wr_exportfs.c +++ b/contrib/amd/fsinfo/wr_exportfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_exportfs.c,v 1.2 1999/01/10 21:54:30 ezk Exp $ + * $Id: wr_exportfs.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $ * */ diff --git a/contrib/amd/fsinfo/wr_fstab.c b/contrib/amd/fsinfo/wr_fstab.c index a63d47d..f618b26 100644 --- a/contrib/amd/fsinfo/wr_fstab.c +++ b/contrib/amd/fsinfo/wr_fstab.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-1999 Erez Zadok + * Copyright (c) 1997-2001 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: wr_fstab.c,v 1.2 1999/01/10 21:54:30 ezk Exp $ + * $Id: wr_fstab.c,v 1.3.2.1 2001/01/10 03:23:35 ezk Exp $ * */ |