Use more non-b0rked error reporting. Print the disk we are trying to open

and (we have the disk error from libufs? the disk error: the errno).

Requested by:	bde, <many>
This commit is contained in:
Juli Mallett 2002-11-05 14:30:41 +00:00
parent c2bed627fb
commit dcf31dd107
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106456

View File

@ -243,10 +243,13 @@ dumpfs(const char *name)
ufs_disk_close(&disk);
return (0);
err: libufs_printerror(&disk);
err: if (errno || disk.d_error != NULL) {
if (disk.d_error != NULL)
warnx("%s: %s", name, disk.d_error);
else
warn("%s", name);
}
ufs_disk_close(&disk);
if (errno)
warn("%s", name);
return (1);
}