* mount_devfs was unconditionally clearing all rules of a mountpoint
after mounting.
* According to the man page (and my original intentions, I'd presume),
mount_devfs should only clear the rules of a mountpoint if it was
already mounted. So fix mount_devfs accordingly.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1885
if (!mounted) {
if (mount(vfc.vfc_name, mntpoint, mntflags, &info))
err(1, NULL);
- }
-
- if (fork() == 0) {
- execlp("devfsctl", "devfsctl",
- "-m", mntpoint,
- "-c",
- "-r",
- NULL);
+ } else {
+ if (fork() == 0) {
+ execlp("devfsctl", "devfsctl",
+ "-m", mntpoint,
+ "-c",
+ "-r",
+ NULL);
+ }
}
if (info.flags & DEVFS_MNT_RULESET) {