X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ferr%2F_info;h=64cc2cef01d80579bb57d6c47c751902c5ef6a30;hp=5a5752bb0b297418486200661ec69db71d84dbdf;hb=516c47790828cfb892fecdbe03a6928c345d29b2;hpb=9f5e1ef758d5b052a8df115f1d79c0c53e802ddf diff --git a/ccan/err/_info b/ccan/err/_info index 5a5752bb..64cc2cef 100644 --- a/ccan/err/_info +++ b/ccan/err/_info @@ -8,17 +8,21 @@ * A few platforms don't provide err.h; for those, this provides replacements. * For most, it simple includes the system err.h. * + * Unfortunately, you have to call err_set_progname() to tell the replacements + * your program name, otherwise it prints "unknown program". + * * Example: * #include * * int main(int argc, char *argv[]) * { + * err_set_progname(argv[0]); * if (argc != 1) * errx(1, "Expect no arguments"); * exit(0); * } * - * License: Public domain + * License: CC0 (Public domain) * Author: Rusty Russell */ int main(int argc, char *argv[])