Project

General

Profile

Actions

Bug #13661

closed

printf builtin should ignore leading --

Added by Andy Fiddaman about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Even though printf does not support option flags, POSIX requires that it ignores any leading --, and it currently does not.

af@bloody:/usr/demo/ksh/tests$ builtin printf
af@bloody:/usr/demo/ksh/tests$ printf -e
-e
af@bloody:/usr/demo/ksh/tests$ printf -- -e
--
af@bloody:/usr/demo/ksh/tests$ printf -- bar
--      

Related issues

Related to illumos gate - Bug #12558: Builtin command "printf" of ksh93 does not behave as specifiedClosedAndy Fiddaman

Actions
Actions #1

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 1363
Actions #2

Updated by Andy Fiddaman about 2 months ago

  • Related to Bug #12558: Builtin command "printf" of ksh93 does not behave as specified added
Actions #3

Updated by Andy Fiddaman about 2 months ago

Tested using the builtin test program before and after the change, which showed failures before and none after.
Re-ran the whole set of ksh tests and otherwise the before and after output was unchanged.
With a patched system, I can now build openjdk8 successfully where it failed before.

Actions #4

Updated by Electric Monk about 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 89af4c7b28b4436849bcbafbdebd243918ee0969

commit  89af4c7b28b4436849bcbafbdebd243918ee0969
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-03-25T20:24:46.000Z

    13661 printf builtin should ignore leading --
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Dominik Hassler <hadfl@omnios.org>
    Approved by: Rich Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF