util.h revision 1.1
11.1Sperseant/* $NetBSD: util.h,v 1.1 2025/10/13 00:44:35 perseant Exp $ */ 21.1Sperseant 31.1Sperseant/* Creat test image and filesystem, record superblock locations */ 41.1Sperseantvoid create_lfs(size_t, size_t, int, int); 51.1Sperseant 61.1Sperseant/* Write a well-known byte pattern into a file, appending if it exists */ 71.1Sperseantint write_file(const char *, off_t, int); 81.1Sperseant 91.1Sperseant/* Check the byte pattern and size of the file */ 101.1Sperseantint check_file(const char *, int); 111.1Sperseant 121.1Sperseant/* Check the file system for consistency */ 131.1Sperseantint fsck(void); 141.1Sperseant 151.1Sperseant/* Run dumplfs; for debugging */ 161.1Sperseantvoid dumplfs(void); 171.1Sperseant 181.1Sperseant#define MAXLINE 132 191.1Sperseant#define CHUNKSIZE 300 201.1Sperseant 211.1Sperseant#define IMGNAME "disk.img" 221.1Sperseant#define FAKEBLK "/dev/blk" 231.1Sperseant#define LOGFILE "newfs.log" 241.1Sperseant 251.1Sperseant#define MP "/mp" 261.1Sperseant 271.1Sperseantextern long long sbaddr[2]; 28