From da94aa4ef2dddd98982f2197d7038a3f4e373a8a Mon Sep 17 00:00:00 2001 From: Tim Vanderhoek Date: Tue, 16 May 2000 04:58:34 +0000 Subject: [PATCH] From PR submitter: compress uses setfile() to make flags, ownership and mode of the output the same as those of the original. However, if the filesystem holding the output file doesn't support these operations, compress prints a warning. This bites a bit with NFS directories, which always fail the chflags() operation. If the file system doesn't support the operation, then the flags data wasn't valid on the original file anyway, so the warning is spurious. Submitted by: bin/16981 (Peter Edwards ) --- usr.bin/compress/compress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c index 9cabf104c5d..bb8b1bfecb7 100644 --- a/usr.bin/compress/compress.c +++ b/usr.bin/compress/compress.c @@ -375,10 +375,10 @@ setfile(name, fs) cwarn("chown: %s", name); fs->st_mode &= ~(S_ISUID|S_ISGID); } - if (chmod(name, fs->st_mode)) + if (chmod(name, fs->st_mode) && errno != EOPNOTSUPP) cwarn("chmod: %s", name); - if (chflags(name, fs->st_flags)) + if (chflags(name, fs->st_flags) && errno != EOPNOTSUPP) cwarn("chflags: %s", name); }