projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zero link count table increased 50 => 500; corrupted directories now pfatal.
[unix-history]
/
usr
/
src
/
sbin
/
dump
/
optr.c
diff --git
a/usr/src/sbin/dump/optr.c
b/usr/src/sbin/dump/optr.c
index
5a62a48
..
602943a
100644
(file)
--- a/
usr/src/sbin/dump/optr.c
+++ b/
usr/src/sbin/dump/optr.c
@@
-1,4
+1,5
@@
-static char *sccsid = "@(#)optr.c 1.2 (Berkeley) %G%";
+static char *sccsid = "@(#)optr.c 1.5 (Berkeley) %G%";
+
#include "dump.h"
/*
#include "dump.h"
/*
@@
-147,7
+148,7
@@
broadcast(message)
}
if (!notify || gp == 0)
}
if (!notify || gp == 0)
-
return
;
+
exit(0)
;
clock = time(0);
localclock = localtime(&clock);
clock = time(0);
localclock = localtime(&clock);
@@
-184,7
+185,7
@@
broadcast(message)
}
sendmes(tty, message)
}
sendmes(tty, message)
-char *tty, *message;
+
char *tty, *message;
{
char t[50], buf[BUFSIZ];
register char *cp;
{
char t[50], buf[BUFSIZ];
register char *cp;
@@
-254,6
+255,7
@@
int blocksontape()
/* ARGSUSED */
msg(fmt, a1, a2, a3, a4, a5)
char *fmt;
/* ARGSUSED */
msg(fmt, a1, a2, a3, a4, a5)
char *fmt;
+ int a1, a2, a3, a4, a5;
{
fprintf(stderr," DUMP: ");
#ifdef TDEBUG
{
fprintf(stderr," DUMP: ");
#ifdef TDEBUG
@@
-268,6
+270,7
@@
msg(fmt, a1, a2, a3, a4, a5)
/* ARGSUSED */
msgtail(fmt, a1, a2, a3, a4, a5)
char *fmt;
/* ARGSUSED */
msgtail(fmt, a1, a2, a3, a4, a5)
char *fmt;
+ int a1, a2, a3, a4, a5;
{
fprintf(stderr, fmt, a1, a2, a3, a4, a5);
}
{
fprintf(stderr, fmt, a1, a2, a3, a4, a5);
}
@@
-342,7
+345,8
@@
struct fstab *fstabsearch(key)
/*
* Tell the operator what to do
*/
/*
* Tell the operator what to do
*/
-lastdump()
+lastdump(arg)
+ char arg; /* w ==> just what to do; W ==> most recent dumps */
{
char *lastname;
char *date;
{
char *lastname;
char *date;
@@
-359,7
+363,10
@@
lastdump()
inititimes(); /* /etc/dumpdates input */
qsort(idatev, nidates, sizeof(struct idates *), idatesort);
inititimes(); /* /etc/dumpdates input */
qsort(idatev, nidates, sizeof(struct idates *), idatesort);
- fprintf(stdout, "Last dump(s) done (Dump '*' file systems):\n");
+ if (arg == 'w')
+ fprintf(stdout, "Dump these file systems:\n");
+ else
+ fprintf(stdout, "Last dump(s) done (Dump '>' file systems):\n");
lastname = "??";
ITITERATE(i, itwalk){
if (strncmp(lastname, itwalk->id_name, sizeof(itwalk->id_name)) == 0)
lastname = "??";
ITITERATE(i, itwalk){
if (strncmp(lastname, itwalk->id_name, sizeof(itwalk->id_name)) == 0)
@@
-371,8
+378,9
@@
lastdump()
dumpme = ( (dt != 0)
&& (dt->fs_freq != 0)
&& (itwalk->id_ddate < tnow - (dt->fs_freq*DAY)));
dumpme = ( (dt != 0)
&& (dt->fs_freq != 0)
&& (itwalk->id_ddate < tnow - (dt->fs_freq*DAY)));
- fprintf(stdout,"%c %8s\t(%6s) Last dump: Level %c, Date %s\n",
- dumpme ? '*' : ' ',
+ if ( (arg != 'w') || dumpme)
+ fprintf(stdout,"%c %8s\t(%6s) Last dump: Level %c, Date %s\n",
+ dumpme && (arg != 'w') ? '>' : ' ',
itwalk->id_name,
dt ? dt->fs_file : 0,
itwalk->id_incno,
itwalk->id_name,
dt ? dt->fs_file : 0,
itwalk->id_incno,
@@
-394,10
+402,12
@@
int idatesort(p1, p2)
}
int max(a,b)
}
int max(a,b)
+ int a, b;
{
return(a>b?a:b);
}
int min(a,b)
{
return(a>b?a:b);
}
int min(a,b)
+ int a, b;
{
return(a<b?a:b);
}
{
return(a<b?a:b);
}