Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/dump Add some const.
details: https://anonhg.NetBSD.org/src/rev/c2781cdc7d72
branches: trunk
changeset: 783971:c2781cdc7d72
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jan 13 22:53:01 2013 +0000
description:
Add some const.
diffstat:
sbin/dump/dump.h | 6 +++---
sbin/dump/dumprmt.c | 10 +++++-----
sbin/dump/itime.c | 8 ++++----
sbin/dump/optr.c | 8 ++++----
sbin/dump/tape.c | 12 ++++++------
sbin/dump/unctime.c | 6 +++---
6 files changed, 25 insertions(+), 25 deletions(-)
diffs (216 lines):
diff -r 766ec20a94ed -r c2781cdc7d72 sbin/dump/dump.h
--- a/sbin/dump/dump.h Sun Jan 13 22:08:43 2013 +0000
+++ b/sbin/dump/dump.h Sun Jan 13 22:53:01 2013 +0000
@@ -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 @@
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 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 -r 766ec20a94ed -r c2781cdc7d72 sbin/dump/dumprmt.c
--- a/sbin/dump/dumprmt.c Sun Jan 13 22:08:43 2013 +0000
+++ b/sbin/dump/dumprmt.c Sun Jan 13 22:53:01 2013 +0000
@@ -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 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 @@
}
static int
-okname(char *cp0)
+okname(const char *cp0)
{
- char *cp;
+ const char *cp;
int c;
for (cp = cp0; *cp; cp++) {
diff -r 766ec20a94ed -r c2781cdc7d72 sbin/dump/itime.c
--- a/sbin/dump/itime.c Sun Jan 13 22:08:43 2013 +0000
+++ b/sbin/dump/itime.c Sun Jan 13 22:53:01 2013 +0000
@@ -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 @@
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 @@
}
static int
-makedumpdate(struct dumpdates *ddp, char *tbuf)
+makedumpdate(struct dumpdates *ddp, const char *tbuf)
{
char un_buf[128];
diff -r 766ec20a94ed -r c2781cdc7d72 sbin/dump/optr.c
--- a/sbin/dump/optr.c Sun Jan 13 22:08:43 2013 +0000
+++ b/sbin/dump/optr.c Sun Jan 13 22:53:01 2013 +0000
@@ -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 @@
#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 @@
*/
struct fstab *
-allocfsent(struct fstab *fs)
+allocfsent(const struct fstab *fs)
{
struct fstab *new;
char buf[MAXPATHLEN];
diff -r 766ec20a94ed -r c2781cdc7d72 sbin/dump/tape.c
--- a/sbin/dump/tape.c Sun Jan 13 22:08:43 2013 +0000
+++ b/sbin/dump/tape.c Sun Jan 13 22:53:01 2013 +0000
@@ -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 @@
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 @@
}
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 @@
* 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 -r 766ec20a94ed -r c2781cdc7d72 sbin/dump/unctime.c
--- a/sbin/dump/unctime.c Sun Jan 13 22:08:43 2013 +0000
+++ b/sbin/dump/unctime.c Sun Jan 13 22:53:01 2013 +0000
@@ -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 @@
*/
time_t
-unctime(char *str)
+unctime(const char *str)
{
struct tm then;
Home |
Main Index |
Thread Index |
Old Index