<div dir="ltr"><div>HiĀ Rob,</div><div><br></div>I think the main purpose of the original patch is to show mounts whose stat()/statvfs() failed.<div>For example, an under-privileged user may be able to read /proc/mounts but lack the permission to stat(vfs) the mount point, so showing "-" is a way of saying "I know this XXX device is being mount on YYY mount point, however for whatever reason I lack the means to get usage information from the filesystem".</div><div><br></div><div>So I thinkĀ 5f5f97f215bb accomplishes what the original change wants by not skipping 0:0 device at all and gives "st_dev == 0" a special meaning of "stat(mount point) failed".</div><div>The only question I have left, is it guaranteed that st_dev must be zero or left unchanged when stat() fails? Or do we need to do something like, "if stat() / statvfs() fails, ensure st_dev is zero" in portability.c to ensure the caller knows that stat(mount point) failed?</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 15, 2021 at 3:02 AM Rob Landley <<a href="mailto:rob@landley.net" target="_blank">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/14/21 6:17 AM, Rob Landley wrote:<br>
> On 2/13/21 5:45 PM, Rob Landley wrote:<br>
> Part of what's confusing me here is you're still skipping device 0:0, which is a<br>
> "should never happen" entry? (Even ramfs is only major 0 with minor incrementing<br>
> per-mount I think?)<br>
> <br>
> Can we just change to print the - - - - entries for a device 0 0 and not have to<br>
> change the lib plumbing for the extra flag? Or am I missing something?<br>
<br>
Tell me if commit 5f5f97f215bb implements what you want?<br>
<br>
Rob<br>
_______________________________________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net" target="_blank">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" rel="noreferrer" target="_blank">http://lists.landley.net/listinfo.cgi/toybox-landley.net</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><table width="90%" border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding:0px;font-family:"Times New Roman";max-width:348px"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td style="padding:0px"><table border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding:20px 0px 0px"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td valign="top" style="padding:0px 20px 0px 0px;vertical-align:top;border-right:1px solid rgb(213,213,213)"><img src="https://i.imgur.com/eGpkLls.png" width="200" height="64"><br></td><td style="padding:0px 0px 0px 20px"><table border="0" cellspacing="0" cellpadding="0" style="margin:0px;padding:0px"><tbody style="margin:0px;padding:0px"><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:1px 0px 5px;font-size:13px;line-height:13px;color:rgb(56,58,53);font-weight:700">Yi-yo Chiang</td></tr><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:0px 0px 5px;font-size:11px;line-height:13px;color:rgb(56,58,53)">Software Engineer</td></tr><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:0px 0px 5px;font-size:11px;line-height:13px;color:rgb(56,58,53)"><a href="mailto:yochiang@google.com" target="_blank">yochiang@google.com</a></td></tr><tr style="margin:0px;padding:0px"><td colspan="2" style="font-family:Arial,Helvetica,Verdana,sans-serif;padding:0px 0px 3px;font-size:11px;line-height:13px;color:rgb(3,112,248)"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></div>