X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Flib%2Ffstab.c;h=aa23462999d56a7836e9c999de84f22e9814834e;hb=d6967896bc4e18f9b4359a2ef5be5c0f1bcc456a;hp=088645e6d3d0540d7401cf859e2127cea1473793;hpb=ebcbe7f6c10482913b60fc792e72e494b439b242;p=dump.git diff --git a/compat/lib/fstab.c b/compat/lib/fstab.c index 088645e..aa23462 100644 --- a/compat/lib/fstab.c +++ b/compat/lib/fstab.c @@ -2,7 +2,8 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999-2000 + * Stelian Pop , 1999-2000 + * Stelian Pop - AlcĂ´ve , 2000 */ /* @@ -40,9 +41,10 @@ #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.10 2000/12/21 11:14:53 stelian Exp $"; #endif /* not lint */ +#include #include #include #include @@ -50,6 +52,7 @@ static const char rcsid[] = #include #include #include +#include static FILE *_fs_fp; static struct fstab _fs_fstab; @@ -57,6 +60,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 +70,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;