Re: [kbd] [PATCH 5/5] Replace error() by fprintf() and perror()
Alexey Gladkov <[email protected]>
| Newsgroups | dev.linux.lists.kbd |
|---|---|
| Message-ID | <[email protected]> |
29.04.2015 21:11, Felix Janda пишет: > Thanks for applying the other patches and for kbd_error()! Now everything > compiles fine with musl libc. > > However kbd_error() does not behave correctly in the case that the first > argument is 0 (EXIT_SUCCESS). error() does _not_ terminate the program > if the first argument is EXIT_SUCCESS. Maybe have in addition a > kbd_warn() so that the __attribute__((noreturn)) can stay for kbd_error() > (then the exitnum argument would also become superfluous). You right. I missed it. Fixed. > My excuse [1] for changing the error messages (no more program name) was > because the source is inconsistent. For example init_vt() in vlock/vt.c > or main() in kbdinfo.c mix fprintf(stderr) and error(). It seems to me > that error was mainly used as a convenient shorthand for > fprint(stderr) && exit(). (Having a shorthand makes sense.) Agree. It will be necessary to bring messages to one format. > PS: Could you maybe note on the webpage that git.altlinux.org is the > main git repository and might be ahead of the git.kernel.org repo? I usually send changes to both the repository. > [1]: http://lists.altlinux.org/pipermail/kbd/2014-December/000487.html -- Rgrds, legion