From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 276633858D3C; Wed, 17 Apr 2024 17:11:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 276633858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713373883; bh=BYSZlnCvtDGL7jem7G5ke+gcm34KF1KnX5mUPOigOnI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=N8CzbAUI7cPYrrxnuUVVAHQs0TrTrwYLqPuoMhTxvblt4n+xQXxQucIMpZvzN65B+ xdzqeZP0+vLTKsXj4u6guyFTG28sRdcV6o0j93JOPuTizp95/+BVuQR/oVDrP/cv+W Ja5hEbfHtNLFoK3Rlj4GyttBpeh7sCsxKZ+Xs5wI= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/22099] getconf help info Date: Wed, 17 Apr 2024 17:11:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.23 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D22099 --- Comment #6 from Florian Weimer --- (In reply to Eric Blake from comment #4) > Output according to the POSIX recommendation would be: >=20 > $ getconf -a | head -n2 > LINK_MAX: 127 > _POSIX_LINK_MAX: 127 >=20 > the whitespace can be arbitrary, but as none of the category names can > include a colon, and since a colon is unlikely in the contents of a confs= tr > value (although some values are blank), it would make it more obvious that > the following subset of the output represents exactly 8 of the many known > keys: >=20 > $ getconf -a | grep -C4 POSIX_V7_WIDTH > POSIX_V7_ILP32_OFF32_CFLAGS: -m32 > POSIX_V7_ILP32_OFF32_LDFLAGS: -m32 > POSIX_V7_ILP32_OFF32_LIBS:=20=20=20=20=20=20=20=20=20=20 > POSIX_V7_ILP32_OFF32_LINTFLAGS:=20=20=20=20=20 > _POSIX_V7_WIDTH_RESTRICTED_ENVS: POSIX_V7_ILP32_OFF32 > POSIX_V7_ILP32_OFFBIG > POSIX_V7_LP64_OFF64 [=E2=80=A6] I must say that this is pretty wild as a means to disambiguate the output. = Why not add proper string quoting if we change the output format? Or at least u= se : as a separator instead of newline if the value contains newlines. Note that on many systems, the *values* for PATH already contain colons. We can restrict whatever POSIX mandates to POSIXLY_CORRECT mode, I suppose,= so I don't have a strong opinion about this. To fix this without quoting, we c= an add a new output mode that lists all variables, one per line, but not their values. --=20 You are receiving this mail because: You are on the CC list for the bug.=