summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorsada <sada@FreeBSD.org>2000-07-15 14:59:02 +0000
committersada <sada@FreeBSD.org>2000-07-15 14:59:02 +0000
commitd2b1e4c7119240f614a8a42252e6a4a02b86d28c (patch)
treea2bbd6a058966188e2bcd2711482440e0737624f /bin
parent38f39cae5a0fee58b783cc0e6b0fc2c1c7a9cadc (diff)
downloadFreeBSD-src-d2b1e4c7119240f614a8a42252e6a4a02b86d28c.zip
FreeBSD-src-d2b1e4c7119240f614a8a42252e6a4a02b86d28c.tar.gz
To make inherit file flags when mv(1) moves file between directories
on different file systems. PR: bin/12375 Submitted by: Takashi SHIRAI <shirai@nintendo.co.jp> No response by: steve No problem with: building 5-current world
Diffstat (limited to 'bin')
-rw-r--r--bin/mv/mv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 903ce7b..4a9825b 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -290,6 +290,8 @@ err: if (unlink(to))
}
if (fchmod(to_fd, sbp->st_mode))
warn("%s: set mode (was: 0%03o)", to, oldmode);
+ if (fchflags(to_fd, sbp->st_flags))
+ warn("%s: set flags (was: 0%07o)", to, sbp->st_flags);
tval[0].tv_sec = sbp->st_atime;
tval[1].tv_sec = sbp->st_mtime;
OpenPOWER on IntegriCloud