1 1.2 hannken /* $NetBSD: t_snapshot_log.c,v 1.2 2013/02/06 09:05:01 hannken Exp $ */ 2 1.1 pooka 3 1.1 pooka #include <sys/types.h> 4 1.1 pooka #include <sys/mount.h> 5 1.1 pooka 6 1.1 pooka #include <rump/rump.h> 7 1.1 pooka #include <rump/rump_syscalls.h> 8 1.1 pooka 9 1.1 pooka #include <ufs/ufs/ufsmount.h> 10 1.1 pooka 11 1.1 pooka #include <atf-c.h> 12 1.1 pooka #include <fcntl.h> 13 1.1 pooka #include <stdio.h> 14 1.1 pooka #include <stdlib.h> 15 1.1 pooka #include <string.h> 16 1.1 pooka #include <unistd.h> 17 1.1 pooka 18 1.1 pooka #include "../../h_macros.h" 19 1.1 pooka 20 1.1 pooka #define IMGNAME "ffs.img" 21 1.1 pooka #define NEWFS "newfs -F -s 10000 " IMGNAME 22 1.2 hannken #define FSCK "fsck_ffs -fn -F" 23 1.1 pooka #define BAKNAME "/mnt/le_snapp" 24 1.1 pooka 25 1.1 pooka static void 26 1.1 pooka mount_diskfs(const char *fspec, const char *path) 27 1.1 pooka { 28 1.1 pooka struct ufs_args uargs; 29 1.1 pooka static int flags = MNT_LOG; 30 1.1 pooka 31 1.1 pooka uargs.fspec = __UNCONST(fspec); 32 1.1 pooka 33 1.1 pooka if (rump_sys_mount(MOUNT_FFS, 34 1.1 pooka path, flags, &uargs, sizeof(uargs)) == -1) 35 1.1 pooka atf_tc_fail_errno("mount ffs %s", path); 36 1.1 pooka flags = 0; 37 1.1 pooka } 38 1.1 pooka 39 1.1 pooka static void 40 1.1 pooka begin(void) 41 1.1 pooka { 42 1.1 pooka 43 1.1 pooka /* empty */ 44 1.1 pooka } 45 1.1 pooka 46 1.1 pooka #include "../common/snapshot.c" 47