Cross Reference: t_snapshot_v2.c
xref: /src/tests/fs/ffs/t_snapshot_v2.c
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /src/tests/fs/ffs/
11.3Schristos/*	$NetBSD: t_snapshot_v2.c,v 1.3 2017/01/13 21:30:39 christos Exp $	*/
21.1Spooka
31.1Spooka#include <sys/types.h>
41.1Spooka#include <sys/mount.h>
51.1Spooka
61.1Spooka#include <rump/rump.h>
71.1Spooka#include <rump/rump_syscalls.h>
81.1Spooka
91.1Spooka#include <ufs/ufs/ufsmount.h>
101.1Spooka
111.1Spooka#include <atf-c.h>
121.1Spooka#include <fcntl.h>
131.1Spooka#include <stdio.h>
141.1Spooka#include <stdlib.h>
151.1Spooka#include <string.h>
161.1Spooka#include <unistd.h>
171.1Spooka
181.3Schristos#include "h_macros.h"
191.1Spooka
201.1Spooka#define IMGNAME "ffs.img"
211.1Spooka#define NEWFS "newfs -F -s 10000 -O 2 " IMGNAME
221.2Shannken#define FSCK "fsck_ffs -fn -F"
231.1Spooka#define BAKNAME "/mnt/le_snapp"
241.1Spooka
251.1Spookastatic void
261.1Spookamount_diskfs(const char *fspec, const char *path)
271.1Spooka{
281.1Spooka	struct ufs_args uargs;
291.1Spooka
301.1Spooka	uargs.fspec = __UNCONST(fspec);
311.1Spooka
321.1Spooka	if (rump_sys_mount(MOUNT_FFS, path, 0, &uargs, sizeof(uargs)) == -1)
331.1Spooka		atf_tc_fail_errno("mount ffs %s", path);
341.1Spooka}
351.1Spooka
361.1Spookastatic void
371.1Spookabegin(void)
381.1Spooka{
391.1Spooka
401.1Spooka	/* empty */
411.1Spooka}
421.1Spooka
431.1Spooka#include "../common/snapshot.c"
44

Indexes created Mon Nov 10 17:20:41 GMT 2025