util.h revision 1.3
1/*	$NetBSD: util.h,v 1.3 2025/10/26 12:51:50 andvar Exp $	*/
2
3/* Create test image and filesystem, record superblock locations */
4void create_lfs(size_t, size_t, int, int);
5
6/* Write a well-known byte pattern into a file, appending if it exists */
7int write_file(const char *, off_t, int);
8
9/* Check the byte pattern and size of the file */
10int check_file(const char *, int);
11
12/* Check the file system for consistency */
13int fsck(void);
14
15/* Run dumplfs; for debugging */
16void dumplfs(void);
17
18#define MAXLINE 132
19#define CHUNKSIZE 300
20#define SEGSIZE 32768
21
22#define IMGNAME "disk.img"
23#define FAKEBLK "/dev/blk"
24#define LOGFILE "newfs.log"
25
26#define MP "/mp"
27
28extern long long sbaddr[2];
29