* Ported to Linux's Second Extended File System as part of the
* dump and restore backup suit
* Remy Card <card@Linux.EU.Org>, 1994-1997
- * Stelian Pop <pop@cybercable.fr>, 1999
- *
+ * Stelian Pop <pop@cybercable.fr>, 1999
*/
/*
*/
#ifndef lint
-#if 0
-static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95";
-#endif
static const char rcsid[] =
- "$Id: tape.c,v 1.3 1999/10/11 12:59:21 stelian Exp $";
+ "$Id: tape.c,v 1.8 1999/11/11 16:14:01 tiniou Exp $";
#endif /* not lint */
#include <sys/param.h>
return (genliteraldir(name, curfile.ino));
case IFLNK:
- { uid_t luid = curfile.dip->di_uid;
+ {
+#ifdef HAVE_LCHOWN
+ uid_t luid = curfile.dip->di_uid;
gid_t lgid = curfile.dip->di_gid;
-
+#endif
lnkbuf[0] = '\0';
pathlen = 0;
getfile(xtrlnkfile, xtrlnkskip);
}
if (linkit(lnkbuf, name, SYMLINK) == FAIL)
return (FAIL);
- (void) chown(name, luid, lgid);
+#ifdef HAVE_LCHOWN
+ (void) lchown(name, luid, lgid);
+#endif
return (GOOD);
}
}
(void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid);
(void) chmod(name, mode);
+ if (flags)
#ifdef __linux__
- (void) fsetflags(name, flags);
+ (void) fsetflags(name, flags);
#else
- (void) chflags(name, flags);
+ (void) chflags(name, flags);
#endif
skipfile();
utimes(name, timep);
}
(void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid);
(void) chmod(name, mode);
+ if (flags)
#ifdef __linux__
- (void) fsetflags(name, flags);
+ {
+ warn("%s: fsetflags called on a special file", name);
+ (void) fsetflags(name, flags);
+ }
#else
- (void) chflags(name, flags);
+ (void) chflags(name, flags);
#endif
skipfile();
utimes(name, timep);
}
(void) fchown(ofile, curfile.dip->di_uid, curfile.dip->di_gid);
(void) fchmod(ofile, mode);
+ if (flags)
#ifdef __linux__
- (void) fsetflags(ofile, flags);
+ (void) setflags(ofile, flags);
#else
- (void) fchflags(ofile, flags);
+ (void) fchflags(ofile, flags);
#endif
getfile(xtrfile, xtrskip);
(void) close(ofile);