tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mount_mfs: why chdir?
In sbin/newfs/newfs.c, I see, inter alia,
int
main(int argc, char *argv[])
{
...
#ifdef MFS
if (mfs) {
...
(void) chdir("/");
...
if (mount(MOUNT_MFS, ...) == -1)
Does anyone happen to know why the chdir to / is there? It breaks
mount_mfs with a relative path as the mount-on argument, which is
somewhat confusing ("mkdir foo && mount_mfs -s 8192 swap foo" => No
such file or directory -> huh? I just made it!) and breaks a use case I
have - an unusual use case, but still.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index