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 endian bug that resulted in UniqueIDs of...
details: https://anonhg.NetBSD.org/src/rev/f2441c91e7b4
branches: trunk
changeset: 365812:f2441c91e7b4
user: reinoud <reinoud%NetBSD.org@localhost>
date: Tue Apr 26 14:59:37 2022 +0000
description:
Fix endian bug that resulted in UniqueIDs of 0 in file identifiers; note that
the the unique ID in a longad stored in a FID is 32 bit where in the file
descriptor (fe/efe) its 64 bits long.
diffstat:
usr.sbin/makefs/udf.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 73c2989c7bcf -r f2441c91e7b4 usr.sbin/makefs/udf.c
--- a/usr.sbin/makefs/udf.c Tue Apr 26 14:54:40 2022 +0000
+++ b/usr.sbin/makefs/udf.c Tue Apr 26 14:59:37 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.c,v 1.27 2022/04/26 13:27:24 reinoud Exp $ */
+/* $NetBSD: udf.c,v 1.28 2022/04/26 14:59:37 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008, 2013, 2021, 2022 Reinoud Zandijk
@@ -30,7 +30,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: udf.c,v 1.27 2022/04/26 13:27:24 reinoud Exp $");
+__RCSID("$NetBSD: udf.c,v 1.28 2022/04/26 14:59:37 reinoud Exp $");
#include <stdio.h>
#include <stdlib.h>
@@ -666,13 +666,13 @@
if (error)
errx(error, "can't create fe");
*dscr = (union dscrptr *) fe;
- icb->longad_uniqueid = fe->unique_id;
+ icb->longad_uniqueid = udf_rw32(udf_rw64(fe->unique_id));
} else {
error = udf_create_new_efe(&efe, filetype, st);
if (error)
errx(error, "can't create fe");
*dscr = (union dscrptr *) efe;
- icb->longad_uniqueid = efe->unique_id;
+ icb->longad_uniqueid = udf_rw32(udf_rw64(efe->unique_id));
}
return 0;
Home |
Main Index |
Thread Index |
Old Index