umount(8) should look in /etc/mtab
This commit is contained in:
parent
552a5ae4b5
commit
bea831d2e6
4
umount.c
4
umount.c
@ -43,9 +43,9 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
if (aflag == 1) {
|
if (aflag == 1) {
|
||||||
fp = setmntent("/etc/fstab", "r");
|
fp = setmntent("/etc/mtab", "r");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
eprintf("setmntent %s:", "/etc/fstab");
|
eprintf("setmntent %s:", "/etc/mtab");
|
||||||
while ((me = getmntent(fp))) {
|
while ((me = getmntent(fp))) {
|
||||||
if (umount2(me->mnt_dir, flags) < 0) {
|
if (umount2(me->mnt_dir, flags) < 0) {
|
||||||
weprintf("umount2:");
|
weprintf("umount2:");
|
||||||
|
Loading…
Reference in New Issue
Block a user