return (0);
}
+static void
+fetch_osname_options(char *name, bool *checkpointrewind)
+{
+
+ if (name[0] == '!') {
+ *checkpointrewind = true;
+ memmove(name, name + 1, strlen(name));
+ } else {
+ *checkpointrewind = false;
+ }
+}
+
/*ARGSUSED*/
static int
zfs_mount(vfs_t *vfsp)
char *osname;
int error = 0;
int canwrite;
+ bool checkpointrewind;
if (vfs_getopt(vfsp->mnt_optnew, "from", (void **)&osname, NULL))
return (SET_ERROR(EINVAL));
secpolicy_fs_mount_clearopts(cr, vfsp);
}
+ fetch_osname_options(osname, &checkpointrewind);
+
/*
* Check for mount privilege?
*
error = getpoolname(osname, pname);
if (error == 0)
- error = spa_import_rootpool(pname, false);
+ error = spa_import_rootpool(pname, checkpointrewind);
if (error)
goto out;
}