Compare commits

..

No commits in common. "daaee5e7e6a896cebe5336d351b4f47d3696a644" and "ac9d55330dae598659743875e0b30a517d3d8ae3" have entirely different histories.

3 changed files with 14 additions and 20 deletions

2
README
View File

@ -209,5 +209,5 @@ We are firmly committed to allow GPLv2+ now and with future releases.
Signed: Mario Danic, Thomas Schmitt
Agreement joined later by: Vreixo Formoso
Public contact: <bug-xorriso@gnu.org>
Public contact: <libburn-hackers@pykix.org>

View File

@ -543,14 +543,11 @@ int hfsplus_writer_compute_data_blocks(IsoImageWriter *writer)
}
static inline uint32_t mac_time_offset(uint32_t t)
static void set_time (uint32_t *tm, uint32_t t)
{
uint32_t val;
iso_msb ((uint8_t *) &val, t + 2082844800, sizeof(val));
return val;
iso_msb ((uint8_t *) tm, t + 2082844800, 4);
}
int nop_writer_write_vol_desc(IsoImageWriter *writer)
{
return ISO_SUCCESS;
@ -618,9 +615,9 @@ write_sb (Ecma119Image *t)
/* Cleanly unmounted, software locked. */
iso_msb ((uint8_t *) &sb.attributes, (1 << 8) | (1 << 15), 4);
iso_msb ((uint8_t *) &sb.last_mounted_version, 0x6c69736f, 4);
sb.ctime = mac_time_offset(t->now);
sb.utime = mac_time_offset(t->now);
sb.fsck_time = mac_time_offset(t->now);
set_time (&sb.ctime, t->now);
set_time (&sb.utime, t->now);
set_time (&sb.fsck_time, t->now);
iso_msb ((uint8_t *) &sb.file_count, t->hfsp_nfiles, 4);
iso_msb ((uint8_t *) &sb.folder_count, t->hfsp_ndirs - 1, 4);
iso_msb ((uint8_t *) &sb.blksize, block_size, 4);
@ -853,11 +850,12 @@ int hfsplus_writer_write_data(IsoImageWriter *writer)
((uint8_t *) &common->type)[1] = t->hfsp_leafs[curnode].type;
iso_msb ((uint8_t *) &common->valence, t->hfsp_leafs[curnode].nchildren, 4);
iso_msb ((uint8_t *) &common->fileid, t->hfsp_leafs[curnode].cat_id, 4);
common->ctime = mac_time_offset(t->hfsp_leafs[curnode].node->ctime);
common->mtime = mac_time_offset(t->hfsp_leafs[curnode].node->mtime);
set_time (&common->ctime, t->hfsp_leafs[curnode].node->ctime);
set_time (&common->mtime, t->hfsp_leafs[curnode].node->mtime);
/* FIXME: distinguish attr_mtime and mtime. */
common->attr_mtime = mac_time_offset(t->hfsp_leafs[curnode].node->mtime);
common->atime = mac_time_offset(t->hfsp_leafs[curnode].node->atime);
set_time (&common->attr_mtime, t->hfsp_leafs[curnode].node->mtime);
set_time (&common->atime, t->hfsp_leafs[curnode].node->atime);
iso_msb ((uint8_t *) &common->uid, px_get_uid (t, t->hfsp_leafs[curnode].node), 4);
iso_msb ((uint8_t *) &common->gid, px_get_gid (t, t->hfsp_leafs[curnode].node), 4);
iso_msb ((uint8_t *) &common->mode, px_get_mode (t, t->hfsp_leafs[curnode].node, (t->hfsp_leafs[curnode].type == HFSPLUS_DIR)), 2);

View File

@ -1035,7 +1035,7 @@ int iso_quick_apm_entry(struct iso_apm_partition_request **req_array,
uint32_t start_block, uint32_t block_count,
char *name, char *type)
{
int ret, l;
int ret;
struct iso_apm_partition_request *entry;
entry = calloc(1, sizeof(struct iso_apm_partition_request));
@ -1043,12 +1043,8 @@ int iso_quick_apm_entry(struct iso_apm_partition_request **req_array,
return ISO_OUT_OF_MEM;
entry->start_block = start_block;
entry->block_count = block_count;
memset((char *) entry->name, 0, 32);
for (l = 0; l < 32 && name[l] != 0; l++);
memcpy((char *) entry->name, name, l);
memset((char *) entry->type, 0, 32);
for (l = 0; l < 32 && type[l] != 0; l++);
memcpy((char *) entry->type, type, l);
memcpy((char *) entry->name, name, 32);
memcpy((char *) entry->type, type, 32);
entry->req_status = 0;
ret = iso_register_apm_entry(req_array, apm_req_count, entry, 0);
free(entry);