vlogger.8: fix incorrect default -t tag documentation - #137
Open
chrisdebian wants to merge 2 commits into
Open
Conversation
The -t tag option's man page entry claimed the default tag is the LOGNAME environment variable. That's incorrect - vlogger.c never calls getenv() anywhere. The actual default when -t isn't given: - if /etc/vlogger is used, the tag arg passed to it defaults to an empty string (tag ? tag : "") - if syslog(3) is used directly, the tag defaults to the result of getlogin(3) (tag ? tag : getlogin()) Neither is LOGNAME. Corrected the description to match. The -p pri option's documented default of user.notice is correct as written (facility = LOG_USER; level = LOG_NOTICE; are the literal initial values in main()), so left that section untouched.
Member
classabbyamp pointed out (PR void-linux#137) that getlogin(3) returns $LOGNAME on musl but NULL unconditionally on glibc. The previous wording correctly traced the C code (tag ? tag : getlogin()) but didn't tell the reader the practical outcome differs by libc — on glibc, the default is effectively no tag at all, same as the /etc/vlogger case. Verified with groff -mandoc -Tascii -z (clean) and checked the rendered output.
Author
|
Good catch, thanks — pushed a follow-up commit. The previous wording correctly traced the C code (
Re-verified with groff -mandoc -Tascii -z (clean). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #84.
The
-t tagoption's man page entry claims the default tag is theLOGNAMEenvironment variable. That's incorrect —
vlogger.cnever callsgetenv()anywhere. Tracing the actual behaviour when
-tisn't given:/etc/vloggeris used, the tag arg passed to it defaults to an emptystring (
tag ? tag : "")getlogin(3)(tag ? tag : getlogin())Neither is
LOGNAME. Corrected the description to match.(The
-p prioption's documented default ofuser.noticeis correct as-is —facility = LOG_USER; level = LOG_NOTICE;are the literal initial values inmain()— so left that section untouched.)Verified with
groff -mandoc -Tascii -z(clean) and checked the renderedoutput.