Page MenuHomeFreeBSD

ls: Make -, apply to -s as well as -l.
ClosedPublic

Authored by des on Jul 22 2024, 8:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 30, 11:22 PM
Unknown Object (File)
Fri, Sep 27, 7:18 PM
Unknown Object (File)
Fri, Sep 20, 10:18 PM
Unknown Object (File)
Tue, Sep 17, 2:16 PM
Unknown Object (File)
Thu, Sep 5, 8:54 AM
Unknown Object (File)
Tue, Sep 3, 7:26 AM
Unknown Object (File)
Aug 30 2024, 5:52 AM
Unknown Object (File)
Aug 30 2024, 5:52 AM
Subscribers

Details

Summary

While here, remove a bogus comment about a gcc bug. The bug was in ls,
which used an incorrect format string, and in libc, which accepted it.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58765
Build 55653: arc lint + arc unit

Event Timeline

des requested review of this revision.Jul 22 2024, 8:14 PM

Note that, independently of this change, I'm not convinced ls -s reports the right information. It seems to assume that the block size is fixed and universal, while on ZFS it can vary from one file to another. I believe ls should switch to keeping blocksize in bytes and printing howmany(st_blocks * st_blksize, blocksize) instead of keeping blocksize in units of 512 bytes and printing howmany(st_blocks, blocksize).

Ignore this, st_blocks is always in units of 512 bytes, not in units of st_blksize.

This revision is now accepted and ready to land.Jul 24 2024, 7:20 PM
This revision was automatically updated to reflect the committed changes.