+ // End of fstab/mtab is reached.
+ // Were we looking for something specific?
+ if (argv[0]) {
+ long l;
+
+ // If we didn't find anything, complain
+ if (!mtcur->mnt_fsname)
+ bb_error_msg_and_die("can't find %s in %s",
+ argv[0], fstabname);
+
+ // What happens when we try to "mount swap_partition"?
+ // (fstab containts "swap_partition swap swap defaults 0 0")
+ // util-linux-ng 2.13.1 does this:
+ // stat("/sbin/mount.swap", 0x7fff62a3a350) = -1 ENOENT (No such file or directory)
+ // mount("swap_partition", "swap", "swap", MS_MGC_VAL, NULL) = -1 ENOENT (No such file or directory)
+ // lstat("swap", 0x7fff62a3a640) = -1 ENOENT (No such file or directory)
+ // write(2, "mount: mount point swap does not exist\n", 39) = 39
+ // exit_group(32) = ?
+#if 0
+ // In case we want to simply skip swap partitions:
+ l = parse_mount_options(mtcur->mnt_opts, NULL);
+ if ((l & MOUNT_SWAP)
+ // swap is bogus "fstype", parse_mount_options can't check fstypes
+ || strcasecmp(mtcur->mnt_type, "swap") == 0
+ ) {
+ goto ret;
+ }
+#endif
+ if (nonroot) {
+ // fstab must have "users" or "user"
+ l = parse_mount_options(mtcur->mnt_opts, NULL);
+ if (!(l & MOUNT_USERS))
+ bb_error_msg_and_die(must_be_root);
+ }