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
This commit is contained in:
Keir Fraser 2024-05-13 10:11:34 +00:00
parent b2016ecadc
commit c5cec3c71c

View file

@ -445,11 +445,6 @@ int main(int argc, char *argv[])
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) {