]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[settings] Expose exit status of failed command via ${errno}
authorMichael Brown <mcb30@ipxe.org>
Thu, 12 Jul 2012 14:28:37 +0000 (15:28 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 12 Jul 2012 14:46:24 +0000 (15:46 +0100)
commitc5c257788f36d178176eb59b0d4c5fdd88080c19
treea285348bbea4dbb2244286f51ae256ded721a249
parent5b4958388ded47c93686076e318195393a4c4b9f
[settings] Expose exit status of failed command via ${errno}

Allow scripts to report errors in more detail by exposing the most
recent error via the ${errno} setting.  For example:

    chain ${filename} || goto failed
    ...
    :failed
    imgfree http://192.168.0.1/ipxe_error.php?error=${errno}

Note that ${errno} is valid only immediately after executing a failed
command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/settings.c