aboutsummaryrefslogtreecommitdiff
path: root/lib/libufs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libufs')
-rw-r--r--lib/libufs/libufs.h6
-rw-r--r--lib/libufs/sblock.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/libufs/libufs.h b/lib/libufs/libufs.h
index dbd378949877..9d1e7355c2f7 100644
--- a/lib/libufs/libufs.h
+++ b/lib/libufs/libufs.h
@@ -118,6 +118,12 @@ int ffs_sbput(void *, struct fs *, off_t,
int (*)(void *, off_t, void *, int));
/*
+ * Request standard superblock location in ffs_sbget
+ */
+#define STDSB -1 /* Fail if check-hash is bad */
+#define STDSB_NOHASHFAIL -2 /* Ignore check-hash failure */
+
+/*
* block.c
*/
ssize_t bread(struct uufsd *, ufs2_daddr_t, void *, size_t);
diff --git a/lib/libufs/sblock.c b/lib/libufs/sblock.c
index 29ff258b6ebf..53c8d44f6d65 100644
--- a/lib/libufs/sblock.c
+++ b/lib/libufs/sblock.c
@@ -54,7 +54,7 @@ sbread(struct uufsd *disk)
ERROR(disk, NULL);
- if ((errno = sbget(disk->d_fd, &fs, -1)) != 0) {
+ if ((errno = sbget(disk->d_fd, &fs, STDSB)) != 0) {
switch (errno) {
case EIO:
ERROR(disk, "non-existent or truncated superblock");