X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Flib%2Ffstab.c;fp=compat%2Flib%2Ffstab.c;h=b3a21f0c66c074d78e87c158cfdb53f40896f0a2;hb=8954518fe88156827aa958745ba1eb9cea4b42fa;hp=088645e6d3d0540d7401cf859e2127cea1473793;hpb=3e8155728d2469ce44eb1ac742c551851bbe0d4f;p=dump.git diff --git a/compat/lib/fstab.c b/compat/lib/fstab.c index 088645e..b3a21f0 100644 --- a/compat/lib/fstab.c +++ b/compat/lib/fstab.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: fstab.c,v 1.6 2000/01/21 10:17:41 stelian Exp $"; + "$Id: fstab.c,v 1.7 2000/08/20 19:41:24 stelian Exp $"; #endif /* not lint */ #include @@ -50,6 +50,7 @@ static const char rcsid[] = #include #include #include +#include static FILE *_fs_fp; static struct fstab _fs_fstab; @@ -57,6 +58,8 @@ static struct fstab _fs_fstab; static void error __P((int)); static int fstabscan __P((void)); +void msg __P((const char *fmt, ...)); + static int fstabscan(void) { @@ -65,12 +68,18 @@ int fstabscan(void) int typexx; #define MAXLINELENGTH 1024 char subline[MAXLINELENGTH]; + char *device_name; for (;;) { if (!(mnt = getmntent(_fs_fp))) return 0; - _fs_fstab.fs_spec = mnt->mnt_fsname; + device_name = get_device_name(mnt->mnt_fsname); + if (!device_name) { + msg("Warning: unable to translate %s\n", mnt->mnt_fsname); + continue; + } + _fs_fstab.fs_spec = device_name; _fs_fstab.fs_file = mnt->mnt_dir; _fs_fstab.fs_vfstype = mnt->mnt_type; _fs_fstab.fs_mntops = mnt->mnt_opts;