On 2/16/21 3:24 PM, enh wrote: > There's a problem where if we can't stat it, we can't tell which one it > is out > of /proc/mounts because we can't match the device. And you can't do an > exact > match on the filename because "df ." is a directory under the mount > point. I > would have to add plumbing to xabspath() and then do a longest match > fileunderdir(), which assumes that the /proc/mounts entry is always a > cannonical > absolute path? (I _think_ that's true in current kernels but would have > to read > the source)... > > is this a place where it would help if we switch from /proc/mounts to > /proc/self/mountinfo?
Maybe, but I need more bandwidth to stare at that than I have available right now. (Look up when it showed up in the kernel, find the Documentation file explaining what the fields are, evaluate whether the new fields are useful, figure out what impact if any this has on BSD or macos, and then compare against just _always_ doing the xabspath() string comparison and if that simplifies anything while providing sufficient behavior, plus the test suite needs updating...) Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
