Change the name of st_createtime to st_birthtime. This change is

made to reduce confusion between st_ctime and st_createtime.

Submitted by:	Eric Allman <eric@sendmail.org>
Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
mckusick 2002-07-16 22:36:00 +00:00
parent b5e36ca813
commit a3ff90696f
8 changed files with 18 additions and 18 deletions

View File

@ -1573,7 +1573,7 @@ cvtnstat(sb, nsb)
nsb->st_blksize = sb->st_blksize;
nsb->st_flags = sb->st_flags;
nsb->st_gen = sb->st_gen;
nsb->st_createtimespec = sb->st_createtimespec;
nsb->st_birthtimespec = sb->st_birthtimespec;
}
#ifndef _SYS_SYSPROTO_H_

View File

@ -1573,7 +1573,7 @@ cvtnstat(sb, nsb)
nsb->st_blksize = sb->st_blksize;
nsb->st_flags = sb->st_flags;
nsb->st_gen = sb->st_gen;
nsb->st_createtimespec = sb->st_createtimespec;
nsb->st_birthtimespec = sb->st_birthtimespec;
}
#ifndef _SYS_SYSPROTO_H_

View File

@ -620,7 +620,7 @@ vn_stat(vp, sb, td)
sb->st_atimespec = vap->va_atime;
sb->st_mtimespec = vap->va_mtime;
sb->st_ctimespec = vap->va_ctime;
sb->st_createtimespec = vap->va_createtime;
sb->st_birthtimespec = vap->va_birthtime;
/*
* According to www.opengroup.org, the meaning of st_blksize is

View File

@ -115,9 +115,9 @@ struct stat {
u_int32_t st_gen; /* file generation number */
int32_t st_lspare;
#ifndef _POSIX_SOURCE
struct timespec st_createtimespec; /* time of file creation */
struct timespec st_birthtimespec; /* time of file creation */
/*
* Explicitly pad st_createtimespec to 16 bytes so that the size of
* Explicitly pad st_birthtimespec to 16 bytes so that the size of
* struct stat is backwards compatible. We use bitfields instead
* of an array of chars so that this doesn't require a C99 compiler
* to compile if the size of the padding is 0. We use 2 bitfields
@ -127,8 +127,8 @@ struct stat {
int :(8 / 2) * (16 - (int)sizeof(struct timespec));
int :(8 / 2) * (16 - (int)sizeof(struct timespec));
#else
time_t st_createtime; /* time of file creation */
long st_createtimensec; /* nsec of file creation */
time_t st_birthtime; /* time of file creation */
long st_birthtimensec; /* nsec of file creation */
int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
#endif
@ -151,7 +151,7 @@ struct nstat {
u_int32_t st_blksize; /* optimal blocksize for I/O */
fflags_t st_flags; /* user defined flags for file */
u_int32_t st_gen; /* file generation number */
struct timespec st_createtimespec; /* time of file creation */
struct timespec st_birthtimespec; /* time of file creation */
/*
* See above about the following padding.
*/
@ -166,7 +166,7 @@ struct nstat {
#define st_atime st_atimespec.tv_sec
#define st_mtime st_mtimespec.tv_sec
#define st_ctime st_ctimespec.tv_sec
#define st_createtime st_createtimespec.tv_sec
#define st_birthtime st_birthtimespec.tv_sec
#endif
#define S_ISUID 0004000 /* set user id on execution */

View File

@ -205,7 +205,7 @@ struct vattr {
struct timespec va_atime; /* time of last access */
struct timespec va_mtime; /* time of last modification */
struct timespec va_ctime; /* time file changed */
struct timespec va_createtime; /* time file created */
struct timespec va_birthtime; /* time file created */
u_long va_gen; /* generation number of file */
u_long va_flags; /* flags defined for file */
udev_t va_rdev; /* device the special file represents */

View File

@ -884,8 +884,8 @@ ffs_valloc(pvp, mode, cred, vpp)
DIP(ip, i_gen) = ip->i_gen;
if (fs->fs_magic == FS_UFS2_MAGIC) {
vfs_timestamp(&ts);
ip->i_din2->di_createtime = ts.tv_sec;
ip->i_din2->di_creatensec = ts.tv_nsec;
ip->i_din2->di_birthtime = ts.tv_sec;
ip->i_din2->di_birthnsec = ts.tv_nsec;
}
return (0);
noinodes:

View File

@ -112,11 +112,11 @@ struct ufs2_dinode {
ufs_time_t di_atime; /* 32: Last access time. */
ufs_time_t di_mtime; /* 40: Last modified time. */
ufs_time_t di_ctime; /* 48: Last inode change time. */
ufs_time_t di_createtime; /* 56: Last inode change time. */
ufs_time_t di_birthtime; /* 56: Inode creation time. */
int32_t di_mtimensec; /* 64: Last modified time. */
int32_t di_atimensec; /* 68: Last access time. */
int32_t di_ctimensec; /* 72: Last inode change time. */
int32_t di_creatensec; /* 76: Last inode change time. */
int32_t di_birthnsec; /* 76: Inode creation time. */
int32_t di_gen; /* 80: Generation number. */
u_int32_t di_kernflags; /* 84: Kernel flags. */
u_int32_t di_flags; /* 88: Status flags (chflags). */

View File

@ -428,8 +428,8 @@ ufs_getattr(ap)
vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec;
vap->va_ctime.tv_sec = ip->i_din1->di_ctime;
vap->va_ctime.tv_nsec = ip->i_din1->di_ctimensec;
vap->va_createtime.tv_sec = 0;
vap->va_createtime.tv_nsec = 0;
vap->va_birthtime.tv_sec = 0;
vap->va_birthtime.tv_nsec = 0;
vap->va_bytes = dbtob((u_quad_t)ip->i_din1->di_blocks);
} else {
vap->va_rdev = ip->i_din2->di_rdev;
@ -440,8 +440,8 @@ ufs_getattr(ap)
vap->va_mtime.tv_nsec = ip->i_din2->di_mtimensec;
vap->va_ctime.tv_sec = ip->i_din2->di_ctime;
vap->va_ctime.tv_nsec = ip->i_din2->di_ctimensec;
vap->va_createtime.tv_sec = ip->i_din2->di_createtime;
vap->va_createtime.tv_nsec = ip->i_din2->di_creatensec;
vap->va_birthtime.tv_sec = ip->i_din2->di_birthtime;
vap->va_birthtime.tv_nsec = ip->i_din2->di_birthnsec;
vap->va_bytes = dbtob((u_quad_t)ip->i_din2->di_blocks);
}
vap->va_flags = ip->i_flags;