1 /* $NetBSD: t_snapshot.c,v 1.3 2014/06/10 13:15:18 martin Exp $ */
7 #include <rump/rump_syscalls.h>
9 #include <fs/tmpfs/tmpfs_args.h>
10 #include <msdosfs/msdosfsmount.h>
20 #include "../../h_macros.h"
22 #define IMGNAME "msdosfs.img"
23 #define NEWFS "newfs_msdos -C 5M " IMGNAME
24 #define FSCK "fsck_msdos -fn"
25 #define BAKNAME "/stor/snap"
28 mount_diskfs(const char *fspec, const char *path)
30 struct msdosfs_args margs;
32 memset(&margs, 0, sizeof(margs));
33 margs.fspec = __UNCONST(fspec);
34 margs.version = MSDOSFSMNT_VERSION;
36 if (rump_sys_mount(MOUNT_MSDOS, path, 0, &margs, sizeof(margs)) == -1)
37 err(1, "mount msdosfs %s", path);
43 struct tmpfs_args targs = { .ta_version = TMPFS_ARGS_VERSION, };
45 if (rump_sys_mkdir("/stor", 0777) == -1)
46 atf_tc_fail_errno("mkdir /stor");
47 if (rump_sys_mount(MOUNT_TMPFS, "/stor", 0, &targs,sizeof(targs)) == -1)
48 atf_tc_fail_errno("mount storage");
51 #include "../common/snapshot.c"