diff options
-rw-r--r-- | lib/libufs/type.c | 5 | ||||
-rw-r--r-- | lib/libufs/ufs_disk_close.3 | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/libufs/type.c b/lib/libufs/type.c index 9b7470a33a84..8a553bedbc97 100644 --- a/lib/libufs/type.c +++ b/lib/libufs/type.c @@ -108,7 +108,10 @@ again: if ((ret = stat(name, &st)) < 0) { */ name = oname; } - if (ret >= 0 && S_ISCHR(st.st_mode)) { + if (ret >= 0 && S_ISREG(st.st_mode)) { + /* Possibly a disk image, give it a try. */ + ; + } else if (ret >= 0 && S_ISCHR(st.st_mode)) { /* This is what we need, do nothing. */ ; } else if ((fs = getfsfile(name)) != NULL) { diff --git a/lib/libufs/ufs_disk_close.3 b/lib/libufs/ufs_disk_close.3 index a659116a4f54..25a059e87d69 100644 --- a/lib/libufs/ufs_disk_close.3 +++ b/lib/libufs/ufs_disk_close.3 @@ -53,7 +53,7 @@ and populate the structure pointed to by The disk is opened read-only. The specified .Fa name -may be either a mountpoint, or a device name. +may be either a mountpoint, a device name or a filesystem image. The .Fn ufs_disk_fillout function assumes there is a valid superblock and will fail if not, |