summaryrefslogtreecommitdiffstats
path: root/lib/system/system.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-06-20 14:04:29 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-06-24 13:07:58 +0800
commitaaa1de0046295cfd1f7a5428f399a5d1f9e1e563 (patch)
tree33c68d3ab5977b9bf86553126b8d8de59dda2a09 /lib/system/system.c
parentca6231932c9e81822f86142646bc4aa42454353e (diff)
downloadtalos-petitboot-aaa1de0046295cfd1f7a5428f399a5d1f9e1e563.tar.gz
talos-petitboot-aaa1de0046295cfd1f7a5428f399a5d1f9e1e563.zip
discover/boot: Allow boot hooks to alter boot data
By exiting with status == 2, boot hooks can update boot data by printing name=value to stdout. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/system/system.c')
-rw-r--r--lib/system/system.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/system.c b/lib/system/system.c
index 7bb4997..528e134 100644
--- a/lib/system/system.c
+++ b/lib/system/system.c
@@ -159,9 +159,9 @@ int pb_run_cmd_pipe(const char *const *cmd_argv, int wait, int dry_run,
int status, pipefd[2];
pid_t pid;
- assert(!wait && stdout_buf);
- assert(!!ctx != !!stdout_buf);
- assert(!!stdout_buf != !!stdout_buf_len);
+ assert(!stdout_buf || wait);
+ assert(!stdout_buf || ctx);
+ assert(!stdout_buf || stdout_buf_len);
if (do_debug) {
const char *const *p = cmd_argv;
OpenPOWER on IntegriCloud