Bug 2959 - busybox ls does not consider an order of mutually exclusive options
Summary: busybox ls does not consider an order of mutually exclusive options
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.17.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 02:16 UTC by Yunho Kim
Modified: 2010-12-19 04:07 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yunho Kim 2010-12-14 02:16:04 UTC
According to IEEE Std 1003.1 ls section,
-------------------
Specifying more than one of the options in the following mutually-exclusive pairs shall not be considered an error: -C and -l (ell), [XSI]  -m and -l (ell), -x and -l (ell),  -C and -1 (one), -H and -L, -c and -u. The last option specified in each pair shall determine the output format.
-------------------

However, through concolic testing, we found that busybox ls does not follow this standard and ignores the order of mutually exclusive options. For example,

// Standard Linux ls
[moonzoo@verifier ls-bug]$ ls -C1
a.txt
b.txt
[moonzoo@verifier ls-bug]$ ls -1C
a.txt  b.txt

// Busybox ls 
[moonzoo@verifier ls-bug]$ ../busybox-1.17.0/busybox ls -C1
a.txt
b.txt
[moonzoo@verifier ls-bug]$ ../busybox-1.17.0/busybox ls -1C
a.txt
b.txt
Comment 1 Denys Vlasenko 2010-12-19 04:07:06 UTC
Thanks, fixed in git:

http://git.busybox.net/busybox/commit/?id=f313746a6d7b992918386a5e6db1cfc8f4da30fd

Will be in 1.19.x