From b0bc01c3491b1848be736945816dbf29b1430b1a Mon Sep 17 00:00:00 2001 From: eeb Date: Tue, 8 Apr 2003 00:32:36 +0000 Subject: [PATCH] * Landing b_swab --- lustre/obdclass/debug.c | 8 ++++---- lustre/obdclass/statfs_pack.c | 19 ------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/lustre/obdclass/debug.c b/lustre/obdclass/debug.c index 6118084..1ff39e8 100644 --- a/lustre/obdclass/debug.c +++ b/lustre/obdclass/debug.c @@ -104,8 +104,8 @@ int page_debug_setup(void *addr, int len, __u64 off, __u64 id) { LASSERT(addr); - off = HTON__u64(off); - id = HTON__u64(id); + off = cpu_to_le64 (off); + id = cpu_to_le64 (id); memcpy(addr, (char *)&off, LPDS); memcpy(addr + LPDS, (char *)&id, LPDS); @@ -123,8 +123,8 @@ int page_debug_check(char *who, void *addr, int end, __u64 off, __u64 id) LASSERT(addr); - ne_off = HTON__u64(off); - id = HTON__u64(id); + ne_off = le64_to_cpu (off); + id = le64_to_cpu (id); if (memcmp(addr, (char *)&ne_off, LPDS)) { CERROR("%s: id "LPU64" offset "LPU64" off: "LPX64" != "LPX64"\n", who, id, off, *(__u64 *)addr, ne_off); diff --git a/lustre/obdclass/statfs_pack.c b/lustre/obdclass/statfs_pack.c index cd10f65..854540f 100644 --- a/lustre/obdclass/statfs_pack.c +++ b/lustre/obdclass/statfs_pack.c @@ -40,23 +40,6 @@ #include #include -void obd_statfs_pack(struct obd_statfs *tgt, struct obd_statfs *src) -{ - tgt->os_type = HTON__u64(src->os_type); - tgt->os_blocks = HTON__u64(src->os_blocks); - tgt->os_bfree = HTON__u64(src->os_bfree); - tgt->os_bavail = HTON__u64(src->os_bavail); - tgt->os_files = HTON__u64(src->os_files); - tgt->os_ffree = HTON__u64(src->os_ffree); - tgt->os_bsize = HTON__u32(src->os_bsize); - tgt->os_namelen = HTON__u32(src->os_namelen); -} - -void obd_statfs_unpack(struct obd_statfs *tgt, struct obd_statfs *src) -{ - obd_statfs_pack(tgt, src); -} - void statfs_pack(struct obd_statfs *osfs, struct statfs *sfs) { osfs->os_type = sfs->f_type; @@ -108,8 +91,6 @@ int obd_self_statfs(struct obd_device *obd, struct statfs *sfs) RETURN(rc); } -EXPORT_SYMBOL(obd_statfs_pack); -EXPORT_SYMBOL(obd_statfs_unpack); EXPORT_SYMBOL(statfs_pack); EXPORT_SYMBOL(statfs_unpack); EXPORT_SYMBOL(obd_self_statfs); -- 1.8.3.1