This is a discussion on Re: newfs (mount_mfs) bug within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On 11/24/07, Iruata Souza <iru.muzgo@gmail.com> wrote: > Instead of using /usr/iru/tmp as its mount point it uses /tmp. This ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 11/24/07, Iruata Souza <iru.muzgo@gmail.com> wrote: > Instead of using /usr/iru/tmp as its mount point it uses /tmp. This is > caused by a call to chdir("/") just before mounting. That was added in > OpenBSD's rev 1.40 and NetBSD's rev 1.30. By the commit messages and > code I don't see a point in this call, so I'd be glad if someone knows > this. Anyway, it was removed in my diff. > > The problem is solved using the same technique as other mount > programs: calling realpath() on the mount point passed and giving the > results to mount(). > While here, I changed some magic error numbers to their matching errno > constants. the diff looks nice. i think the chdir was so that it wouldn't keep the vnode open for the current directory. does it still work if you add it back? i think just the realpath fixes are needed. |