Fix a logic problem that broke umount -a.
Reported by: Martin Blapp <mb@imp.ch>
This commit is contained in:
parent
5eafefaf7a
commit
91a8167829
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52622
@ -193,11 +193,12 @@ umountall(char **typelist)
|
||||
char *cp;
|
||||
static int firstcall = 1;
|
||||
|
||||
if ((fs = getfsent()) != NULL) {
|
||||
if (firstcall)
|
||||
errx(1, "fstab reading failure");
|
||||
if ((fs = getfsent()) != NULL)
|
||||
firstcall = 0;
|
||||
}
|
||||
else if (firstcall)
|
||||
errx(1, "fstab reading failure");
|
||||
else
|
||||
return (0);
|
||||
do {
|
||||
/* Ignore the root. */
|
||||
if (strcmp(fs->fs_file, "/") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user