From: Will Woods Date: Fri, 27 Jul 2012 17:12:28 +0000 (-0400) Subject: add comment for getargbool() X-Git-Tag: 023~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e2285a48ac3d86a06a2d94d6c46fcf7011c7dfd;p=thirdparty%2Fdracut.git add comment for getargbool() I always forget how getargbool works. Add a comment documenting it. --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 2eb12249f..3a7be9a83 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -145,6 +145,13 @@ getarg() { return 1 } +# getargbool +# False if "getarg " returns "0", "no", or "off". +# True if getarg returns any other non-empty string. +# If not found, assumes - usually 0 for false, 1 for true. +# example: getargbool 0 rd.info +# true: rd.info, rd.info=1, rd.info=xxx +# false: rd.info=0, rd.info=off, rd.info not present (default val is 0) getargbool() { local _b unset _b