umount(8) should look in /etc/mtab

This commit is contained in:
sin 2014-03-12 16:33:04 +02:00
parent 552a5ae4b5
commit bea831d2e6

View File

@ -43,9 +43,9 @@ main(int argc, char *argv[])
usage();
if (aflag == 1) {
fp = setmntent("/etc/fstab", "r");
fp = setmntent("/etc/mtab", "r");
if (!fp)
eprintf("setmntent %s:", "/etc/fstab");
eprintf("setmntent %s:", "/etc/mtab");
while ((me = getmntent(fp))) {
if (umount2(me->mnt_dir, flags) < 0) {
weprintf("umount2:");