On Thu, Nov 29, 2007 at 09:04:53AM -0700, LaMont Jones wrote: > From: Timo Sirainen <tss@xxxxxx> > > Report missing helper program if mount device doesn't exist, which most > likely means a non-local filesystem mount which might need a helper program. > > See: http://bugs.debian.org/452330 > > Signed-off-by: LaMont Jones <lamont@xxxxxxxxxx> > --- > mount/mount.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/mount/mount.c b/mount/mount.c > index 99ad970..b870eb6 100644 > --- a/mount/mount.c > +++ b/mount/mount.c > @@ -1227,7 +1227,15 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, > " missing codepage or helper program, or other error"), > spec); > > - if (stat(spec, &statbuf) == 0 && S_ISBLK(statbuf.st_mode) > + if (stat(spec, &statbuf) < 0) { > + if (errno == ENOENT) { > + char mountprog[120]; > + snprintf(mountprog, sizeof(mountprog), "/sbin/mount.%s", types); > + if (stat(mountprog, &statbuf) < 0) > + error(_(" You might need a helper program: %s"), mountprog); > + } This not a good solution. The "types" could be comma-separated list of FS types. This solution also produces unexpected suggestions like /sbin/mount.ext3... What about to use any more generic message like "For several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program." Karel -- Karel Zak <kzak@xxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html