Lines Matching defs:disk
92 static struct uufsd *disk = NULL;
108 assert(disk != NULL && fs != NULL);
127 * on disk and try again.
135 if (cgread1(disk, cg) == -1)
137 bcopy(&disk->d_cg, &cgc->cgc_cg, sizeof(cgc->cgc_union));
185 assert(disk != NULL && fs != NULL);
192 bcopy(&cgc->cgc_cg, &disk->d_cg,
194 if (cgwrite1(disk, cgc->cgc_cg.cg_cgx) == -1)
212 assert(disk != NULL && fs != NULL);
229 if (disk != NULL)
231 disk = malloc(sizeof(*disk));
232 if (disk == NULL)
233 err(1, "malloc(%zu)", sizeof(*disk));
234 if (ufs_disk_fillout(disk, devnam) == -1) {
236 disk->d_error);
238 fs = &disk->d_fs;
242 * Mark file system as clean, write the super-block back, close the disk.
249 if (sbwrite(disk, 0) == -1)
251 if (ufs_disk_close(disk) == -1)
253 free(disk);
254 disk = NULL;
332 if (bread(disk, fsbtodb(fs, blk), (void *)&sblks, (size_t)fs->fs_bsize) == -1)
333 err(1, "bread: %s", disk->d_error);
450 if (getino(disk, &p, ino, &mode) == -1)
482 if (putino(disk) == -1)