mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
ostree-prepare-root: Don't require an extraneous argument
This commit is contained in:
parent
8eaaea795c
commit
35df7a7eb4
@ -82,7 +82,7 @@ parse_ostree_cmdline (char **out_osname,
|
||||
{
|
||||
const char *next = strchr (iter, ' ');
|
||||
const char *next_nonspc = next;
|
||||
while (*next_nonspc == ' ')
|
||||
while (next_nonspc && *next_nonspc == ' ')
|
||||
next_nonspc += 1;
|
||||
if (strncmp (iter, "ostree=", strlen ("ostree=")) == 0)
|
||||
{
|
||||
@ -121,9 +121,9 @@ main(int argc, char *argv[])
|
||||
size_t len;
|
||||
int i;
|
||||
|
||||
if (argc < 3)
|
||||
if (argc < 2)
|
||||
{
|
||||
fprintf (stderr, "usage: ostree-prepare-root SYSROOT OSTREE\n");
|
||||
fprintf (stderr, "usage: ostree-prepare-root SYSROOT\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user