From: Felix Janda <felix.janda@posteo.de>
To: Alexey Gladkov <gladkov.alexey@gmail.com>
Cc: kbd@lists.altlinux.org
Subject: Re: [kbd] [PATCH 5/5] Replace error() by fprintf() and perror()
Date: Wed, 29 Apr 2015 20:11:53 +0200 [thread overview]
Message-ID: <20150429181152.GC1364@euler> (raw)
In-Reply-To: <554004DA.3060108@gmail.com>
Alexey Gladkov wrote:
> 22.04.2015 22:06, Felix Janda пишет:
> > ---
> > src/kbdinfo.c | 26 ++++++++++++++++----------
> > src/setvtrgb.c | 42 ++++++++++++++++++++++++------------------
> > src/vlock/auth.c | 2 --
> > src/vlock/pam.c | 6 ++----
> > src/vlock/username.c | 12 ++++++++----
> > src/vlock/vlock.c | 11 ++++++-----
> > src/vlock/vt.c | 5 ++---
> > 7 files changed, 58 insertions(+), 46 deletions(-)
>
> Applied, except for the last one. Please check out the master branch.
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).
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.)
Thanks,
Felix
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?
[1]: http://lists.altlinux.org/pipermail/kbd/2014-December/000487.html
next prev parent reply other threads:[~2015-04-29 18:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 19:06 [kbd] [PATCH 5/5] Replace error() by fprintf() and perror() Felix Janda
2015-04-26 11:18 ` Alexey Gladkov
2015-04-28 22:08 ` Alexey Gladkov
2015-04-29 18:11 ` Felix Janda [this message]
2015-04-30 19:21 ` Alexey Gladkov
2015-04-30 20:36 ` Felix Janda
2015-05-04 18:38 ` Alexey Gladkov
[not found] ` <20150504195148.GA3967@euler>
2015-05-04 23:10 ` Alexey Gladkov
2015-05-06 19:34 ` Felix Janda
2015-05-11 22:00 ` Alexey Gladkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150429181152.GC1364@euler \
--to=felix.janda@posteo.de \
--cc=gladkov.alexey@gmail.com \
--cc=kbd@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.