Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5cec3c7 authored by Keir Fraser's avatar Keir Fraser
Browse files

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
parent b2016eca
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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) {