[Toybox] reason for realpath in df?
Rob Landley
rob at landley.net
Sat Sep 5 09:17:31 PDT 2015
On 09/06/2015 12:12 PM, enh wrote:
> one of the obvious remaining differences between toybox df and
> coreutils (or Android) df is that it follows symbolic links in the
> first column. the git history doesn't explain why this change was
> made, though it was clearly deliberate. can you remember why?
>
>
> commit e9806f0828a39a6105d24fceb0f230c4bcbbad93
> Author: Rob Landley <rob at landley.net>
> Date: Fri Oct 26 21:15:31 2012 -0500
>
> Follow symlinks to get actual device name, getmountlist() reverses
> order for us now, detect stdout to full device.
I don't, but my blog does:
http://landley.net/notes-2012.html#26-10-2012
I.E. Ubuntu put dev-by-uuid symlinks into fstab so you have to resolve
them to get the actual device name:
$ cat /proc/mounts
rootfs / rootfs rw 0 0
...
/dev/disk/by-uuid/22bb0769-62f9-4d21-bd09-b48afa35f9f2 / ext4
rw,relatime,errors=remount-ro,data=ordered 0 0
...
$ df | head -n 2
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 541264712 309100100 204646868 61% /
(Seriously, this is why I blog. Fallen out of the habit a bit lately, I
should get back into it...)
Rob
1441469851.0
More information about the Toybox
mailing list