just include fcntl.h not sys/fcntl.h
[oweals/busybox.git] / util-linux / mount.c
index 42d0eb223767f09c139ff2dc5ef08a94770be4fe..68f48355539e41ecee669e75938e3fb4bf3b67a8 100644 (file)
@@ -284,6 +284,7 @@ static int singlemount(struct mntent *mp)
                        return 1;
                } else {
                        // Strangely enough, nfsmount() doesn't actually mount() anything.
+                       mp->mnt_type = "nfs";
                        rc = mount_it_now(mp, vfsflags, filteropts);
                        if (ENABLE_FEATURE_CLEAN_UP) free(filteropts);
                        
@@ -291,11 +292,11 @@ static int singlemount(struct mntent *mp)
                }
        }
 
-       // Look at the file.  (Not found isn't a failure for remount.)
+       // Look at the file.  (Not found isn't a failure for remount, or for
+       // a synthetic filesystem like proc or sysfs.)
 
        if (lstat(mp->mnt_fsname, &st));
-
-       if (!(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {
+       else if (!(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {
                // Do we need to allocate a loopback device for it?
 
                if (ENABLE_FEATURE_MOUNT_LOOP && S_ISREG(st.st_mode)) {