1 1.1 pooka /* $NetBSD: t_snapshot_log.c,v 1.1 2010/11/05 11:32:09 pooka 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.1 pooka #define BAKNAME "/mnt/le_snapp" 23 1.1 pooka 24 1.1 pooka static void 25 1.1 pooka mount_diskfs(const char *fspec, const char *path) 26 1.1 pooka { 27 1.1 pooka struct ufs_args uargs; 28 1.1 pooka static int flags = MNT_LOG; 29 1.1 pooka 30 1.1 pooka uargs.fspec = __UNCONST(fspec); 31 1.1 pooka 32 1.1 pooka if (rump_sys_mount(MOUNT_FFS, 33 1.1 pooka path, flags, &uargs, sizeof(uargs)) == -1) 34 1.1 pooka atf_tc_fail_errno("mount ffs %s", path); 35 1.1 pooka flags = 0; 36 1.1 pooka } 37 1.1 pooka 38 1.1 pooka static void 39 1.1 pooka begin(void) 40 1.1 pooka { 41 1.1 pooka 42 1.1 pooka /* empty */ 43 1.1 pooka } 44 1.1 pooka 45 1.1 pooka #include "../common/snapshot.c" 46