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

Commit 901b3ec7 authored by Keir Fraser's avatar Keir Fraser Committed by Gerrit Code Review
Browse files

Merge changes If17796f4,If44918c5,I559fb264 into main

* changes:
  mkbootfs: Allow invocation with no directories specified
  mkbootfs: Fix usage message for dev node list files
  mkbootfs: Fix -f typo in usage message
parents f6b59d19 c5cec3c7
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ static const struct option long_options[] = {
static void usage(void)
{
    fprintf(stderr,
            "Usage: mkbootfs [-n FILE] [-d DIR|-F FILE] DIR...\n"
            "Usage: mkbootfs [-n FILE] [-d DIR|-f FILE] DIR...\n"
            "\n"
            "\t-d, --dirname=DIR: fs-config directory\n"
            "\t-f, --file=FILE: Canned configuration file\n"
@@ -410,11 +410,11 @@ static void usage(void)
            "\t-n, --nodes=FILE: Dev nodes description file\n"
            "\n"
            "Dev nodes description:\n"
            "\t[dir|nod] [perms] [uid] [gid] [c|b] [minor] [major]\n"
            "\t[dir|nod] [perms] [uid] [gid] [c|b] [major] [minor]\n"
            "\tExample:\n"
            "\t\t# My device nodes\n"
            "\t\tdir dev 0755 0 0\n"
            "\t\tnod dev/null 0600 0 0 c 1 5\n"
            "\t\tnod dev/null 0600 0 0 c 1 3\n"
    );
}

@@ -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) {