Lines Matching refs:disk
84 char *disk; /* name of the disk file */
85 char rdisk[PATH_MAX];/* resolved name of the disk file */
86 int diskfd; /* disk file descriptor */
230 * Get a specified inode from disk. Attempt to minimize reads to once
261 * Read a chunk of data from the disk.
298 disk, strerror(errno), (long long)blkno, size);
301 "got=%d", disk, (long long)blkno, size, cnt);
304 disk);
315 "count=%u", disk, strerror(errno),
320 "got=%d", disk, (long long)(offset + i) / DEV_BSIZE,
409 * Scan a disk block containing directory information looking to see if
561 disk = argv[optind];
562 if ((diskfd = opendev(disk, O_RDONLY, 0, NULL)) >= 0) {
564 err(1, "cannot stat %s", disk);
570 if (realpath(disk, rdisk) == NULL)
571 err(1, "cannot find real path for %s", disk);
572 disk = rdisk;
574 if (stat(disk, &stblock) == -1)
575 err(1, "cannot stat %s", disk);
578 disk = rawname(disk);
580 if ((fsp = getfsfile(disk)) == NULL)
581 err(1, "could not find file system %s", disk);
582 disk = rawname(fsp->fs_spec);
585 if ((diskfd = opendev(disk, O_RDONLY, 0, NULL)) == -1)
586 err(1, "cannot open %s", disk);
612 printf("%s:\n", disk);