diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-03-07 01:57:09 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-03-07 01:57:09 +0000 |
commit | 2f2317f1cda67b49ffb5de6533ddd498634d4dee (patch) | |
tree | eef0e487380aac26f819791fc8b55313846284da | |
parent | 36ed44c1a59a8d994d629a677a1c6c3b0d3aec3e (diff) |
Don't error out when chflags(2) fails if the target filesystem doesn't
support file flags. Fix from NetBSD (minus the typo).
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 309eff38bf5..3d642627609 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xinstall.c,v 1.11 1997/01/17 07:13:54 millert Exp $ */ +/* $OpenBSD: xinstall.c,v 1.12 1997/03/07 01:57:08 millert Exp $ */ /* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #endif -static char rcsid[] = "$OpenBSD: xinstall.c,v 1.11 1997/01/17 07:13:54 millert Exp $"; +static char rcsid[] = "$OpenBSD: xinstall.c,v 1.12 1997/03/07 01:57:08 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -383,9 +383,8 @@ install(from_name, to_name, fset, flags) */ if (fchflags(to_fd, flags & SETFLAGS ? fset : from_sb.st_flags & ~UF_NODUMP)) { - serrno = errno; - (void)unlink(to_name); - errx(EX_OSERR, "%s: chflags: %s", to_name, strerror(serrno)); + if (errno != EOPNOTSUPP || (from_sb.st_flags & ~UF_NODUMP) != 0) + warnx("%s: chflags: %s", to_name, strerror(errno)); } (void)close(to_fd); |