Fix newfs_udf to create a valid disc images on bigendian machines.
This commit is contained in:
parent
68ab535bfd
commit
f30b0e943b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: udf_create.c,v 1.15 2009/02/15 08:23:31 dholland Exp $ */
|
||||
/* $NetBSD: udf_create.c,v 1.16 2009/05/19 12:13:02 reinoud Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006, 2008 Reinoud Zandijk
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: udf_create.c,v 1.15 2009/02/15 08:23:31 dholland Exp $");
|
||||
__RCSID("$NetBSD: udf_create.c,v 1.16 2009/05/19 12:13:02 reinoud Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1055,7 +1055,7 @@ udf_update_lvintd(int type)
|
|||
assert(lvid);
|
||||
assert(logvol);
|
||||
|
||||
lvid->integrity_type = udf_rw16(type);
|
||||
lvid->integrity_type = udf_rw32(type);
|
||||
|
||||
num_partmappings = udf_rw32(logvol->n_pm);
|
||||
|
||||
|
@ -1298,7 +1298,7 @@ udf_create_parentfid(struct fileid_desc *fid, struct long_ad *parent,
|
|||
fid->file_char = UDF_FILE_CHAR_DIR | UDF_FILE_CHAR_PAR;
|
||||
fid->icb = *parent;
|
||||
fid->icb.longad_uniqueid = udf_rw32((uint32_t) unique_id);
|
||||
fid->tag.desc_crc_len = fidsize - UDF_DESC_TAG_LENGTH;
|
||||
fid->tag.desc_crc_len = udf_rw16(fidsize - UDF_DESC_TAG_LENGTH);
|
||||
|
||||
/* we have to do the fid here explicitly for simplicity */
|
||||
udf_validate_tag_and_crc_sums((union dscrptr *) fid);
|
||||
|
|
Loading…
Reference in New Issue