Module Name:    src
Committed By:   dholland
Date:           Sun Jan 13 22:53:01 UTC 2013

Modified Files:
        src/sbin/dump: dump.h dumprmt.c itime.c optr.c tape.c unctime.c

Log Message:
Add some const.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sbin/dump/dump.h
cvs rdiff -u -r1.34 -r1.35 src/sbin/dump/dumprmt.c
cvs rdiff -u -r1.18 -r1.19 src/sbin/dump/itime.c
cvs rdiff -u -r1.38 -r1.39 src/sbin/dump/optr.c
cvs rdiff -u -r1.50 -r1.51 src/sbin/dump/tape.c
cvs rdiff -u -r1.15 -r1.16 src/sbin/dump/unctime.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/dump/dump.h
diff -u src/sbin/dump/dump.h:1.47 src/sbin/dump/dump.h:1.48
--- src/sbin/dump/dump.h:1.47	Sat May  5 21:03:02 2012
+++ src/sbin/dump/dump.h	Sun Jan 13 22:53:01 2013
@@ -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, ...) __attrib
 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);

Index: src/sbin/dump/dumprmt.c
diff -u src/sbin/dump/dumprmt.c:1.34 src/sbin/dump/dumprmt.c:1.35
--- src/sbin/dump/dumprmt.c:1.34	Mon Aug 29 14:34:59 2011
+++ src/sbin/dump/dumprmt.c	Sun Jan 13 22:53:01 2013
@@ -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++) {

Index: src/sbin/dump/itime.c
diff -u src/sbin/dump/itime.c:1.18 src/sbin/dump/itime.c:1.19
--- src/sbin/dump/itime.c:1.18	Thu Mar 11 01:32:59 2010
+++ src/sbin/dump/itime.c	Sun Jan 13 22:53:01 2013
@@ -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 *dd
 }
 
 static int
-makedumpdate(struct dumpdates *ddp, char *tbuf)
+makedumpdate(struct dumpdates *ddp, const char *tbuf)
 {
 	char un_buf[128];
 

Index: src/sbin/dump/optr.c
diff -u src/sbin/dump/optr.c:1.38 src/sbin/dump/optr.c:1.39
--- src/sbin/dump/optr.c:1.38	Sat Apr  7 16:44:10 2012
+++ src/sbin/dump/optr.c	Sun Jan 13 22:53:01 2013
@@ -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/
 #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];

Index: src/sbin/dump/tape.c
diff -u src/sbin/dump/tape.c:1.50 src/sbin/dump/tape.c:1.51
--- src/sbin/dump/tape.c:1.50	Fri Sep 16 16:13:17 2011
+++ src/sbin/dump/tape.c	Sun Jan 13 22:53:01 2013
@@ -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;
 

Index: src/sbin/dump/unctime.c
diff -u src/sbin/dump/unctime.c:1.15 src/sbin/dump/unctime.c:1.16
--- src/sbin/dump/unctime.c:1.15	Thu Aug  7 10:04:15 2003
+++ src/sbin/dump/unctime.c	Sun Jan 13 22:53:01 2013
@@ -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/
  */
 
 time_t
-unctime(char *str)
+unctime(const char *str)
 {
 	struct tm then;
 

Reply via email to