浏览代码

fs/ext2: hint about setting the filesystem size on error

Since we now request that the user sets the exact size of the ext2/3/4
filesystem, we've had quite a few users wondering what was going on when
they enable too much and the default 60M are no longer enough.

When mkfs.ext2 fails, print a hint that the user should check the size
setting.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
[Arnout: Add *** and redirect to stderr]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Yann E. MORIN 8 年之前
父节点
当前提交
a67f4c3e29
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      fs/ext2/ext2.mk

+ 5 - 1
fs/ext2/ext2.mk

@@ -29,7 +29,11 @@ ROOTFS_EXT2_DEPENDENCIES = host-e2fsprogs
 define ROOTFS_EXT2_CMD
 define ROOTFS_EXT2_CMD
 	rm -f $@
 	rm -f $@
 	$(HOST_DIR)/sbin/mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(EXT2_OPTS) $@ \
 	$(HOST_DIR)/sbin/mkfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN) $(EXT2_OPTS) $@ \
-		"$(EXT2_SIZE)"
+		"$(EXT2_SIZE)" \
+	|| { ret=$$?; \
+	     echo "*** Maybe you need to increase the filesystem size (BR2_TARGET_ROOTFS_EXT2_SIZE)" 1>&2; \
+	     exit $$ret; \
+	}
 endef
 endef
 
 
 rootfs-ext2-symlink:
 rootfs-ext2-symlink: