From 0609fdde26e65bfcb71834175b163b71bf2884c7 Mon Sep 17 00:00:00 2001 From: millert Date: Fri, 7 Mar 1997 01:57:08 +0000 Subject: [PATCH] Don't error out when chflags(2) fails if the target filesystem doesn't support file flags. Fix from NetBSD (minus the typo). --- usr.bin/xinstall/xinstall.c | 9 ++++----- 1 file 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 @@ -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); -- 2.20.1