diff options
author | dillon <dillon@FreeBSD.org> | 2002-01-19 23:20:02 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2002-01-19 23:20:02 +0000 |
commit | c3dbbbabdf7c1b6b8d7fe43ade44b555671e1c67 (patch) | |
tree | 262f00c422f3272c4031c870d746ed14c2f757d5 /sbin | |
parent | 6f44d9644f580c480b97e8c64ced8a7be849944e (diff) | |
download | FreeBSD-src-c3dbbbabdf7c1b6b8d7fe43ade44b555671e1c67.zip FreeBSD-src-c3dbbbabdf7c1b6b8d7fe43ade44b555671e1c67.tar.gz |
I've been meaning to do this for a while. Add an underscore to the
time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard. They will eventually be replaced when a real standard
comes out of committee.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dump/itime.c | 8 | ||||
-rw-r--r-- | sbin/dump/main.c | 6 | ||||
-rw-r--r-- | sbin/ip6fw/ip6fw.c | 2 | ||||
-rw-r--r-- | sbin/ipfw/ipfw.c | 2 | ||||
-rw-r--r-- | sbin/restore/tape.c | 18 |
5 files changed, 18 insertions, 18 deletions
diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index 3b622b2..dda11fa 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -155,9 +155,9 @@ getdumptime() continue; if (ddp->dd_level >= level) continue; - if (ddp->dd_ddate <= time32_to_time(spcl.c_ddate)) + if (ddp->dd_ddate <= _time32_to_time(spcl.c_ddate)) continue; - spcl.c_ddate = time_to_time32(ddp->dd_ddate); + spcl.c_ddate = _time_to_time32(ddp->dd_ddate); lastlevel = ddp->dd_level; } } @@ -205,7 +205,7 @@ putdumptime() found: (void) strncpy(dtwalk->dd_name, fname, sizeof (dtwalk->dd_name)); dtwalk->dd_level = level; - dtwalk->dd_ddate = time32_to_time(spcl.c_date); + dtwalk->dd_ddate = _time32_to_time(spcl.c_date); ITITERATE(i, dtwalk) { dumprecout(df, dtwalk); @@ -218,7 +218,7 @@ putdumptime() if (spcl.c_date == 0) { tmsg = "the epoch\n"; } else { - time_t t = time32_to_time(spcl.c_date); + time_t t = _time32_to_time(spcl.c_date); tmsg = ctime(&t); } msg("level %c dump on %s", level, tmsg); diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 9cc8a7e..392fa70 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -103,7 +103,7 @@ main(argc, argv) char *tmsg; time_t t; - spcl.c_date = time_to_time32(time(NULL)); + spcl.c_date = _time_to_time32(time(NULL)); tsize = 0; /* Default later, based on 'c' option for cart tapes */ if ((tape = getenv("TAPE")) == NULL) @@ -312,14 +312,14 @@ main(argc, argv) if (spcl.c_date == 0) { tmsg = "the epoch\n"; } else { - time_t t = time32_to_time(spcl.c_date); + time_t t = _time32_to_time(spcl.c_date); tmsg = ctime(&t); } msg("Date of this level %c dump: %s", level, tmsg); if (spcl.c_ddate == 0) { tmsg = "the epoch\n"; } else { - time_t t = time32_to_time(spcl.c_ddate); + time_t t = _time32_to_time(spcl.c_ddate); tmsg = ctime(&t); } msg("Date of last level %c dump: %s", lastlevel, tmsg); diff --git a/sbin/ip6fw/ip6fw.c b/sbin/ip6fw/ip6fw.c index 148dcdb..28d5d7a 100644 --- a/sbin/ip6fw/ip6fw.c +++ b/sbin/ip6fw/ip6fw.c @@ -207,7 +207,7 @@ show_ip6fw(struct ip6_fw *chain) if (chain->timestamp) { char timestr[30]; - time_t t = long_to_time(chain->timestamp); + time_t t = _long_to_time(chain->timestamp); strcpy(timestr, ctime(&t)); *strchr(timestr, '\n') = '\0'; diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index f936a66..08726bb 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -202,7 +202,7 @@ show_ipfw(struct ip_fw *chain) if (do_time) { if (chain->timestamp) { char timestr[30]; - time_t t = long_to_time(chain->timestamp); + time_t t = _long_to_time(chain->timestamp); strcpy(timestr, ctime(&t)); *strchr(timestr, '\n') = '\0'; diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 9be7d43..88520b5 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -232,8 +232,8 @@ setup() } if (vflag || command == 't') printdumpinfo(); - dumptime = time32_to_time(spcl.c_ddate); - dumpdate = time32_to_time(spcl.c_date); + dumptime = _time32_to_time(spcl.c_ddate); + dumpdate = _time32_to_time(spcl.c_date); if (stat(".", &stbuf) < 0) { fprintf(stderr, "cannot stat .: %s\n", strerror(errno)); done(1); @@ -404,9 +404,9 @@ gethdr: volno = 0; goto again; } - if (time32_to_time(tmpbuf.c_date) != dumpdate || - time32_to_time(tmpbuf.c_ddate) != dumptime) { - time_t t = time32_to_time(tmpbuf.c_date); + if (_time32_to_time(tmpbuf.c_date) != dumpdate || + _time32_to_time(tmpbuf.c_ddate) != dumptime) { + time_t t = _time32_to_time(tmpbuf.c_date); fprintf(stderr, "Wrong dump date\n\tgot: %s", ctime(&t)); fprintf(stderr, "\twanted: %s", ctime(&dumpdate)); volno = 0; @@ -510,9 +510,9 @@ void printdumpinfo() { time_t t; - t = time32_to_time(spcl.c_date); + t = _time32_to_time(spcl.c_date); fprintf(stdout, "Dump date: %s", ctime(&t)); - t = time32_to_time(spcl.c_ddate); + t = _time32_to_time(spcl.c_ddate); fprintf(stdout, "Dumped from: %s", (spcl.c_ddate == 0) ? "the epoch\n" : ctime(&t)); if (spcl.c_host[0] == '\0') @@ -1231,7 +1231,7 @@ findinode(header) if (header->c_magic != NFS_MAGIC) { skipcnt++; while (gethead(header) == FAIL || - time32_to_time(header->c_date) != dumpdate) + _time32_to_time(header->c_date) != dumpdate) skipcnt++; } switch (header->c_type) { @@ -1244,7 +1244,7 @@ findinode(header) if (header->c_addr[i]) readtape(buf); while (gethead(header) == FAIL || - time32_to_time(header->c_date) != dumpdate) + _time32_to_time(header->c_date) != dumpdate) skipcnt++; break; |