summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaheshvs <none@none>2005-12-07 10:27:58 -0800
committermaheshvs <none@none>2005-12-07 10:27:58 -0800
commitfe0e7ec4d916b05b52d8c7cc8a3e6a1b28e77b6f (patch)
tree0e451d95629dbaf067d470570b98b36098f66011
parent7ee93e3bbce920c0d0742deb6632b0939e30b783 (diff)
downloadillumos-joyent-fe0e7ec4d916b05b52d8c7cc8a3e6a1b28e77b6f.tar.gz
6268975 cmd/backup and gcc don't get along
6271135 gcc and cmd/fs.d/udfs don't get along 6273816 gcc and cmd/rmt don't get along
-rw-r--r--usr/src/cmd/backup/dump/dumpmain.c28
-rw-r--r--usr/src/cmd/backup/dump/dumptape.c80
-rw-r--r--usr/src/cmd/backup/dump/dumpusg.h10
-rw-r--r--usr/src/cmd/backup/dump/lftw.c27
-rw-r--r--usr/src/cmd/backup/lib/getdate.y5
-rw-r--r--usr/src/cmd/backup/lib/rmtlib.c70
-rw-r--r--usr/src/cmd/backup/restore/dirs.c73
-rw-r--r--usr/src/cmd/backup/restore/main.c7
-rw-r--r--usr/src/cmd/backup/restore/restore.h1
-rw-r--r--usr/src/cmd/backup/restore/tape.c108
-rw-r--r--usr/src/cmd/backup/restore/utilities.c85
-rw-r--r--usr/src/cmd/fs.d/udfs/fsck/main.c25
-rw-r--r--usr/src/cmd/fs.d/udfs/fsck/setup.c25
-rw-r--r--usr/src/cmd/fs.d/udfs/fsck/utilities.c40
-rw-r--r--usr/src/cmd/fs.d/udfs/fsdb/fsdb_lex.l12
-rw-r--r--usr/src/cmd/fs.d/udfs/mkfs/mkfs.c8
-rw-r--r--usr/src/cmd/rmt/rmt.c29
17 files changed, 220 insertions, 413 deletions
diff --git a/usr/src/cmd/backup/dump/dumpmain.c b/usr/src/cmd/backup/dump/dumpmain.c
index 1b288a8246..c8d194269e 100644
--- a/usr/src/cmd/backup/dump/dumpmain.c
+++ b/usr/src/cmd/backup/dump/dumpmain.c
@@ -60,9 +60,8 @@ static void nextstate();
extern jmp_buf checkpoint_buf; /* context for return from checkpoint */
#define FUDGE_FACTOR 0x2000000
-main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
char *arg;
int bflag = 0, i, error = 0, saverr;
@@ -1126,14 +1125,13 @@ restart:
if (! doingactive)
putitime();
Exit(X_FINOK);
-#ifdef lint
+
+ /*NOTREACHED*/
return (0);
-#endif
}
void
-sigAbort(sig)
- int sig;
+sigAbort(int sig)
{
char *sigtype;
@@ -1186,8 +1184,7 @@ sigAbort(sig)
/* Note that returned value is malloc'd if != cp && != NULL */
char *
-rawname(cp)
- char *cp;
+rawname(char *cp)
{
struct stat64 st;
char *dp;
@@ -1213,8 +1210,7 @@ rawname(cp)
}
static char *
-mb(blks)
- u_offset_t blks;
+mb(u_offset_t blks)
{
static char buf[16];
@@ -1227,9 +1223,7 @@ mb(blks)
}
#ifdef signal
-void (*nsignal(sig, act))(int)
- int sig;
- void (*act)(int);
+void (*nsignal(int sig, void (*act)(int)))(int)
{
struct sigaction sa, osa;
@@ -1243,8 +1237,7 @@ void (*nsignal(sig, act))(int)
#endif
static void
-nextstate(state)
- int state;
+nextstate(int state)
{
/* LINTED assigned value never used - kept for documentary purposes */
dumpstate = state;
@@ -1266,8 +1259,7 @@ nextstate(state)
* a state of -1 resets everything.
*/
time32_t
-timeclock(state)
- time32_t state;
+timeclock(time32_t state)
{
static int *currentState = NULL;
static struct timeval *clockstart;
diff --git a/usr/src/cmd/backup/dump/dumptape.c b/usr/src/cmd/backup/dump/dumptape.c
index 0d3020fb50..5aa9aae652 100644
--- a/usr/src/cmd/backup/dump/dumptape.c
+++ b/usr/src/cmd/backup/dump/dumptape.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -399,11 +398,7 @@ bufclear()
* systems don't cause dump to consume large amounts of memory.
*/
static pid_t
-#ifdef __STDC__
setuparchive(void)
-#else
-setuparchive()
-#endif
{
struct slaves *slavep;
int cmd[2];
@@ -543,6 +538,7 @@ setuparchive()
}
Exit(X_FINOK);
/* NOTREACHED */
+ return (0);
}
/*
@@ -550,11 +546,7 @@ setuparchive()
* to the output device.
*/
static pid_t
-#ifdef __STDC__
setupwriter(void)
-#else
-setupwriter()
-#endif
{
struct slaves *slavep;
int cmd[2];
@@ -612,6 +604,7 @@ setupwriter()
(void) close(cmd[0]);
Exit(X_FINOK);
/* NOTREACHED */
+ return (0);
}
void
@@ -681,10 +674,7 @@ spclrec()
* Fill appropriate buffer
*/
void
-taprec(dp, flags, size)
- uchar_t *dp;
- int flags;
- int size;
+taprec(uchar_t *dp, int flags, int size)
{
if (size > tp_bsize) {
msg(gettext(
@@ -713,10 +703,7 @@ taprec(dp, flags, size)
}
void
-dmpblk(blkno, size, offset)
- daddr32_t blkno;
- size_t size;
- off_t offset;
+dmpblk(daddr32_t blkno, size_t size, off_t offset)
{
diskaddr_t dblkno;
@@ -734,8 +721,7 @@ dmpblk(blkno, size, offset)
/*ARGSUSED*/
static void
-tperror(sig)
- int sig;
+tperror(int sig)
{
char buf[3000];
@@ -783,9 +769,7 @@ tperror(sig)
* info when it completes a volume.
*/
void
-toslave(fn, inumber)
- void (*fn)();
- ino_t inumber;
+toslave(void (*fn)(), ino_t inumber)
{
int wasactive;
@@ -825,8 +809,7 @@ toslave(fn, inumber)
}
void
-dospcl(inumber)
- ino_t inumber;
+dospcl(ino_t inumber)
{
/* LINTED for now, max inode # is 2**31 (ufs max size is 1TB) */
spcl.c_inumber = (ino32_t)inumber;
@@ -913,8 +896,7 @@ jmp_buf checkpoint_buf;
*/
/*ARGSUSED*/
static void
-rollforward(sig)
- int sig;
+rollforward(int sig)
{
int status;
(void) sighold(SIGUSR1);
@@ -1022,8 +1004,7 @@ rollforward(sig)
}
static void
-nap(ms)
- int ms;
+nap(int ms)
{
struct timeval tv;
@@ -1036,8 +1017,7 @@ static jmp_buf alrm_buf;
/*ARGSUSED*/
static void
-alrm(sig)
- int sig;
+alrm(int sig)
{
longjmp(alrm_buf, 1);
/*NOTREACHED*/
@@ -1103,8 +1083,7 @@ nextdevice()
* make an educated guess.
*/
int
-isrewind(f)
- int f; /* fd, if local device */
+isrewind(int f)
{
struct stat64 sbuf;
char *c;
@@ -1393,8 +1372,7 @@ changevol()
*/
void
-otape(top)
- int top;
+otape(int top)
{
static struct mtget mt;
char buf[3000];
@@ -1789,16 +1767,14 @@ killall()
/*ARGSUSED*/
static void
-proceed(sig)
- int sig;
+proceed(int sig)
{
caught++;
}
/*ARGSUSED*/
static void
-die(sig)
- int sig;
+die(int sig)
{
Exit(X_FINOK);
}
@@ -1972,10 +1948,7 @@ wait_our_turn()
}
static void
-dumpoffline(cmd, next, mynum)
- int cmd;
- pid_t next;
- int mynum;
+dumpoffline(int cmd, pid_t next, int mynum)
{
struct req *p = slaves[mynum].sl_req;
ulong_t i;
@@ -2029,8 +2002,7 @@ static int count; /* tape blocks written since last spclrec */
/*ARGSUSED*/
static void
-onxfsz(sig)
- int sig;
+onxfsz(int sig)
{
msg(gettext("File size limit exceeded writing output volume %d\n"),
tapeno);
@@ -2044,8 +2016,7 @@ static long lastnonaddrm; /* and the mode thereof */
* dowrite -- the main body of the output writer process
*/
static void
-dowrite(cmd)
- int cmd;
+dowrite(int cmd)
{
struct bdesc *last =
&bufp[(NBUF*ntrec)-1]; /* last buffer in pool */
@@ -2268,9 +2239,7 @@ dowrite(cmd)
* special record map.
*/
static void
-checkpoint(bp, cmd)
- struct bdesc *bp;
- int cmd;
+checkpoint(struct bdesc *bp, int cmd)
{
int state, type;
ino_t ino;
@@ -2396,9 +2365,7 @@ checkpoint(bp, cmd)
* loop until the count is satisfied (or error).
*/
static ssize_t
-atomic(func, fd, buf, count)
- int (*func)(), fd, count;
- char *buf;
+atomic(int (*func)(), int fd, char *buf, int count)
{
ssize_t got = 0, need = count;
@@ -2421,8 +2388,7 @@ void
#ifdef __STDC__
positiontape(char *msgbuf)
#else
-positiontape(msgbuf)
- char *msgbuf;
+positiontape(char *msgbuf)
#endif
{
/* Static as never change, no need to waste stack space */
diff --git a/usr/src/cmd/backup/dump/dumpusg.h b/usr/src/cmd/backup/dump/dumpusg.h
index 9bdfd289e0..48ff34a111 100644
--- a/usr/src/cmd/backup/dump/dumpusg.h
+++ b/usr/src/cmd/backup/dump/dumpusg.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _DUMPUSG_H
@@ -82,6 +81,7 @@ extern "C" {
#define sigmask(x) x
#define setreuid(r, e) seteuid(e)
#define statfs statvfs /* both struct and func */
+#undef setjmp
#define setjmp(b) sigsetjmp((b), 1)
#define longjmp siglongjmp
#define jmp_buf sigjmp_buf
diff --git a/usr/src/cmd/backup/dump/lftw.c b/usr/src/cmd/backup/dump/lftw.c
index b5e8f4477b..8dfcf7db70 100644
--- a/usr/src/cmd/backup/dump/lftw.c
+++ b/usr/src/cmd/backup/dump/lftw.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,8 +19,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 1998,2001 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
@@ -106,27 +105,17 @@
static int pwdfd;
-#ifdef __STDC__
static int lf_xftw(
const char *,
int (*)(const char *, const struct stat64 *, int),
int,
int (*)(const char *, struct stat64 *));
-#else
-static int lf_xftw();
-#endif
-#ifdef __STDC__
+int
lf_lftw(
const char *path,
int (*fn)(const char *, const struct stat64 *, int),
int depth)
-#else
-lf_lftw(path, fn, depth)
- char *path;
- int (*fn)();
- int depth;
-#endif
{
int rc;
@@ -147,11 +136,7 @@ lf_xftw(
int depth,
int (*statfn)(const char *, struct stat64 *))
#else
-lf_xftw(path, fn, depth, statfn)
- char *path;
- int (*fn)();
- int depth;
- int (*statfn)();
+lf_xftw(char *path, int (*fn)(), int depth, int (*statfn)())
#endif
{
int n;
diff --git a/usr/src/cmd/backup/lib/getdate.y b/usr/src/cmd/backup/lib/getdate.y
index 187739bdc7..054b5f9589 100644
--- a/usr/src/cmd/backup/lib/getdate.y
+++ b/usr/src/cmd/backup/lib/getdate.y
@@ -1,7 +1,7 @@
%{
/*
- * Copyright (c) 1998 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -509,6 +509,7 @@ ToSeconds(Hours, Minutes, Seconds, Meridian)
return (720L + Minutes) * 60L + Seconds;
}
/* NOTREACHED */
+ return (-1);
}
diff --git a/usr/src/cmd/backup/lib/rmtlib.c b/usr/src/cmd/backup/lib/rmtlib.c
index 2f63049f87..650a8d44d1 100644
--- a/usr/src/cmd/backup/lib/rmtlib.c
+++ b/usr/src/cmd/backup/lib/rmtlib.c
@@ -1,7 +1,7 @@
/*LINTLIBRARY*/
/*PROTOLIB1*/
/*
- * Copyright 1998, 2002-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
@@ -93,18 +93,15 @@ rmtinit(
void (*errexit)(int)) /* exit routine */
#else
void
-rmtinit(errmsg, errexit)
- void (*errmsg)(); /* print routine */
- void (*errexit)(); /* exit routine */
+rmtinit(void (*errmsg)(), void (*errexit)())
#endif
{
print = errmsg;
Exit = errexit;
}
-rmthost(host, blocksize)
- char *host;
- uint_t blocksize; /* in Kbytes per tape block */
+int
+rmthost(char *host, uint_t blocksize)
{
struct sigvec sv;
@@ -142,8 +139,7 @@ rmthost(host, blocksize)
/*ARGSUSED*/
static void
-rmtconnaborted(sig)
- int sig;
+rmtconnaborted(int sig)
{
print(dgettext(domainname, "Lost connection to remote host.\n"));
Exit(1);
@@ -215,8 +211,7 @@ rmtgetconn()
}
static int
-okname(cp0)
- char *cp0;
+okname(char *cp0)
{
char *cp;
uchar_t c;
@@ -232,9 +227,8 @@ okname(cp0)
return (1);
}
-rmtopen(tape, mode)
- char *tape;
- int mode;
+int
+rmtopen(char *tape, int mode)
{
struct mtget mt;
char buf[256];
@@ -277,8 +271,8 @@ rmtclose()
rmtstate = TS_CLOSED;
}
-rmtstatus(mt)
- struct mtget *mt;
+int
+rmtstatus(struct mtget *mt)
{
char *buf = (char *)mt;
int n, i, cc;
@@ -309,8 +303,7 @@ rmtstatus(mt)
}
static int
-rmtstatus_extended(mt)
- struct mtget *mt;
+rmtstatus_extended(struct mtget *mt)
{
if ((mt->mt_type = rmtcall("status", "sT")) == -1)
return (-1);
@@ -324,9 +317,8 @@ rmtstatus_extended(mt)
return (0);
}
-rmtread(buf, count)
- char *buf;
- uint_t count;
+int
+rmtread(char *buf, uint_t count)
{
char line[30];
int n, i, cc;
@@ -354,9 +346,8 @@ rmtread(buf, count)
return (n);
}
-rmtwrite(buf, count)
- char *buf;
- uint_t count;
+int
+rmtwrite(char *buf, uint_t count)
{
int retval;
char line[64]; /* numbers can get big */
@@ -374,9 +365,7 @@ rmtwrite(buf, count)
}
int
-rmtpush(buf, count)
- char *buf;
- uint_t count;
+rmtpush(char *buf, uint_t count)
{
int retval;
@@ -390,8 +379,7 @@ rmtpush(buf, count)
}
int
-rmtseek(offset, pos)
- int offset, pos;
+rmtseek(int offset, int pos)
{
char line[80];
@@ -400,9 +388,7 @@ rmtseek(offset, pos)
}
int
-rmtioctl(cmd, count)
- int cmd;
- long count;
+rmtioctl(int cmd, long count)
{
char buf[256];
int xcmd;
@@ -422,8 +408,7 @@ rmtioctl(cmd, count)
* if possible.
*/
static int
-map_extended_ioctl(cmd)
- int cmd;
+map_extended_ioctl(int cmd)
{
int xcmd;
@@ -451,9 +436,7 @@ map_extended_ioctl(cmd)
}
static int
-rmtioctl_extended(cmd, count)
- int cmd;
- long count;
+rmtioctl_extended(int cmd, long count)
{
char buf[256];
@@ -462,8 +445,7 @@ rmtioctl_extended(cmd, count)
}
static int
-rmtcall(cmd, buf)
- char *cmd, *buf;
+rmtcall(char *cmd, char *buf)
{
if (rmtpush(buf, strlen(buf)) != strlen(buf))
rmtconnaborted(0);
@@ -471,8 +453,7 @@ rmtcall(cmd, buf)
}
static int
-rmtreply(cmd)
- char *cmd;
+rmtreply(char *cmd)
{
char code[30], emsg[BUFSIZ];
@@ -505,9 +486,7 @@ rmtreply(cmd)
}
static void
-rmtgets(cp, len)
- char *cp;
- int len;
+rmtgets(char *cp, int len)
{
int i, n;
@@ -549,8 +528,7 @@ rmtmsg(const char *fmt, ...)
/* VARARGS */
static void
-rmtmsg(va_alist)
- va_dcl
+rmtmsg(va_dcl)
{
va_list args;
char *fmt;
diff --git a/usr/src/cmd/backup/restore/dirs.c b/usr/src/cmd/backup/restore/dirs.c
index 7244c40295..63d96dd770 100644
--- a/usr/src/cmd/backup/restore/dirs.c
+++ b/usr/src/cmd/backup/restore/dirs.c
@@ -113,8 +113,7 @@ static struct inotab *inotablookup();
* directories on the tape.
*/
void
-extractdirs(genmode)
- int genmode;
+extractdirs(int genmode)
{
int ts;
struct dinode *ip;
@@ -224,10 +223,7 @@ skipdirs()
* pname and pass them off to be processed.
*/
void
-treescan(pname, ino, todo)
- char *pname;
- ino_t ino;
- long (*todo)();
+treescan(char *pname, ino_t ino, long (*todo)())
{
struct inotab *itp;
struct direct *dp;
@@ -304,9 +300,7 @@ treescan(pname, ino, todo)
* be extracted.
*/
void
-attrscan(always, todo)
- int always;
- long (*todo)();
+attrscan(int always, long (*todo)())
{
struct inotab *itp;
struct entry *ep, *parent;
@@ -354,8 +348,7 @@ attrscan(always, todo)
* condition it was given to us in.
*/
ino_t
-psearch(n)
- char *n;
+psearch(char *n)
{
char *cp, *cp1;
ino_t ino;
@@ -388,9 +381,7 @@ next:
* looking for entry cp
*/
static ino_t
-search(inum, cp)
- ino_t inum;
- char *cp;
+search(ino_t inum, char *cp)
{
struct direct *dp;
struct inotab *itp;
@@ -413,9 +404,7 @@ search(inum, cp)
* Put the directory entries in the directory file
*/
static void
-putdir(buf, size)
- char *buf;
- size_t size;
+putdir(char *buf, size_t size)
{
struct direct cvtbuf;
struct odirect *odp;
@@ -462,8 +451,7 @@ static int32_t prev = 0;
* add a new directory entry to a file.
*/
static void
-putent(dp)
- struct direct *dp;
+putent(struct direct *dp)
{
/* LINTED DIRSIZ will always fit in a ushort_t */
dp->d_reclen = (ushort_t)DIRSIZ(dp);
@@ -504,9 +492,7 @@ flushent()
}
static void
-dcvt(odp, ndp)
- struct odirect *odp;
- struct direct *ndp;
+dcvt(struct odirect *odp, struct direct *ndp)
{
(void) bzero((char *)ndp, sizeof (*ndp));
@@ -529,8 +515,7 @@ dcvt(odp, ndp)
* Initialize the directory file
*/
static RST_DIR *
-rst_initdirfile(name)
- char *name;
+rst_initdirfile(char *name)
{
RST_DIR *dp;
int fd;
@@ -551,8 +536,7 @@ rst_initdirfile(name)
* Simulate the opening of a directory
*/
RST_DIR *
-rst_opendir(name)
- char *name;
+rst_opendir(char *name)
{
struct inotab *itp;
ino_t ino;
@@ -571,8 +555,7 @@ rst_opendir(name)
* Specifically, the dirp it provided to the caller is malloc'd.
*/
void
-rst_closedir(cdirp)
- RST_DIR *cdirp;
+rst_closedir(RST_DIR *cdirp)
{
if ((cdirp != NULL) && (--(cdirp->dd_refcnt) < 1))
free(cdirp);
@@ -582,8 +565,7 @@ rst_closedir(cdirp)
* return a pointer into a directory
*/
static offset_t
-rst_telldir(tdirp)
- RST_DIR *tdirp;
+rst_telldir(RST_DIR *tdirp)
{
offset_t pos = llseek(tdirp->dd_fd, (offset_t)0, SEEK_CUR);
@@ -603,9 +585,7 @@ rst_telldir(tdirp)
* the desired seek offset into it.
*/
static void
-rst_seekdir(sdirp, loc, base)
- RST_DIR *sdirp;
- offset_t loc, base;
+rst_seekdir(RST_DIR *sdirp, offset_t loc, offset_t base)
{
if (loc == rst_telldir(sdirp))
@@ -624,8 +604,7 @@ rst_seekdir(sdirp, loc, base)
* get next entry in a directory.
*/
struct direct *
-rst_readdir(rdirp)
- RST_DIR *rdirp;
+rst_readdir(RST_DIR *rdirp)
{
struct direct *dp;
@@ -797,9 +776,7 @@ setdirmodes()
}
void
-skipmetadata(f, size)
- FILE *f;
- size_t size;
+skipmetadata(FILE *f, size_t size)
{
/* XXX should we bail if this doesn't work? */
/* LINTED unsigned -> signed conversion ok here */
@@ -809,9 +786,8 @@ skipmetadata(f, size)
/*
* Generate a literal copy of a directory.
*/
-genliteraldir(name, ino)
- char *name;
- ino_t ino;
+int
+genliteraldir(char *name, ino_t ino)
{
struct inotab *itp;
int ofile, dp;
@@ -867,8 +843,8 @@ genliteraldir(name, ino)
/*
* Determine the type of an inode
*/
-inodetype(ino)
- ino_t ino;
+int
+inodetype(ino_t ino)
{
struct inotab *itp;
@@ -883,10 +859,7 @@ inodetype(ino)
* If requested, save its pertinent mode, owner, and time info.
*/
static struct inotab *
-allocinotab(ino, dip, seekpt)
- ino_t ino;
- struct dinode *dip;
- off64_t seekpt;
+allocinotab(ino_t ino, struct dinode *dip, off64_t seekpt)
{
struct inotab *itp;
@@ -939,8 +912,7 @@ nodeflush()
* Look up an inode in the table of directories
*/
static struct inotab *
-inotablookup(ino)
- ino_t ino;
+inotablookup(ino_t ino)
{
struct inotab *itp;
@@ -954,8 +926,7 @@ inotablookup(ino)
* Clean up and exit
*/
void
-done(exitcode)
- int exitcode;
+done(int exitcode)
{
closemt(ALLOW_OFFLINE); /* don't force offline on exit */
if (modefile[0] != '#')
diff --git a/usr/src/cmd/backup/restore/main.c b/usr/src/cmd/backup/restore/main.c
index 9903c4ee04..6d91edfb12 100644
--- a/usr/src/cmd/backup/restore/main.c
+++ b/usr/src/cmd/backup/restore/main.c
@@ -73,9 +73,8 @@ struct byteorder_ctx *byteorder;
static void set_tmpdir(void);
-main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
static struct arglist alist = { 0, 0, 0, 0, 0 };
int count;
@@ -516,9 +515,7 @@ If set, the envar TMPDIR selects where temporary files are kept\n"),
done(0);
/* NOTREACHED */
}
-#ifdef lint
return (0);
-#endif
}
/*
diff --git a/usr/src/cmd/backup/restore/restore.h b/usr/src/cmd/backup/restore/restore.h
index 9b6b5b9dc3..347eb25b35 100644
--- a/usr/src/cmd/backup/restore/restore.h
+++ b/usr/src/cmd/backup/restore/restore.h
@@ -397,6 +397,7 @@ extern int complexcopy();
#define TAPE_FILE 0
#define ARCHIVE_FILE 1
+#undef setjmp
#define setjmp(b) sigsetjmp((b), 1)
#define longjmp siglongjmp
#define jmp_buf sigjmp_buf
diff --git a/usr/src/cmd/backup/restore/tape.c b/usr/src/cmd/backup/restore/tape.c
index 9bee27344e..f2417eafa2 100644
--- a/usr/src/cmd/backup/restore/tape.c
+++ b/usr/src/cmd/backup/restore/tape.c
@@ -75,7 +75,7 @@ static void readtape(char *);
static int checkvol(struct s_spcl *, int);
static void accthdr(struct s_spcl *);
static int ishead(struct s_spcl *);
-static checktype(struct s_spcl *, int);
+static int checktype(struct s_spcl *, int);
static void metaset(char *name);
#else
static int autoload_tape();
@@ -101,9 +101,7 @@ static void metaset();
* Set up an input source
*/
void
-setinput(source, archive)
- char *source;
- char *archive;
+setinput(char *source, char *archive)
{
flsht();
@@ -179,8 +177,7 @@ setinput(source, archive)
}
void
-newtapebuf(size)
- size_t size;
+newtapebuf(size_t size)
{
size_t nsize;
@@ -456,8 +453,7 @@ setupR()
#define FT_STATE_3 3
void
-getvol(nextvol)
- int nextvol;
+getvol(int nextvol)
{
int newvol;
long savecnt, savetapea, wantnext;
@@ -778,8 +774,8 @@ printdumpinfo()
}
}
-extractfile(name)
- char *name;
+int
+extractfile(char *name)
{
static int complained_chown = 0;
static int complained_lchown = 0;
@@ -900,8 +896,7 @@ extractfile(name)
full_dev = (unsigned)(curfile.dip->di_ordev);
}
- if (mknod(rname, mode, full_dev) < 0)
- {
+ if (mknod(rname, mode, full_dev) < 0) {
struct stat64 s[1];
saverr = errno;
@@ -1075,8 +1070,7 @@ skipfile()
* with the blocks
*/
void
-getfile(f1, f2)
- void (*f2)(), (*f1)();
+getfile(void (*f1)(), void (*f2)())
{
int i;
size_t curblk = 0;
@@ -1182,9 +1176,7 @@ loop:
* put the data into the right form and place.
*/
static void
-xtrfile(buf, size)
- char *buf;
- size_t size;
+xtrfile(char *buf, size_t size)
{
if (write(ofile, buf, (size_t)size) == -1) {
int saverr = errno;
@@ -1204,9 +1196,7 @@ xtrfile(buf, size)
/*ARGSUSED*/
static void
-xtrskip(buf, size)
- char *buf;
- size_t size;
+xtrskip(char *buf, size_t size)
{
if (lseek64(ofile, (offset_t)size, 1) == -1) {
int saverr = errno;
@@ -1224,8 +1214,7 @@ static char *metadata = NULL;
static size_t metasize = 0;
static void
-metacheck(head)
- struct s_spcl *head;
+metacheck(struct s_spcl *head)
{
if (! (head->c_flags & DR_HASMETA))
return;
@@ -1239,9 +1228,7 @@ metacheck(head)
}
static void
-xtrmeta(buf, size)
- char *buf;
- size_t size;
+xtrmeta(char *buf, size_t size)
{
if ((metadata == NULL) && ((spcl.c_dinode.di_mode & IFMT) != IFSHAD))
return;
@@ -1256,9 +1243,7 @@ xtrmeta(buf, size)
/* ARGSUSED */
static void
-metaskip(buf, size)
- char *buf;
- size_t size;
+metaskip(char *buf, size_t size)
{
if (metadata == NULL)
return;
@@ -1272,8 +1257,7 @@ metaskip(buf, size)
}
static void
-metaset(name)
- char *name;
+metaset(char *name)
{
if (metadata == NULL)
return;
@@ -1376,9 +1360,7 @@ static struct fsdtypes {
};
void
-metaproc(name, mdata, msize)
- char *name, *mdata;
- size_t msize;
+metaproc(char *name, char *mdata, size_t msize)
{
struct fsdtypes *fsdtype;
ufs_fsd_t *fsd;
@@ -1415,9 +1397,7 @@ metaproc(name, mdata, msize)
}
static void
-xtrlnkfile(buf, size)
- char *buf;
- size_t size;
+xtrlnkfile(char *buf, size_t size)
{
/* LINTED: signed/unsigned mix ok */
pathlen += size;
@@ -1435,9 +1415,7 @@ xtrlnkfile(buf, size)
/*ARGSUSED*/
static void
-xtrlnkskip(buf, size)
- char *buf;
- size_t size;
+xtrlnkskip(char *buf, size_t size)
{
(void) fprintf(stderr,
gettext("unallocated block in symbolic link %s\n"),
@@ -1446,9 +1424,7 @@ xtrlnkskip(buf, size)
}
static void
-xtrmap(buf, size)
- char *buf;
- size_t size;
+xtrmap(char *buf, size_t size)
{
if ((map+size) > endmap) {
int64_t mapsize, increment;
@@ -1497,9 +1473,7 @@ xtrmap(buf, size)
/*ARGSUSED*/
static void
-xtrmapskip(buf, size)
- char *buf;
- size_t size;
+xtrmapskip(char *buf, size_t size)
{
(void) fprintf(stderr, gettext("hole in map\n"));
done(1);
@@ -1507,9 +1481,7 @@ xtrmapskip(buf, size)
/*ARGSUSED*/
void
-null(buf, size)
- char *buf;
- size_t size;
+null(char *buf, size_t size)
{
}
@@ -1518,8 +1490,7 @@ null(buf, size)
* etc..
*/
static void
-readtape(b)
- char *b;
+readtape(char *b)
{
int i;
int rd, newvol;
@@ -1692,8 +1663,7 @@ void
#ifdef __STDC__
findtapeblksize(int arfile)
#else
-findtapeblksize(arfile)
-int arfile;
+findtapeblksize(int arfile)
#endif
{
int i;
@@ -1750,8 +1720,7 @@ void
#ifdef __STDC__
closemt(int mode)
#else
-closemt(mode)
- int mode;
+closemt(int mode)
#endif
{
/*
@@ -1792,9 +1761,7 @@ closemt(mode)
}
static int
-checkvol(b, t)
- struct s_spcl *b;
- int t;
+checkvol(struct s_spcl *b, int t)
{
if (b->c_volume != t)
@@ -1802,8 +1769,8 @@ checkvol(b, t)
return (GOOD);
}
-readhdr(b)
- struct s_spcl *b;
+int
+readhdr(struct s_spcl *b)
{
if (gethead(b) == FAIL) {
@@ -1818,8 +1785,8 @@ readhdr(b)
* read the tape into buf, then return whether or
* or not it is a header block.
*/
-gethead(buf)
- struct s_spcl *buf;
+int
+gethead(struct s_spcl *buf)
{
int i;
union u_ospcl {
@@ -1964,8 +1931,7 @@ gethead(buf)
* Check that a header is where it belongs and predict the next header
*/
static void
-accthdr(header)
- struct s_spcl *header;
+accthdr(struct s_spcl *header)
{
static ino_t previno = (ino_t)(unsigned)-1;
static int prevtype;
@@ -2026,8 +1992,8 @@ newcalc:
/*
* Try to determine which volume a file resides on.
*/
-volnumber(inum)
- ino_t inum;
+int
+volnumber(ino_t inum)
{
int i;
@@ -2045,8 +2011,7 @@ volnumber(inum)
* pointers into it.
*/
void
-findinode(header)
- struct s_spcl *header;
+findinode(struct s_spcl *header)
{
long skipcnt = 0;
int i;
@@ -2112,8 +2077,7 @@ findinode(header)
* return whether or not the buffer contains a header block
*/
static int
-ishead(buf)
- struct s_spcl *buf;
+ishead(struct s_spcl *buf)
{
if (buf->c_magic !=
((tp_bsize == TP_BSIZE_MIN) ? NFS_MAGIC : MTB_MAGIC))
@@ -2121,10 +2085,8 @@ ishead(buf)
return (GOOD);
}
-static
-checktype(b, t)
- struct s_spcl *b;
- int t;
+static int
+checktype(struct s_spcl *b, int t)
{
if (b->c_type != t)
return (FAIL);
diff --git a/usr/src/cmd/backup/restore/utilities.c b/usr/src/cmd/backup/restore/utilities.c
index c81113001f..2bd4f757b1 100644
--- a/usr/src/cmd/backup/restore/utilities.c
+++ b/usr/src/cmd/backup/restore/utilities.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,8 +29,7 @@
* input arguments, so a double NULL needs to be added to each name.
*/
void
-pathcheck(name)
- char *name;
+pathcheck(char *name)
{
char *cp, save;
struct entry *ep;
@@ -61,8 +60,7 @@ pathcheck(name)
* Change a name to a unique temporary name.
*/
void
-mktempname(ep)
- struct entry *ep;
+mktempname(struct entry *ep)
{
char *newname;
@@ -82,8 +80,7 @@ mktempname(ep)
* Generate a temporary name for an entry.
*/
char *
-gentempname(ep)
- struct entry *ep;
+gentempname(struct entry *ep)
{
static char name[MAXPATHLEN];
struct entry *np;
@@ -101,9 +98,7 @@ gentempname(ep)
* Rename a file or directory.
*/
void
-renameit(fp, tp)
- char *fp;
- char *tp;
+renameit(char *fp, char *tp)
{
int fromfd, tofd;
char *from, *to;
@@ -149,8 +144,7 @@ renameit(fp, tp)
* operating in attribute space.
*/
void
-newnode(np)
- struct entry *np;
+newnode(struct entry *np)
{
char *cp;
int dfd;
@@ -190,8 +184,7 @@ newnode(np)
* for explanation of fchdir() use below.
*/
void
-removenode(ep)
- struct entry *ep;
+removenode(struct entry *ep)
{
char *cp;
int dfd;
@@ -234,8 +227,7 @@ removenode(ep)
* Remove a leaf.
*/
void
-removeleaf(ep)
- struct entry *ep;
+removeleaf(struct entry *ep)
{
char *cp;
int dfd;
@@ -265,9 +257,8 @@ removeleaf(ep)
* for the link file to be created (i.e., we have "fchdir-ed"
* into attribute space already if this is an attribute link).
*/
-lf_linkit(existing, new, type)
- char *existing, *new;
- int type;
+int
+lf_linkit(char *existing, char *new, int type)
{
char linkbuf[MAXPATHLEN];
struct stat64 s1[1], s2[1];
@@ -349,8 +340,7 @@ out:
* Caller knows that a return value of maxino means there's nothing left.
*/
ino_t
-lowerbnd(start)
- ino_t start;
+lowerbnd(ino_t start)
{
struct entry *ep;
@@ -368,8 +358,7 @@ lowerbnd(start)
* Find highest-numbered inode (below "start") that needs to be extracted.
*/
ino_t
-upperbnd(start)
- ino_t start;
+upperbnd(ino_t start)
{
struct entry *ep;
@@ -387,9 +376,7 @@ upperbnd(start)
* report on a badly formed entry
*/
void
-badentry(ep, msg)
- struct entry *ep;
- char *msg;
+badentry(struct entry *ep, char *msg)
{
(void) fprintf(stderr, gettext("bad entry: %s\n"), msg);
@@ -422,8 +409,7 @@ badentry(ep, msg)
* Construct a string indicating the active flag bits of an entry.
*/
char *
-flagvalues(ep)
- struct entry *ep;
+flagvalues(struct entry *ep)
{
static char flagbuf[BUFSIZ];
@@ -453,8 +439,7 @@ flagvalues(ep)
* Check to see if a name is on a dump tape.
*/
ino_t
-dirlookup(name)
- char *name;
+dirlookup(char *name)
{
ino_t ino;
@@ -467,8 +452,8 @@ dirlookup(name)
/*
* Elicit a reply.
*/
-reply(question)
- char *question;
+int
+reply(char *question)
{
char *yesorno = gettext("yn"); /* must be two characters, "yes" first */
int c;
@@ -524,8 +509,7 @@ panic(const char *msg, ...)
/* VARARGS1 */
void
-panic(va_alist)
- va_dcl
+panic(va_dcl)
{
va_list args;
char *msg;
@@ -545,8 +529,7 @@ panic(va_alist)
* Locale-specific version of ctime
*/
char *
-lctime(tp)
- time_t *tp;
+lctime(time_t *tp)
{
static char buf[256];
struct tm *tm;
@@ -805,10 +788,7 @@ safe_fopen(const char *filename, const char *smode, int perms)
* Read the contents of a directory.
*/
int
-mkentry(name, ino, ap)
- char *name;
- ino_t ino;
- struct arglist *ap;
+mkentry(char *name, ino_t ino, struct arglist *ap)
{
struct afile *fp;
@@ -870,10 +850,7 @@ static int addg();
* Our caller guarantees that "as" is at least the string ".".
*/
int
-expand(as, rflg, ap)
- char *as;
- int rflg;
- struct arglist *ap;
+expand(char *as, int rflg, struct arglist *ap)
{
int count, size;
char dir = 0;
@@ -987,9 +964,7 @@ expand(as, rflg, ap)
* Check for a name match
*/
static int
-gmatch(s, p)
- wchar_t *s; /* string to test */
- wchar_t *p; /* pattern to match against */
+gmatch(wchar_t *s, wchar_t *p)
{
long scc; /* source character to text */
wchar_t c; /* pattern character to match */
@@ -1060,11 +1035,7 @@ gmatch(s, p)
* Construct a matched name.
*/
static int
-addg(dp, as1, as3, ap)
- struct direct *dp; /* The directory containing the name */
- char *as1; /* The current directory */
- char *as3; /* The file name in dp */
- struct arglist *ap; /* Where to append the new name */
+addg(struct direct *dp, char *as1, char *as3, struct arglist *ap)
{
char *s1, *s2, *limit;
int c;
@@ -1125,10 +1096,7 @@ addg(dp, as1, as3, ap)
* paths.
*/
void
-resolve(path, fd, rpath)
- char *path;
- int *fd;
- char **rpath;
+resolve(char *path, int *fd, char **rpath)
{
int tfd;
@@ -1160,10 +1128,7 @@ resolve(path, fd, rpath)
* up to (but not including) the final NULL.
*/
int
-complexcpy(s1, s2, max)
- char *s1;
- char *s2;
- int max;
+complexcpy(char *s1, char *s2, int max)
{
int nullseen = 0;
int len = 0;
diff --git a/usr/src/cmd/fs.d/udfs/fsck/main.c b/usr/src/cmd/fs.d/udfs/fsck/main.c
index d4d661d79a..c8a6791bfc 100644
--- a/usr/src/cmd/fs.d/udfs/fsck/main.c
+++ b/usr/src/cmd/fs.d/udfs/fsck/main.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -87,10 +87,8 @@ static char *subopts [] = {
uint32_t ecma_version = 2;
-void
-main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int c;
char *suboptions, *value;
@@ -200,12 +198,12 @@ main(argc, argv)
}
exit(exitstat);
}
+ return (0);
}
static void
-checkfilesys(filesys)
- char *filesys;
+checkfilesys(char *filesys)
{
char *devstr;
@@ -285,8 +283,7 @@ checkfilesys(filesys)
*/
static void
-check_sanity(filename)
-char *filename;
+check_sanity(char *filename)
{
struct stat stbd, stbr;
struct ustat usb;
@@ -370,8 +367,7 @@ char *filename;
}
char *
-unrawname(name)
- char *name;
+unrawname(char *name)
{
char *dp;
@@ -382,8 +378,7 @@ unrawname(name)
}
char *
-rawname(name)
- char *name;
+rawname(char *name)
{
char *dp;
@@ -393,9 +388,7 @@ rawname(name)
}
char *
-hasvfsopt(vfs, opt)
- register struct vfstab *vfs;
- register char *opt;
+hasvfsopt(struct vfstab *vfs, char *opt)
{
char *f, *opts;
static char *tmpopts;
diff --git a/usr/src/cmd/fs.d/udfs/fsck/setup.c b/usr/src/cmd/fs.d/udfs/fsck/setup.c
index 03bb3c7b6f..c66d2545b3 100644
--- a/usr/src/cmd/fs.d/udfs/fsck/setup.c
+++ b/usr/src/cmd/fs.d/udfs/fsck/setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -81,8 +81,7 @@ char *res_vdbuf; /* buffer for reserved volume sequence */
int serialnum = -1; /* set from primary volume descriptor */
char *
-setup(dev)
- char *dev;
+setup(char *dev)
{
dev_t rootdev;
struct stat statb;
@@ -256,35 +255,35 @@ badsb:
return (0);
}
-static
+static int
check_pri_vol_desc(struct tag *tp)
{
pvolp = (struct pri_vol_desc *)tp;
return (0);
}
-static
+static int
check_avdp(struct tag *tp)
{
avdp = (struct anch_vol_desc_ptr *)tp;
return (0);
}
-static
+static int
check_vdp(struct tag *tp)
{
volp = (struct vdp_desc *)tp;
return (0);
}
-static
+static int
check_iuvd(struct tag *tp)
{
iudp = (struct iuvd_desc *)tp;
return (0);
}
-static
+static int
check_part_desc(struct tag *tp)
{
partp = (struct part_desc *)tp;
@@ -298,14 +297,14 @@ check_part_desc(struct tag *tp)
return (0);
}
-static
+static int
check_log_desc(struct tag *tp)
{
logvp = (struct log_vol_desc *)tp;
return (0);
}
-static
+static int
check_unall_desc(struct tag *tp)
{
unallp = (struct unall_desc *)tp;
@@ -313,13 +312,13 @@ check_unall_desc(struct tag *tp)
}
/* ARGSUSED */
-static
+static int
check_term_desc(struct tag *tp)
{
return (0);
}
-static
+static int
check_lvint(struct tag *tp)
{
/* LINTED */
@@ -346,7 +345,7 @@ dump16(char *cp, char *nl)
* Read in the super block and its summary info.
*/
/* ARGSUSED */
-static
+static int
readvolseq(int32_t listerr)
{
struct tag *tp;
diff --git a/usr/src/cmd/fs.d/udfs/fsck/utilities.c b/usr/src/cmd/fs.d/udfs/fsck/utilities.c
index 55b3edfde4..c39845c7b3 100644
--- a/usr/src/cmd/fs.d/udfs/fsck/utilities.c
+++ b/usr/src/cmd/fs.d/udfs/fsck/utilities.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +32,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include <stdarg.h>
#include <fcntl.h>
#include <string.h>
#include <strings.h>
@@ -64,7 +65,7 @@ void flush(int32_t, struct bufarea *);
int32_t bread(int32_t, char *, daddr_t, long);
void bwrite(int, char *, daddr_t, long);
static int32_t getline(FILE *, char *, int32_t);
-
+void errexit(char *, ...) __NORETURN;
static long diskreads, totalreads; /* Disk cache statistics */
offset_t llseek();
extern unsigned int largefile_count;
@@ -75,20 +76,22 @@ extern unsigned int largefile_count;
*/
/* VARARGS1 */
void
-pfatal(s, a1, a2, a3)
- char *s;
+pfatal(char *fmt, ...)
{
-
+ va_list args;
+ va_start(args, fmt);
if (preen) {
(void) printf("%s: ", devname);
- (void) printf(s, a1, a2, a3);
+ (void) vprintf(fmt, args);
(void) printf("\n");
(void) printf(
gettext("%s: UNEXPECTED INCONSISTENCY; RUN fsck "
"MANUALLY.\n"), devname);
+ va_end(args);
exit(36);
}
- (void) printf(s, a1, a2, a3);
+ (void) vprintf(fmt, args);
+ va_end(args);
}
/*
@@ -97,22 +100,25 @@ pfatal(s, a1, a2, a3)
*/
/* VARARGS1 */
void
-pwarn(s, a1, a2, a3, a4, a5, a6)
- char *s;
+pwarn(char *fmt, ...)
{
-
+ va_list args;
+ va_start(args, fmt);
if (preen)
(void) printf("%s: ", devname);
- (void) printf(s, a1, a2, a3, a4, a5, a6);
+ (void) vprintf(fmt, args);
+ va_end(args);
}
/* VARARGS1 */
void
-errexit(s1, s2, s3, s4)
- char *s1;
+errexit(char *fmt, ...)
{
- (void) printf(s1, s2, s3, s4);
+ va_list args;
+ va_start(args, fmt);
+ (void) vprintf(fmt, args);
+ va_end(args);
exit(39);
}
@@ -228,7 +234,7 @@ reply(char *question)
int32_t
getline(FILE *fp, char *loc, int32_t maxlen)
{
- register n;
+ int n;
register char *p, *lastloc;
p = loc;
@@ -452,7 +458,7 @@ catch()
void
catchquit()
{
- extern returntosingle;
+ extern int returntosingle;
(void) printf(gettext("returning to single-user after filesystem "
"check\n"));
@@ -502,6 +508,7 @@ dofix(struct inodesc *idesc, char *msg)
* Since we do not believe /etc/mnttab, we stat the mount point
* to see if it is really looks mounted.
*/
+int
mounted(char *name)
{
int found = 0;
@@ -545,6 +552,7 @@ mounted(char *name)
* Check to see if name corresponds to an entry in vfstab, and that the entry
* does not have option ro.
*/
+int
writable(char *name)
{
int rw = 1;
diff --git a/usr/src/cmd/fs.d/udfs/fsdb/fsdb_lex.l b/usr/src/cmd/fs.d/udfs/fsdb/fsdb_lex.l
index d49c7d9046..0797926fa7 100644
--- a/usr/src/cmd/fs.d/udfs/fsdb/fsdb_lex.l
+++ b/usr/src/cmd/fs.d/udfs/fsdb/fsdb_lex.l
@@ -3,9 +3,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,8 +19,8 @@
*
* CDDL HEADER END
*
- * Copyright (c) 1999 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -29,7 +28,7 @@
#include <locale.h>
#include "y.tab.h"
-extern base;
+extern int base;
int cmd_no = 1;
@@ -128,6 +127,7 @@ WS [ \t]
%%
+void
yyerror()
{
fprintf(stderr,
diff --git a/usr/src/cmd/fs.d/udfs/mkfs/mkfs.c b/usr/src/cmd/fs.d/udfs/mkfs/mkfs.c
index 00ffca3e48..ee228a3c3a 100644
--- a/usr/src/cmd/fs.d/udfs/mkfs/mkfs.c
+++ b/usr/src/cmd/fs.d/udfs/mkfs/mkfs.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2000 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -177,6 +176,7 @@ static uint32_t filesetblock;
static uint32_t oldfssize;
static char *oldlabel;
+int
main(int32_t argc, int8_t *argv[])
{
long i;
diff --git a/usr/src/cmd/rmt/rmt.c b/usr/src/cmd/rmt/rmt.c
index b5121f2c12..36d567eca6 100644
--- a/usr/src/cmd/rmt/rmt.c
+++ b/usr/src/cmd/rmt/rmt.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -140,8 +139,7 @@ static void checkbuf();
#endif
static void
-catch(sig)
- int sig;
+catch(int sig)
{
switch (sig) {
default: return;
@@ -153,9 +151,8 @@ catch(sig)
longjmp(sjbuf, 1);
}
-main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
struct sigaction sa;
pid_t parent = getpid(), next = parent;
@@ -461,16 +458,11 @@ main(argc, argv)
(void) sigsuspend(&cmdmask);
}
(void) kill(next, RECV);
- exit(0);
-#ifdef lint
return (0);
-#endif
}
static void
-respond(rval, Errno)
- offset_t rval;
- int Errno;
+respond(offset_t rval, int Errno)
{
char resp[SSIZE];
char *errstr = strerror(Errno);
@@ -487,9 +479,7 @@ respond(rval, Errno)
}
static void
-getstring(cp, size)
- char *cp;
- size_t size;
+getstring(char *cp, size_t size)
{
char *limit = cp + size - 1;
@@ -503,8 +493,7 @@ getstring(cp, size)
}
static void
-checkbuf(size)
- size_t size;
+checkbuf(size_t size)
{
if (size <= maxrecsize)
return;