From 5384f9ee3448155bad4cf8bb5bbbe94920a6f7a1 Mon Sep 17 00:00:00 2001 From: millert Date: Thu, 10 Apr 1997 22:26:13 +0000 Subject: [PATCH] Error if bsize < fsize. Problem noted by Dieter Dworkin Muller --- sbin/disklabel/disklabel.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 8c00d8ce788..db13e58c4e6 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.28 1997/02/17 16:30:25 imp Exp $ */ +/* $OpenBSD: disklabel.c,v 1.29 1997/04/10 22:26:13 millert Exp $ */ /* $NetBSD: disklabel.c,v 1.30 1996/03/14 19:49:24 ghudson Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: disklabel.c,v 1.28 1997/02/17 16:30:25 imp Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.29 1997/04/10 22:26:13 millert Exp $"; #endif /* not lint */ #include @@ -1404,6 +1404,10 @@ checklabel(lp) part); errors++; } + if (pp->p_frag == 0 && pp->p_fsize != 0) { + warnx("partition %c: block size < fragment size", part); + errors++; + } } for (; i < MAXPARTITIONS; i++) { part = 'a' + i; -- 2.20.1