From 6a1bd01754a8b0836ba4aaa0c246ec1fa8bee31f Mon Sep 17 00:00:00 2001 From: Mike Barcroft Date: Thu, 21 Mar 2002 07:46:09 +0000 Subject: [PATCH] Provide a proper error message in mdconfig(8) when a filesystem is too small, instead of a less meaningful error in newfs(8). --- sbin/mdconfig/mdconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index 8a6019f008ce..840742393091 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -144,6 +144,8 @@ main(int argc, char **argv) mdio.md_size *= (1024 * 1024 * 1024 / DEV_BSIZE); else errx(1, "Unknown suffix on -s argument"); + if (mdio.md_size < 192) + errx(1, "Filesystem too small"); break; case 'u': if (cmdline != 2 && cmdline != 3)