mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-04 17:15:50 +00:00
Use a quad int conversion routine for time_t instead of ulong, capable of
decoding tar's full time buffer (12 digits).
This commit is contained in:
parent
2ad45bbe3d
commit
dbd9746f71
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85618
@ -461,10 +461,11 @@ tar_rd(arcn, buf)
|
||||
arcn->sb.st_gid = (gid_t)asc_ul(hd->gid, sizeof(hd->gid), OCT);
|
||||
#ifdef NET2_STAT
|
||||
arcn->sb.st_size = (off_t)asc_ul(hd->size, sizeof(hd->size), OCT);
|
||||
arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT);
|
||||
#else
|
||||
arcn->sb.st_size = (off_t)asc_uqd(hd->size, sizeof(hd->size), OCT);
|
||||
arcn->sb.st_mtime = (time_t)asc_uqd(hd->mtime, sizeof(hd->mtime), OCT);
|
||||
#endif
|
||||
arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT);
|
||||
arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
|
||||
|
||||
/*
|
||||
@ -860,10 +861,11 @@ ustar_rd(arcn, buf)
|
||||
0xfff);
|
||||
#ifdef NET2_STAT
|
||||
arcn->sb.st_size = (off_t)asc_ul(hd->size, sizeof(hd->size), OCT);
|
||||
arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT);
|
||||
#else
|
||||
arcn->sb.st_size = (off_t)asc_uqd(hd->size, sizeof(hd->size), OCT);
|
||||
arcn->sb.st_mtime = (time_t)asc_uqd(hd->mtime, sizeof(hd->mtime), OCT);
|
||||
#endif
|
||||
arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT);
|
||||
arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user