Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs Fix some more MKREPRO issues in cdrom creati...
details: https://anonhg.NetBSD.org/src/rev/33bd5b521cfe
branches: trunk
changeset: 812556:33bd5b521cfe
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 21 03:19:17 2015 +0000
description:
Fix some more MKREPRO issues in cdrom creation. Now amd64 passes MKREPRO.
diffstat:
usr.sbin/makefs/cd9660.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diffs (97 lines):
diff -r 8300da9b21d1 -r 33bd5b521cfe usr.sbin/makefs/cd9660.c
--- a/usr.sbin/makefs/cd9660.c Mon Dec 21 00:58:08 2015 +0000
+++ b/usr.sbin/makefs/cd9660.c Mon Dec 21 03:19:17 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660.c,v 1.50 2015/11/25 00:48:49 christos Exp $ */
+/* $NetBSD: cd9660.c,v 1.51 2015/12/21 03:19:17 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.50 2015/11/25 00:48:49 christos Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.51 2015/12/21 03:19:17 christos Exp $");
#endif /* !__lint */
#include <string.h>
@@ -483,7 +483,7 @@
*/
void
cd9660_makefs(const char *image, const char *dir, fsnode *root,
- fsinfo_t *fsopts)
+ fsinfo_t *fsopts)
{
int64_t startoffset;
int numDirectories;
@@ -661,7 +661,7 @@
static void
cd9660_finalize_PVD(iso9660_disk *diskStructure)
{
- time_t tim;
+ time_t tstamp = stampst.st_ino ? stampst.st_mtime : time(NULL);
/* root should be a fixed size of 34 bytes since it has no name */
memcpy(diskStructure->primaryDescriptor.root_directory_record,
@@ -710,23 +710,23 @@
diskStructure->primaryDescriptor.bibliographic_file_id, 37);
/* Setup dates */
- time(&tim);
cd9660_time_8426(
(unsigned char *)diskStructure->primaryDescriptor.creation_date,
- tim);
+ tstamp);
cd9660_time_8426(
(unsigned char *)diskStructure->primaryDescriptor.modification_date,
- tim);
+ tstamp);
- /*
- cd9660_set_date(diskStructure->primaryDescriptor.expiration_date, now);
- */
+#if 0
+ cd9660_set_date(diskStructure->primaryDescriptor.expiration_date,
+ tstamp);
+#endif
memset(diskStructure->primaryDescriptor.expiration_date, '0' ,16);
diskStructure->primaryDescriptor.expiration_date[16] = 0;
cd9660_time_8426(
(unsigned char *)diskStructure->primaryDescriptor.effective_date,
- tim);
+ tstamp);
}
static void
@@ -821,7 +821,7 @@
static int
cd9660_translate_node_common(iso9660_disk *diskStructure, cd9660node *newnode)
{
- time_t tim;
+ time_t tstamp = stampst.st_ino ? stampst.st_mtime : time(NULL);
u_char flag;
char temp[ISO_FILENAME_MAXLENGTH_WITH_PADDING];
@@ -841,9 +841,8 @@
/* Set the various dates */
/* If we want to use the current date and time */
- time(&tim);
- cd9660_time_915(newnode->isoDirRecord->date, tim);
+ cd9660_time_915(newnode->isoDirRecord->date, tstamp);
cd9660_bothendian_dword(newnode->fileDataLength,
newnode->isoDirRecord->size);
@@ -883,7 +882,8 @@
return 0;
/* Finally, overwrite some of the values that are set by default */
- cd9660_time_915(newnode->isoDirRecord->date, node->inode->st.st_mtime);
+ cd9660_time_915(newnode->isoDirRecord->date,
+ stampst.st_ino ? stampst.st_mtime : node->inode->st.st_mtime);
return 1;
}
Home |
Main Index |
Thread Index |
Old Index