aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-07-25 08:17:23 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-07-25 08:17:23 +0000
commite869d3777e7fed09f29d9736e5584cd67777744e (patch)
tree8ebf8ca02bd28d3ca43cfc6cfaeec798da30d920 /sbin/mdconfig/mdconfig.c
parenta3d57cfbfd835bbc84f432efd40ea867b1c3c915 (diff)
downloadsrc-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/mdconfig.c')
-rw-r--r--sbin/mdconfig/mdconfig.c4
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)