Do not exit if unable to read /etc/dumpdates or create it.
If one is trying to dump or repair an ill system, give the user a fighting chance. Refusing to operate w/o a very non-critical file (feature) is just plain stupid.
This commit is contained in:
parent
05ca2115ba
commit
8cc6e4d84a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74872
@ -85,8 +85,9 @@ initdumptimes()
|
|||||||
|
|
||||||
if ((df = fopen(dumpdates, "r")) == NULL) {
|
if ((df = fopen(dumpdates, "r")) == NULL) {
|
||||||
if (errno != ENOENT) {
|
if (errno != ENOENT) {
|
||||||
quit("cannot read %s: %s\n", dumpdates,
|
msg("cannot read %s: %s\n", dumpdates,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
return;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -94,8 +95,9 @@ initdumptimes()
|
|||||||
*/
|
*/
|
||||||
msg("WARNING: no file `%s', making an empty one\n", dumpdates);
|
msg("WARNING: no file `%s', making an empty one\n", dumpdates);
|
||||||
if ((df = fopen(dumpdates, "w")) == NULL) {
|
if ((df = fopen(dumpdates, "w")) == NULL) {
|
||||||
quit("cannot create %s: %s\n", dumpdates,
|
msg("cannot create %s: %s\n", dumpdates,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
return;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
(void) fclose(df);
|
(void) fclose(df);
|
||||||
|
Loading…
Reference in New Issue
Block a user