From 3c2ddcf5149e44f320c389071690ea322863e490 Mon Sep 17 00:00:00 2001 From: SADA Kenji Date: Sat, 15 Jul 2000 14:59:02 +0000 Subject: [PATCH] To make inherit file flags when mv(1) moves file between directories on different file systems. PR: bin/12375 Submitted by: Takashi SHIRAI No response by: steve No problem with: building 5-current world --- bin/mv/mv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 903ce7ba4675..4a9825b03a6f 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;