mkbootfs: Allow invocation with no directories specified
1. A non-empty archive can still be generated, if a dev nodes
file is specified; and
2. cpio itself handles the case of an empty archive
(containing only the trailer entry), for example:
echo -n | cpio -oc | cpio -it
Bug: 328362894
Change-Id: If17796f445e50842249554a1e82478bc375cf5eb
diff --git a/mkbootfs/mkbootfs.c b/mkbootfs/mkbootfs.c
index eaa5d55..84a0a4e 100644
--- a/mkbootfs/mkbootfs.c
+++ b/mkbootfs/mkbootfs.c
@@ -445,11 +445,6 @@
int num_dirs = argc - optind;
argv += optind;
- if (num_dirs <= 0) {
- usage();
- errx(1, "no directories to process?!");
- }
-
while(num_dirs-- > 0){
char *x = strchr(*argv, '=');
if(x != 0) {