tests = test_version test_cache test_optstr test_lock \
- test_tab test_utils test_tab_update
+ test_tab test_utils test_tab_update test_context
tests: all $(tests)
test_%: %.c all
return rc;
cxt->user_mountflags = fl;
+ DBG(CXT, mnt_debug_h(cxt, "final flags: VFS=%08lx userspace=%08lx",
+ cxt->mountflags, cxt->user_mountflags));
+
cxt->flags |= MNT_FL_MOUNTFLAGS_MERGED;
return 0;
}
fs = cxt->fs;
- if (!mnt_fs_get_vfs_options(fs) && !mnt_fs_get_userspace_options(fs))
- return 0;
-
/* The propagation flags should not be used together with any other flags */
if (cxt->mountflags & MS_PROPAGATION)
cxt->mountflags &= MS_PROPAGATION;
errno = 0;
res = merge_optstr(fs->vfs_optstr, fs->fs_optstr);
- if (errno)
+ if (!res && errno)
return NULL;
if (fs->user_optstr) {
if (mnt_optstr_append_option(&res, fs->user_optstr, NULL)) {
DBG(UPDATE, mnt_debug_h(upd,
"reseting FS [fs=0x%p, target=%s, flags=0x%08x]",
fs, target, mountflags));
+ if (fs) {
+ DBG(UPDATE, mnt_debug_h(upd, "FS template:"));
+ DBG(UPDATE, mnt_fs_print_debug(fs, stderr));
+ }
mnt_free_fs(upd->fs);
free(upd->target);
return 0;
DBG(UPDATE, mnt_debug_h(upd, "%s: update tab", upd->filename));
+ DBG(UPDATE, mnt_fs_print_debug(upd->fs, stderr));
if (!upd->fs && upd->target)
rc = update_remove_entry(upd, lc); /* umount */
echo "(by device) cannot found $DEVICE in $LIBMOUNT_MTAB" >> $TS_OUTPUT 2>&1
ts_finalize_subtest
-
ts_init_subtest "umount-by-devname"
$TESTPROG --umount $DEVICE >> $TS_OUTPUT 2>&1
grep -q $DEVICE $LIBMOUNT_MTAB &&