mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Give a meaningfull diagnostic when we cannot determine the filesystem type.
This commit is contained in:
parent
96d13b89c2
commit
5c63c8dd25
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106254
@ -197,6 +197,8 @@ main(int argc, char *argv[])
|
||||
(fs = getfsspec(spec)) == NULL) {
|
||||
if (vfstype == NULL)
|
||||
vfstype = getfslab(spec);
|
||||
if (vfstype == NULL)
|
||||
errx(1, "Could not determine filesystem type");
|
||||
type = vfstype;
|
||||
devcheck(spec);
|
||||
} else {
|
||||
@ -555,7 +557,7 @@ getfslab(const char *str)
|
||||
err(1, "cannot open `%s'", str);
|
||||
|
||||
if (ioctl(fd, DIOCGDINFO, &dl) == -1)
|
||||
err(1, "cannot get disklabel for `%s'", str);
|
||||
return(NULL);
|
||||
|
||||
(void) close(fd);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user