+copy_special(from_stat, to_stat)
+ struct stat *from_stat, *to_stat;
+{
+ if (to_stat->st_ino != -1 && unlink(to.p_path)) {
+ error(to.p_path, "unlink");
+ return;
+ }
+ if (mknod(to.p_path, from_stat->st_mode, from_stat->st_rdev)) {
+ error(to.p_path, "mknod");
+ return;
+ }
+}
+
+setfile(fs)
+ struct stat *fs;
+{
+ static struct timeval tv[2];
+
+ if (chown(to.p_path, fs->st_uid, fs->st_gid))
+ error(to.p_path, "chown");
+ if (chmod(to.p_path, fs->st_mode))
+ error(to.p_path, "chmod");
+ tv[0].tv_sec = fs->st_atime;
+ tv[1].tv_sec = fs->st_mtime;
+ if (utimes(to.p_path, tv))
+ error(to.p_path, "utimes");
+}
+
+error(s, call)
+ char *s, *call;