Lines Matching refs:disk
64 sbread(struct uufsd *disk) in sbread() argument
69 error = sbget(disk->d_fd, &fs, disk->d_sblockloc, disk->d_lookupflags); in sbread()
70 return (handle_disk_read(disk, fs, error)); in sbread()
88 sbfind(struct uufsd *disk, int flags) in sbfind() argument
93 error = sbsearch(disk->d_fd, &fs, flags); in sbfind()
94 return (handle_disk_read(disk, fs, error)); in sbfind()
98 handle_disk_read(struct uufsd *disk, struct fs *fs, int error) in handle_disk_read() argument
101 ERROR(disk, NULL); in handle_disk_read()
105 ERROR(disk, "non-existent or truncated superblock"); in handle_disk_read()
108 ERROR(disk, "no usable known superblock found"); in handle_disk_read()
111 ERROR(disk, "superblock check-hash failure"); in handle_disk_read()
114 ERROR(disk, "failed to allocate space for superblock " in handle_disk_read()
118 ERROR(disk, "The previous newfs operation on this " in handle_disk_read()
123 ERROR(disk, "unknown superblock read error"); in handle_disk_read()
127 disk->d_ufs = 0; in handle_disk_read()
130 memcpy(&disk->d_fs, fs, fs->fs_sbsize); in handle_disk_read()
132 fs = &disk->d_fs; in handle_disk_read()
134 disk->d_ufs = 1; in handle_disk_read()
136 disk->d_ufs = 2; in handle_disk_read()
137 disk->d_bsize = fs->fs_fsize / fsbtodb(fs, 1); in handle_disk_read()
138 disk->d_sblock = fs->fs_sblockloc / disk->d_bsize; in handle_disk_read()
139 disk->d_si = fs->fs_si; in handle_disk_read()
144 sbwrite(struct uufsd *disk, int all) in sbwrite() argument
149 ERROR(disk, NULL); in sbwrite()
151 rv = ufs_disk_write(disk); in sbwrite()
153 ERROR(disk, "failed to open disk for writing"); in sbwrite()
157 fs = &disk->d_fs; in sbwrite()
158 if ((errno = sbput(disk->d_fd, fs, all ? fs->fs_ncg : 0)) != 0) { in sbwrite()
161 ERROR(disk, "failed to write superblock"); in sbwrite()
164 ERROR(disk, "unknown superblock write error"); in sbwrite()