mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-19 22:50:35 +03:00
switchroot: Properly check for number of arguments
The ostree-switch-root tool expects three arguments (argc=4): new root, OS tree target, and init(8) binary to launch inside it. Also, the error message when not enough arguments are passed now tells about the second argument being the target OS tree. Reviewed-by: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
99803babd9
commit
99142ef417
@ -168,9 +168,9 @@ main(int argc, char *argv[])
|
||||
int before_init_argc = 0;
|
||||
pid_t cleanup_pid;
|
||||
|
||||
if (argc < 3)
|
||||
if (argc < 4)
|
||||
{
|
||||
fprintf (stderr, "usage: ostree-switch-root NEWROOT INIT [ARGS...]\n");
|
||||
fprintf (stderr, "usage: ostree-switch-root NEWROOT TARGET INIT [ARGS...]\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user