Module Name: src
Committed By: reinoud
Date: Tue May 19 12:13:03 UTC 2009
Modified Files:
src/sbin/newfs_udf: udf_create.c
Log Message:
Fix newfs_udf to create a valid disc images on bigendian machines.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/newfs_udf/udf_create.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/newfs_udf/udf_create.c
diff -u src/sbin/newfs_udf/udf_create.c:1.15 src/sbin/newfs_udf/udf_create.c:1.16
--- src/sbin/newfs_udf/udf_create.c:1.15 Sun Feb 15 08:23:31 2009
+++ src/sbin/newfs_udf/udf_create.c Tue May 19 12:13:02 2009
@@ -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 @@
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 @@
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);