util-linux/umount.c umount error: Invalid argument
Christian Melki
christianm at t2data.se
Thu Aug 17 11:42:41 UTC 2006
Hi.
Im looking at umount.c and tracing output from the busybox umount to find
that busybox umount uses a expanded version of "path" used at the command
line to umount whatever target we are looking at.
This leads to problems that I have seen a few people
have. "umount /dev/sda1" -> -1: Invalid argument from the call oldumount.
Shouldn't the code use m->dir in the places of "path" in the umount?
Umount should look up mtab, either maintained or symlinked to kernel
parse it, match "path" for both dir and device and if it finds a
appropriate entry, use the "dir" part of that entry to umount it.
This is not the case.
It will parse and match the "path" from mtab. But when calling the actual
umount it will use the "path" which is the /dev/sda1 from commandline.
I patched umount and used m->dir instead of path in umounts and it
started behaving as expected.
My problem is; it cant be this obvious? is there some glibc trickery for
umount(); that make them work for device paths instead of file system
paths on certain systems or what?
best regards,
Christian
More information about the busybox
mailing list