mount specs

Denys Vlasenko vda.linux at googlemail.com
Mon Feb 8 01:58:10 UTC 2010


Very delayed response, I know...

On Friday 06 November 2009 10:24, Vladimir Dronnikov wrote:
> Of two letters to mountpoint and findfs (e2fsprogs) maintainers only
> the latter (to Theodore) has been replied. He proposed to mimic the
> feature by means of standard "stat" utility.
> That inspired me to look at BB stat.c, which I found able to be
> upgraded so it takes mount specs.
> 
> The summary of efforts is in attached patch: findfs, mountpoint, stat
> are touched. Please, review.

findfs acquired an incompatible -n option.

> The only drawback I see is that a vanilla file named like a mountspec
> can exist (say, LABEL=BOOT is perfectly valid filename).

Yes. This is bad.

> Another thought is that if we substitute calls to stat() library
> function with a libbb wrapper (say, bb_stat()) which can deal with
> mountspecs (to cope with drawback mentioned above), we propagate the
> ability to support mountspecs busybox-widely for cheap. What do you
> think?

IIRC you were dissatisfied that "mountpoint -x $(findfs SPEC)"
doesn't work. Is this the problem you are trying to solve?
If yes, there is another solution:

d=`findfs SPEC 2>/dev/null`
test x"$d" != x"" && mountpoint -x "$d"

--
vda


More information about the busybox mailing list