| Summary: | 'realpath -- /tmp' non-compliant with upcoming POSIX | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Eric Blake <eblake> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | normal | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.35.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | readlink: Support --, -n always | ||
|
Description
Eric Blake
2023-03-21 17:06:05 UTC
Similarly, POSIX still requires 'readlink -- /foo' and 'readlink /foo' to behave identically. This is implemented correctly when FEATURE_READLINK_FOLLOW is enabled (as a side effect of accepting the POSIX-mandated -n), but fails when the feature is disabled (that branch of the code should probably use single_argv(), similarly to how coreutils/dirname.c was patched). Created attachment 9561 [details]
readlink: Support --, -n always
Ugh - unlike many open-source projects, your mailing list does not allow moderated posting from non-subscribers. So while I wait for my subscription request to be processed, I'm attaching a partial proposed patch for readlink.
Originally, I thought to do a one-liner to use single_argv(); then realized that it was easier to blindly support -n in all configurations since POSIX will require -n support. I'm still trying to learn whether POSIX or GNU Coreutils will prevail on whether readlink should be silent or verbose by default.
|