diff options
author | sada <sada@FreeBSD.org> | 2000-07-15 14:59:02 +0000 |
---|---|---|
committer | sada <sada@FreeBSD.org> | 2000-07-15 14:59:02 +0000 |
commit | d2b1e4c7119240f614a8a42252e6a4a02b86d28c (patch) | |
tree | a2bbd6a058966188e2bcd2711482440e0737624f /bin | |
parent | 38f39cae5a0fee58b783cc0e6b0fc2c1c7a9cadc (diff) | |
download | FreeBSD-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.c | 2 |
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; |