summaryrefslogtreecommitdiffstats
path: root/usr.bin/compress
diff options
context:
space:
mode:
authorhoek <hoek@FreeBSD.org>2000-05-16 04:58:34 +0000
committerhoek <hoek@FreeBSD.org>2000-05-16 04:58:34 +0000
commitaf60d5a9279daba0537c507921862802f2a853c6 (patch)
treeed28dfccd51f1b569c8837be19abdf8028172018 /usr.bin/compress
parent7dfe31785979cb277ff919fbabcc46201379c829 (diff)
downloadFreeBSD-src-af60d5a9279daba0537c507921862802f2a853c6.zip
FreeBSD-src-af60d5a9279daba0537c507921862802f2a853c6.tar.gz
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 <peter.edwards@ireland.com>)
Diffstat (limited to 'usr.bin/compress')
-rw-r--r--usr.bin/compress/compress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/compress/compress.c b/usr.bin/compress/compress.c
index 9cabf10..bb8b1bf 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);
}
OpenPOWER on IntegriCloud