projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set file flags on directories
[unix-history]
/
usr
/
src
/
sbin
/
restore
/
dirs.c
diff --git
a/usr/src/sbin/restore/dirs.c
b/usr/src/sbin/restore/dirs.c
index
42614fa
..
b8f2209
100644
(file)
--- a/
usr/src/sbin/restore/dirs.c
+++ b/
usr/src/sbin/restore/dirs.c
@@
-11,7
+11,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)dirs.c 8.
3
(Berkeley) %G%";
+static char sccsid[] = "@(#)dirs.c 8.
4
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-55,9
+55,10
@@
static struct inotab *inotab[HASHSIZE];
struct modeinfo {
ino_t ino;
struct timeval timep[2];
struct modeinfo {
ino_t ino;
struct timeval timep[2];
- short mode;
- short uid;
- short gid;
+ mode_t mode;
+ uid_t uid;
+ gid_t gid;
+ int flags;
};
/*
};
/*
@@
-591,6
+592,7
@@
setdirmodes(flags)
cp = myname(ep);
(void) chown(cp, node.uid, node.gid);
(void) chmod(cp, node.mode);
cp = myname(ep);
(void) chown(cp, node.uid, node.gid);
(void) chmod(cp, node.mode);
+ (void) chflags(cp, node.flags);
utimes(cp, node.timep);
ep->e_flags &= ~NEW;
}
utimes(cp, node.timep);
ep->e_flags &= ~NEW;
}
@@
-688,6
+690,7
@@
allocinotab(ino, dip, seekpt)
node.timep[1].tv_sec = dip->di_mtime.ts_sec;
node.timep[1].tv_usec = dip->di_mtime.ts_nsec / 1000;
node.mode = dip->di_mode;
node.timep[1].tv_sec = dip->di_mtime.ts_sec;
node.timep[1].tv_usec = dip->di_mtime.ts_nsec / 1000;
node.mode = dip->di_mode;
+ node.flags = dip->di_flags;
node.uid = dip->di_uid;
node.gid = dip->di_gid;
(void) fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);
node.uid = dip->di_uid;
node.gid = dip->di_gid;
(void) fwrite((char *)&node, 1, sizeof(struct modeinfo), mf);