Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102672564
D42674.id130313.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
727 B
Referenced Files
None
Subscribers
None
D42674.id130313.diff
View Options
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -360,8 +360,17 @@
fchflags(fd, fs->st_flags) :
(islink ? lchflags(to.p_path, fs->st_flags) :
chflags(to.p_path, fs->st_flags))) {
- warn("chflags: %s", to.p_path);
- rval = 1;
+ /*
+ * NFS doesn't support chflags; ignore errors unless
+ * there's reason to believe we're losing bits. (Note,
+ * this still won't be right if the server supports
+ * flags and we were trying to *remove* flags on a file
+ * that we copied, i.e., that we didn't create.)
+ */
+ if (errno != EOPNOTSUPP || fs->st_flags != 0) {
+ warn("chflags: %s", to.p_path);
+ rval = 1;
+ }
}
return (rval);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 4:19 PM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14661286
Default Alt Text
D42674.id130313.diff (727 B)
Attached To
Mode
D42674: cp: Don't warn for chflags() failing with EOPNOTSUPP if flags == 0
Attached
Detach File
Event Timeline
Log In to Comment