Re: le32_to_cpu() help...

Jes Sorensen (Jes.Sorensen@cern.ch)
02 Nov 1999 12:25:15 +0100


>>>>> "dony" == dony <dony.he@huawei.com.cn> writes:

dony> I know this. I just don't know what data is in little endian and
dony> what data is in big endian. say the following code ....

dony> struct ext2_super_block * es; struct super_block * sb;
dony> ..............................
dony> es->smtime=cpu_to_le32(CURRENT_TIME); //why here use cpu_to_le32?
dony> sb->u.ext2_sb.s_mount_state=le32_to_cpu(es->state); //why use
dony> sb->le32_to_cpu here?

Because the data pointed to by es is to be stored on disk, sb resides
in memory only.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/