bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem building disk_sun.c


From: Alex Kiernan
Subject: Problem building disk_sun.c
Date: 13 Jan 2004 10:08:49 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

On a big endian machine (PowerPC in my case), disk_sun.c fails to
build; I /think/ this is the right fix for the problem, but I can't
easily test it at the moment (it fixes the compile fwiw):

--- parted-1.6.6.orig/libparted/disk_sun.c      2003-06-30 01:48:11.000000000 
+0100
+++ parted-1.6.6/libparted/disk_sun.c   2004-01-04 09:34:36.000000000 +0000
@@ -354,7 +354,7 @@
        if (!ped_device_read (disk->dev, &old_label, 0, 1))
                return;
        if (old_label.info [0]
-           && old_label.magic == PED_CPU_TO_LE32 (SUN_DISK_MAGIC))
+           && PED_BE16_TO_CPU(old_label.magic) == SUN_DISK_MAGIC)
                memcpy (&sun_specific->raw_label, &old_label, 512);
 }
 

-- 
Alex Kiernan, Principal Engineer, Development, THUS plc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]