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;
|
char *cp;
|
||||||
static int firstcall = 1;
|
static int firstcall = 1;
|
||||||
|
|
||||||
if ((fs = getfsent()) != NULL) {
|
if ((fs = getfsent()) != NULL)
|
||||||
if (firstcall)
|
|
||||||
errx(1, "fstab reading failure");
|
|
||||||
firstcall = 0;
|
firstcall = 0;
|
||||||
}
|
else if (firstcall)
|
||||||
|
errx(1, "fstab reading failure");
|
||||||
|
else
|
||||||
|
return (0);
|
||||||
do {
|
do {
|
||||||
/* Ignore the root. */
|
/* Ignore the root. */
|
||||||
if (strcmp(fs->fs_file, "/") == 0)
|
if (strcmp(fs->fs_file, "/") == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user