James Courtier-Dutton <[EMAIL PROTECTED]> wrote : > xerces8 wrote: > > "Avinash Malik" <[EMAIL PROTECTED]> wrote: > > > > > >> #ifdef __LITTLE_ENDIAN > >> sblock.fs_version = PED_CPU_TO_LE32(fs_verison) > >> #endif > >> #ifdef __BIG_ENDIAN > >> sblock.fs_version = PED_CPU_TO_BE32(fs_version) > >> #endif > >> > > > > This is the same as simply : sblock.fs_version = fs_version; > > > No it is not. >
>From endian.h : #ifdef WORDS_BIGENDIAN #define PED_CPU_TO_BE32(x) (x) // rest deleted ... #else /* !WORDS_BIGENDIAN */ #define PED_CPU_TO_LE32(x) (x) // rest deleted ... #endif So unless __BIG_ENDIAN != WORDS_BIGENDIAN , it is true what I said. And for Avinash, yes this is right. This makes sure, that the on-disk format is always the same. So you can take a disk from a little endian system and put it into a big endian system and it can read the ext3 filesystem right away. Some file systems have two different formats on the disk. One for LE systems and one for BE systems. As I said, figure out what is the correct format for UFS, and then you will have your answer. Regards, David _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

