diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-07-25 08:17:23 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-07-25 08:17:23 +0000 |
commit | e869d3777e7fed09f29d9736e5584cd67777744e (patch) | |
tree | 8ebf8ca02bd28d3ca43cfc6cfaeec798da30d920 /sbin/mdconfig | |
parent | a3d57cfbfd835bbc84f432efd40ea867b1c3c915 (diff) | |
download | src-e869d3777e7fed09f29d9736e5584cd67777744e.tar.gz src-e869d3777e7fed09f29d9736e5584cd67777744e.zip |
Give better diagnostic for problems with backing files.
Notes
Notes:
svn path=/head/; revision=132629
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r-- | sbin/mdconfig/mdconfig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index b23e903831ab..d83148dc1d70 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -113,6 +113,10 @@ main(int argc, char **argv) cmdline = 2; } mdio.md_file = optarg; + fd = open(optarg, O_RDONLY); + if (fd < 0) + err(1, "could not open %s", optarg); + close(fd); break; case 'o': if (cmdline != 2) |