ls: Adjust amount of space allocated for filesize
Maximum file size on 64-bit system is 2^63-1 (9223372036854775807),
which takes more that 14 characters of space. In order to keep things
properly aligned adjust that spacing to 20 on 64-bit platforms.

Before:

ls -l /dev/
d---------              0 .
d---------              0 ..
crw-------          16384 dds-eeprom
crw-------            256 e1000-invm0
crw-------          16384 eeprom0
cr--------              0 full
crw-------           2048 imx-ocotp
crw-------          16384 main-eeprom
crw-------             64 mdio0-phy00
crw------- 9223372036854775807 mem
c-w-------              0 netconsole-1
c-w-------              0 null
crw-------   256060514304 nvme0n1
cr--------              0 prng
crw-------     4294967296 ram0
c-w-------              0 serial0-1
cr--------              0 zero

After:

ls -l /dev/
d---------                   0 .
d---------                   0 ..
crw-------               16384 dds-eeprom
crw-------                 256 e1000-invm0
crw-------               16384 eeprom0
cr--------                   0 full
crw-------                2048 imx-ocotp
crw-------               16384 main-eeprom
crw-------                  64 mdio0-phy00
crw------- 9223372036854775807 mem
c-w-------                   0 netconsole-1
c-w-------                   0 null
crw-------        256060514304 nvme0n1
cr--------                   0 prng
crw-------          4294967296 ram0
c-w-------                   0 serial0-1
cr--------                   0 zero

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent f242457 commit 4ebb55e96177a4b5f05e1407e01095cb4924d0a5
@Andrey Smirnov Andrey Smirnov authored on 17 Jan 2019
Sascha Hauer committed on 24 Jan 2019
Showing 1 changed file
View
commands/ls.c