Change timevals to timespecs.

This commit is contained in:
mycroft 1994-09-22 02:44:35 +00:00
parent 4b5f323219
commit ef22ebf733
3 changed files with 16 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_node.c,v 1.9 1994/07/19 15:27:40 mycroft Exp $ */ /* $NetBSD: cd9660_node.c,v 1.10 1994/09/22 02:44:35 mycroft Exp $ */
/*- /*-
* Copyright (c) 1982, 1986, 1989, 1994 * Copyright (c) 1982, 1986, 1989, 1994
@ -377,8 +377,8 @@ cd9660_deftstamp(isodir,inop,bp)
int int
cd9660_tstamp_conv7(pi,pu) cd9660_tstamp_conv7(pi,pu)
char *pi; char *pi;
struct timeval *pu; struct timespec *pu;
{ {
int i; int i;
int crtime, days; int crtime, days;
@ -393,8 +393,8 @@ struct timeval *pu;
tz = pi[6]; tz = pi[6];
if (y < 1970) { if (y < 1970) {
pu->tv_sec = 0; pu->ts_sec = 0;
pu->tv_usec = 0; pu->ts_nsec = 0;
return 0; return 0;
} else { } else {
#ifdef ORIGINAL #ifdef ORIGINAL
@ -414,8 +414,8 @@ struct timeval *pu;
if (-48 <= tz && tz <= 52) if (-48 <= tz && tz <= 52)
crtime -= tz * 15 * 60; crtime -= tz * 15 * 60;
} }
pu->tv_sec = crtime; pu->ts_sec = crtime;
pu->tv_usec = 0; pu->ts_nsec = 0;
return 1; return 1;
} }
@ -436,7 +436,7 @@ cd9660_chars2ui(begin,len)
int int
cd9660_tstamp_conv17(pi,pu) cd9660_tstamp_conv17(pi,pu)
u_char *pi; u_char *pi;
struct timeval *pu; struct timespec *pu;
{ {
u_char buf[7]; u_char buf[7];

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_node.h,v 1.6 1994/07/19 23:33:59 mycroft Exp $ */ /* $NetBSD: cd9660_node.h,v 1.7 1994/09/22 02:44:37 mycroft Exp $ */
/*- /*-
* Copyright (c) 1994 * Copyright (c) 1994
@ -131,6 +131,7 @@ int cd9660_print __P((struct vop_print_args *));
int cd9660_islocked __P((struct vop_islocked_args *)); int cd9660_islocked __P((struct vop_islocked_args *));
int cd9660_pathconf __P((struct vop_pathconf_args *)); int cd9660_pathconf __P((struct vop_pathconf_args *));
int cd9660_blkatoff __P((struct vop_blkatoff_args *)); int cd9660_blkatoff __P((struct vop_blkatoff_args *));
void cd9660_defattr __P((struct iso_directory_record *, void cd9660_defattr __P((struct iso_directory_record *,
struct iso_node *, struct buf *)); struct iso_node *, struct buf *));
void cd9660_deftstamp __P((struct iso_directory_record *, void cd9660_deftstamp __P((struct iso_directory_record *,
@ -138,6 +139,9 @@ void cd9660_deftstamp __P((struct iso_directory_record *,
struct vnode *cd9660_ihashget __P((dev_t, ino_t)); struct vnode *cd9660_ihashget __P((dev_t, ino_t));
void cd9660_ihashins __P((struct iso_node *)); void cd9660_ihashins __P((struct iso_node *));
void cd9660_ihashrem __P((struct iso_node *)); void cd9660_ihashrem __P((struct iso_node *));
int cd9660_tstamp_conv7 __P((char *, struct timespec *));
int cd9660_tstamp_conv17 __P((char *, struct timespec *));
ino_t isodirino __P((struct iso_directory_record *, struct iso_mnt *));
#ifdef ISODEVMAP #ifdef ISODEVMAP
struct iso_dnode *iso_dmap __P((dev_t, ino_t, int)); struct iso_dnode *iso_dmap __P((dev_t, ino_t, int));
void iso_dunmap __P((dev_t)); void iso_dunmap __P((dev_t));

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_rrip.c,v 1.7 1994/09/19 09:09:46 mycroft Exp $ */ /* $NetBSD: cd9660_rrip.c,v 1.8 1994/09/22 02:44:39 mycroft Exp $ */
/*- /*-
* Copyright (c) 1993, 1994 * Copyright (c) 1993, 1994
@ -326,7 +326,7 @@ cd9660_rrip_tstamp(p,ana)
cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_mtime); cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_mtime);
ptime += 7; ptime += 7;
} else } else
bzero(&ana->inop->inode.iso_mtime,sizeof(struct timeval)); bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec));
if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) {
cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime); cd9660_tstamp_conv7(ptime,&ana->inop->inode.iso_atime);
@ -347,7 +347,7 @@ cd9660_rrip_tstamp(p,ana)
cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_mtime); cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_mtime);
ptime += 17; ptime += 17;
} else } else
bzero(&ana->inop->inode.iso_mtime,sizeof(struct timeval)); bzero(&ana->inop->inode.iso_mtime,sizeof(struct timespec));
if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) { if (*p->flags&ISO_SUSP_TSTAMP_ACCESS) {
cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime); cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_atime);