Make the minimum filesystem size error message more clear
authorShen Feng <shen@cn.fujitsu.com>
Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)
Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
mkfs.c

diff --git a/mkfs.c b/mkfs.c
index 89de8ac..76d3a59 100644 (file)
--- a/mkfs.c
+++ b/mkfs.c
@@ -373,6 +373,13 @@ int main(int ac, char **av)
                                break;
                        case 'b':
                                block_count = parse_size(optarg);
+                               if (block_count < 256*1024*1024) {
+                                       fprintf(stderr, "File system size "
+                                               "%llu bytes is too small, "
+                                               "256M is required at least\n",
+                                               block_count);
+                                       exit(1);
+                               }
                                zero_end = 0;
                                break;
                        default: