[ostree] switchroot: Properly check for number of arguments
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] switchroot: Properly check for number of arguments
- Date: Wed, 18 Apr 2012 19:22:40 +0000 (UTC)
commit 99142ef417f4af82095fba95d02ad73cfd80a2c9
Author: Adrian Perez <aperez igalia com>
Date: Wed Apr 18 21:13:43 2012 +0300
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>
src/switchroot/ostree-switch-root.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/switchroot/ostree-switch-root.c b/src/switchroot/ostree-switch-root.c
index 60306e6..c96ed3b 100644
--- a/src/switchroot/ostree-switch-root.c
+++ b/src/switchroot/ostree-switch-root.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]