From e869d3777e7fed09f29d9736e5584cd67777744e Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 25 Jul 2004 08:17:23 +0000 Subject: [PATCH] Give better diagnostic for problems with backing files. --- sbin/mdconfig/mdconfig.c | 4 ++++ 1 file changed, 4 insertions(+) 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)