X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Flib%2Ffstab.c;h=2c97fd044dc6ffa4ecad7090f5ad9d877e869a2d;hb=109e9e1d1a904627eeae4d519a0f694795b2892c;hp=cc2d2550dd33eb7c2f007bdac2aa6195936d2768;hpb=ddd2ef55b78a62c4bc3daad18bef8a90e85a2052;p=dump.git diff --git a/compat/lib/fstab.c b/compat/lib/fstab.c index cc2d255..2c97fd0 100644 --- a/compat/lib/fstab.c +++ b/compat/lib/fstab.c @@ -2,8 +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 - * + * Stelian Pop , 1999-2000 + * Stelian Pop - AlcĂ´ve , 2000 */ /* @@ -39,9 +39,10 @@ * SUCH DAMAGE. */ -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ +#ifndef lint +static const char rcsid[] = + "$Id: fstab.c,v 1.9 2000/12/04 15:43:16 stelian Exp $"; +#endif /* not lint */ #include #include @@ -50,6 +51,7 @@ static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93"; #include #include #include +#include static FILE *_fs_fp; static struct fstab _fs_fstab; @@ -57,6 +59,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 +69,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;