Don't bail out when chflags() fails with EOPNOTSUPP. Fixes PR #3288

This commit is contained in:
fvdl 1997-03-05 23:48:47 +00:00
parent da2622290c
commit 3ee3460f02
1 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: xinstall.c,v 1.10 1996/12/09 20:03:20 thorpej Exp $ */ /* $NetBSD: xinstall.c,v 1.11 1997/03/05 23:48:47 fvdl Exp $ */
/* /*
* Copyright (c) 1987, 1993 * Copyright (c) 1987, 1993
@ -43,7 +43,7 @@ static char copyright[] =
#if 0 #if 0
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#endif #endif
static char rcsid[] = "$NetBSD: xinstall.c,v 1.10 1996/12/09 20:03:20 thorpej Exp $"; static char rcsid[] = "$NetBSD: xinstall.c,v 1.11 1997/03/05 23:48:47 fvdl Exp $";
#endif /* not lint */ #endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
@ -277,9 +277,8 @@ install(from_name, to_name, fset, flags)
*/ */
if (fchflags(to_fd, if (fchflags(to_fd,
flags & SETFLAGS ? fset : from_sb.st_flags & ~UF_NODUMP)) { flags & SETFLAGS ? fset : from_sb.st_flags & ~UF_NODUMP)) {
serrno = errno; if (errno != EOPNOTSUPP || (from_sb.st_flags & ~UF_NODUMP) != 0)
(void)unlink(to_name); warnx(1, "%s: chflags: %s", to_name, strerror(errno));
errx(1, "%s: chflags: %s", to_name, strerror(serrno));
} }
(void)close(to_fd); (void)close(to_fd);