Lines Matching defs:fs
52 #include <sys/fs/ufs_fs.h>
54 #include <sys/fs/ufs_inode.h>
62 struct fs *fs;
98 fs = (struct fs *)fsbuf;
99 if ((n = read(fd, (char *)fs, SBSIZE)) != SBSIZE) {
105 if ((fs->fs_magic != FS_MAGIC) &&
106 (fs->fs_magic != MTB_UFS_MAGIC)) {
111 if (fs->fs_magic == FS_MAGIC &&
112 (fs->fs_version != UFS_EFISTYLE4NONEFI_VERSION_2 &&
113 fs->fs_version != UFS_VERSION_MIN)) {
116 fs->fs_version);
119 if (fs->fs_magic == MTB_UFS_MAGIC &&
120 (fs->fs_version > MTB_UFS_VERSION_1 ||
121 fs->fs_version < MTB_UFS_VERSION_MIN)) {
124 fs->fs_version);
128 (void) printf("fsid: %x %x\n", fs->fs_id[0], fs->fs_id[1]);
134 bsize = INOPB(fs) * sizeof (struct dinode);
136 imax = fs->fs_ipg * fs->fs_ncg;
138 bno = itod(fs, inum);
139 seekaddr = (offset_t)fsbtodb(fs, bno) * DEV_BSIZE;
154 for (dip = dibuf; dip < &dibuf[INOPB(fs)]; dip++) {
183 fs->fs_id[0] = timeval.tv_sec;
184 fs->fs_id[1] = timeval.tv_usec + getpid();
191 if ((n = write(fd, (char *)fs, SBSIZE)) != SBSIZE) {
198 for (i = 0; i < fs->fs_ncg; i++) {
199 seekaddr = (offset_t)fsbtodb(fs, cgsblock(fs, i)) * DEV_BSIZE;
207 if ((n = read(fd, (char *)fs, SBSIZE)) != SBSIZE) {
213 if ((fs->fs_magic != FS_MAGIC) &&
214 (fs->fs_magic != MTB_UFS_MAGIC)) {
221 if ((n = write(fd, (char *)fs, SBSIZE)) != SBSIZE) {