* dump and restore backup suit
* Remy Card <card@Linux.EU.Org>, 1994-1997
* Stelian Pop <pop@cybercable.fr>, 1999-2000
+ * Stelian Pop <pop@cybercable.fr> - Alcôve <www.alcove.fr>, 2000
*/
/*
#ifndef lint
static const char rcsid[] =
- "$Id: utilities.c,v 1.7 2000/01/21 10:17:41 stelian Exp $";
+ "$Id: utilities.c,v 1.9 2000/11/10 14:42:25 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
ret = link(existing, new);
chflags(existing, s.st_flags);
}
+#else
+ unsigned long s;
+
+ /*
+ * Most likely, the immutable or append-only attribute
+ * is set. Clear the attributes and try again.
+ */
+ if (fgetflags (existing, &s) != -1 &&
+ fsetflags (existing, 0) != -1) {
+ ret = link(existing, new);
+ fsetflags(existing, s);
+ }
#endif
if (ret < 0) {
warn("warning: cannot create hard link %s->%s",