24 Oct 2009 21:08
Re: disklabel endian issues
Izumi Tsutsui <tsutsui <at> ceres.dti.ne.jp>
2009-10-24 19:08:29 GMT
2009-10-24 19:08:29 GMT
Lloyd Parkes wrote back on June:
> Is it my imagination, or is disklabel not endian aware? $TOOLDIR/bin/
> nbdisklabel-i386 on my Power Mac G5 seems to be creating big endian
> disklabels. This is somewhat less than useful.
>
> Would anyone object if I added a couple of functions to sbin/disklabel/
> main.c to byte swap the struct fields? The hard thing will be working
> out if byte swapping will be needed.
I wonder if you have any progress on this one,
but how about this patch?
---
Index: tools/disklabel/Makefile
===================================================================
RCS file: /cvsroot/src/tools/disklabel/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- tools/disklabel/Makefile 9 Dec 2006 20:13:13 -0000 1.2
+++ tools/disklabel/Makefile 24 Oct 2009 18:35:41 -0000
<at> <at> -2,7 +2,36 <at> <at>
HOSTPROGNAME= nbdisklabel-${MAKEWRAPPERMACHINE}
HOST_SRCDIR= sbin/disklabel
-HOST_SRCS= getcap.c disklabel.c
+HOST_SRCS= getcap.c disklabel.c bswap.c
+
+# XXX should these be defined in <bsd.own.mk>?
+.if ( 0 \
(Continue reading)
RSS Feed