-/* $OpenBSD: direntry.h,v 1.2 2021/12/23 04:37:12 jsg Exp $ */
+/* $OpenBSD: direntry.h,v 1.3 2023/08/11 04:51:36 guenther Exp $ */
/* $NetBSD: direntry.h,v 1.13 1997/10/17 11:23:45 ws Exp $ */
/*-
#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
#define DD_YEAR_SHIFT 9
-void unix2dostime(struct timespec *tsp, int minuteswest, u_int16_t *ddp,
- u_int16_t *dtp, u_int8_t *dhp);
+void unix2dostime(const struct timespec *tsp, int minuteswest,
+ u_int16_t *ddp, u_int16_t *dtp, u_int8_t *dhp);
int unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen);
int unix2winfn(u_char *un, int unlen, struct winentry *wep, int cnt,
int chksum);
-/* $OpenBSD: msdosfs_conv.c,v 1.2 2021/10/06 00:40:41 deraadt Exp $ */
+/* $OpenBSD: msdosfs_conv.c,v 1.3 2023/08/11 04:51:36 guenther Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23:54 ws Exp $ */
/*-
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
-unix2dostime(struct timespec *tsp, int minuteswest, u_int16_t *ddp,
+unix2dostime(const struct timespec *tsp, int minuteswest, u_int16_t *ddp,
u_int16_t *dtp, u_int8_t *dhp)
{
time_t t;
-/* $OpenBSD: msdosfs_vnops.c,v 1.9 2021/10/06 00:40:41 deraadt Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.10 2023/08/11 04:51:36 guenther Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.17 2016/01/30 09:59:27 mlelstv Exp $ */
/*-
msdosfs_times(struct msdosfsmount *pmp, struct denode *dep,
const struct stat *st)
{
- struct timespec at = st->st_atimespec;
- struct timespec mt = st->st_mtimespec;
- unix2dostime(&at, pmp->pm_minuteswest, &dep->de_ADate, NULL, NULL);
- unix2dostime(&mt, pmp->pm_minuteswest, &dep->de_MDate, &dep->de_MTime, NULL);
+ unix2dostime(&st->st_atim, pmp->pm_minuteswest, &dep->de_ADate,
+ NULL, NULL);
+ unix2dostime(&st->st_mtim, pmp->pm_minuteswest, &dep->de_MDate,
+ &dep->de_MTime, NULL);
}
/*