diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2022-08-13 19:41:53 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2022-08-13 19:43:40 +0000 |
| commit | e68866164212d62b8158e93f09bd29554428eef0 (patch) | |
| tree | ddd9bf4f9f7d26f0783e6343335d9bb89b5b3887 /tools | |
| parent | 88951aaaee73b87121b0f121224fe188a5b5e6e3 (diff) | |
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/diag/prtblknos/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/diag/prtblknos/main.c b/tools/diag/prtblknos/main.c index 25a717760922..65efa786b700 100644 --- a/tools/diag/prtblknos/main.c +++ b/tools/diag/prtblknos/main.c @@ -56,7 +56,6 @@ main(argc, argv) char ibuf[64]; char *fsname, *filename; ino_t inonum; - int error; filename = NULL; if (argc == 2) { @@ -83,7 +82,8 @@ main(argc, argv) fsname = *++argv; /* get the superblock. */ - if ((error = ufs_disk_fillout(&disk, fsname)) < 0) + if (ufs_disk_fillout_blank(&disk, fsname) == -1 || + sbfind(&disk, 0) == -1) err(1, "Cannot access file system superblock on %s", fsname); fs = (struct fs *)&disk.d_sb; @@ -99,7 +99,7 @@ main(argc, argv) (void)printf("%s (inode #%jd): ", filename, (intmax_t)inonum); - if ((error = getinode(&disk, &dp, inonum)) < 0) + if (getinode(&disk, &dp, inonum) < 0) warn("Read of inode %jd on %s failed: %s", (intmax_t)inonum, fsname, disk.d_error); |
