diff options
| author | dholland <dholland@NetBSD.org> | 2013-01-13 22:53:01 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2013-01-13 22:53:01 +0000 |
| commit | b8ac93563a60572748b562ccdaced54327ba6b26 (patch) | |
| tree | 54b770511fc0f263a639140185846194d5a2ae2c /sbin/dump | |
| parent | e81b3aee3ec577792b80ce649a843c689e73c45f (diff) | |
Add some const.
Diffstat (limited to 'sbin/dump')
| -rw-r--r-- | sbin/dump/dump.h | 6 | ||||
| -rw-r--r-- | sbin/dump/dumprmt.c | 10 | ||||
| -rw-r--r-- | sbin/dump/itime.c | 8 | ||||
| -rw-r--r-- | sbin/dump/optr.c | 8 | ||||
| -rw-r--r-- | sbin/dump/tape.c | 12 | ||||
| -rw-r--r-- | sbin/dump/unctime.c | 6 |
6 files changed, 25 insertions, 25 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h index 28b11cfdefd..5675b259da2 100644 --- a/sbin/dump/dump.h +++ b/sbin/dump/dump.h @@ -1,4 +1,4 @@ -/* $NetBSD: dump.h,v 1.47 2012/05/05 21:03:02 christos Exp $ */ +/* $NetBSD: dump.h,v 1.48 2013/01/13 22:53:01 dholland Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -182,7 +182,7 @@ void quit(const char *fmt, ...) __attribute__((__format__(__printf__,1,2))); time_t do_stats(void); void statussig(int); void timeest(void); -time_t unctime(char *); +time_t unctime(const char *); /* mapping routines */ union dinode; @@ -212,7 +212,7 @@ void close_rewind(void); void dumpblock(daddr_t, int); void startnewtape(int); void trewind(int); -void writerec(char *, int); +void writerec(const char *, int); void Exit(int); void dumpabort(int); diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index a494d69e776..fe0278494e4 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dumprmt.c,v 1.34 2011/08/29 14:34:59 joerg Exp $ */ +/* $NetBSD: dumprmt.c,v 1.35 2013/01/13 22:53:01 dholland Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: dumprmt.c,v 1.34 2011/08/29 14:34:59 joerg Exp $"); +__RCSID("$NetBSD: dumprmt.c,v 1.35 2013/01/13 22:53:01 dholland Exp $"); #endif #endif /* not lint */ @@ -73,7 +73,7 @@ static int rmtstate = TS_CLOSED; static int rmtape; static char *rmtpeer; -static int okname(char *); +static int okname(const char *); static int rmtcall(const char *, const char *, int); __dead static void rmtconnaborted(int); static int rmtgetb(void); @@ -157,9 +157,9 @@ rmtgetconn(void) } static int -okname(char *cp0) +okname(const char *cp0) { - char *cp; + const char *cp; int c; for (cp = cp0; *cp; cp++) { diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index 5cda70436e5..d383bfcf52e 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -1,4 +1,4 @@ -/* $NetBSD: itime.c,v 1.18 2010/03/11 01:32:59 christos Exp $ */ +/* $NetBSD: itime.c,v 1.19 2013/01/13 22:53:01 dholland Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #else -__RCSID("$NetBSD: itime.c,v 1.18 2010/03/11 01:32:59 christos Exp $"); +__RCSID("$NetBSD: itime.c,v 1.19 2013/01/13 22:53:01 dholland Exp $"); #endif #endif /* not lint */ @@ -65,7 +65,7 @@ int nddates = 0; static void dumprecout(FILE *, struct dumpdates *); static int getrecord(FILE *, struct dumpdates *); -static int makedumpdate(struct dumpdates *, char *); +static int makedumpdate(struct dumpdates *, const char *); static void readdumptimes(FILE *); void @@ -256,7 +256,7 @@ getrecord(FILE *df, struct dumpdates *ddatep) } static int -makedumpdate(struct dumpdates *ddp, char *tbuf) +makedumpdate(struct dumpdates *ddp, const char *tbuf) { char un_buf[128]; diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 497f41ecc5d..c4fbe504366 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -1,4 +1,4 @@ -/* $NetBSD: optr.c,v 1.38 2012/04/07 16:44:10 christos Exp $ */ +/* $NetBSD: optr.c,v 1.39 2013/01/13 22:53:01 dholland Exp $ */ /*- * Copyright (c) 1980, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #else -__RCSID("$NetBSD: optr.c,v 1.38 2012/04/07 16:44:10 christos Exp $"); +__RCSID("$NetBSD: optr.c,v 1.39 2013/01/13 22:53:01 dholland Exp $"); #endif #endif /* not lint */ @@ -64,7 +64,7 @@ __RCSID("$NetBSD: optr.c,v 1.38 2012/04/07 16:44:10 christos Exp $"); #include "pathnames.h" void alarmcatch(int); -struct fstab *allocfsent(struct fstab *); +struct fstab *allocfsent(const struct fstab *); int datesort(const void *, const void *); extern char *time_string; extern char default_time_string[]; @@ -319,7 +319,7 @@ quit(const char *fmt, ...) */ struct fstab * -allocfsent(struct fstab *fs) +allocfsent(const struct fstab *fs) { struct fstab *new; char buf[MAXPATHLEN]; diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index 9a25e1993be..437f028a450 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -1,4 +1,4 @@ -/* $NetBSD: tape.c,v 1.50 2011/09/16 16:13:17 plunky Exp $ */ +/* $NetBSD: tape.c,v 1.51 2013/01/13 22:53:01 dholland Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: tape.c,v 1.50 2011/09/16 16:13:17 plunky Exp $"); +__RCSID("$NetBSD: tape.c,v 1.51 2013/01/13 22:53:01 dholland Exp $"); #endif #endif /* not lint */ @@ -71,7 +71,7 @@ extern const char *host; char *nexttape; static ssize_t atomic_read(int, char *, int); -static ssize_t atomic_write(int, char *, int); +static ssize_t atomic_write(int, const char *, int); static void doslave(int, int); static void enslave(void); static void flushtape(void); @@ -157,12 +157,12 @@ alloctape(void) } void -writerec(char *dp, int isspcl) +writerec(const char *dp, int isspcl) { slp->req[trecno].dblk = (daddr_t)0; slp->req[trecno].count = 1; - *(union u_spcl *)(*(nextblock)++) = *(union u_spcl *)dp; + *(union u_spcl *)(*(nextblock)++) = *(const union u_spcl *)dp; if (isspcl) lastspclrec = iswap64(spcl.c_tapea); trecno++; @@ -948,7 +948,7 @@ atomic_read(int fd, char *buf, int count) * loop until the count is satisfied (or error). */ static ssize_t -atomic_write(int fd, char *buf, int count) +atomic_write(int fd, const char *buf, int count) { ssize_t got, need = count; diff --git a/sbin/dump/unctime.c b/sbin/dump/unctime.c index 62559a573e3..59a1f747e4e 100644 --- a/sbin/dump/unctime.c +++ b/sbin/dump/unctime.c @@ -1,4 +1,4 @@ -/* $NetBSD: unctime.c,v 1.15 2003/08/07 10:04:15 agc Exp $ */ +/* $NetBSD: unctime.c,v 1.16 2013/01/13 22:53:01 dholland Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94"; #else -__RCSID("$NetBSD: unctime.c,v 1.15 2003/08/07 10:04:15 agc Exp $"); +__RCSID("$NetBSD: unctime.c,v 1.16 2013/01/13 22:53:01 dholland Exp $"); #endif #endif /* not lint */ @@ -51,7 +51,7 @@ __RCSID("$NetBSD: unctime.c,v 1.15 2003/08/07 10:04:15 agc Exp $"); */ time_t -unctime(char *str) +unctime(const char *str) { struct tm then; |
