From 92f7ed4a92abf85b9b1cdfb0cae06e50a5f8319d Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 6 May 2009 17:46:07 +0000 Subject: [PATCH] b=19400 i=rread i=manoj pack the structs shared across machines --- lustre/include/lustre/lustre_idl.h | 2 +- lustre/utils/liblustreapi.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index da3e30b..b838c49 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -2372,7 +2372,7 @@ enum changelog_rec_type { struct changelog_setinfo { __u64 cs_recno; __u32 cs_id; -}; +} __attribute__((packed)); /** changelog record */ struct llog_changelog_rec { diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 506f581..798d530 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -2513,7 +2513,7 @@ int llapi_changelog_clear(const char *mdtname, const char *idstr, fd = get_root_fd((char *)mdtname); if (fd < 0) { llapi_err(LLAPI_MSG_ERROR | LLAPI_MSG_NO_ERRNO, - "can't open fs root for '%s': %d\n", mdtname, fd); + "can't open fs root for '%s': %d", mdtname, fd); return fd; } @@ -2522,8 +2522,7 @@ int llapi_changelog_clear(const char *mdtname, const char *idstr, data.icc_recno = endrec; rc = ioctl(fd, OBD_IOC_CHANGELOG_CLEAR, &data); if (rc) - llapi_err(LLAPI_MSG_ERROR | LLAPI_MSG_NO_ERRNO, - "ioctl err %d", rc); + llapi_err(LLAPI_MSG_ERROR, "ioctl err %d", rc); close(fd); return rc; -- 1.8.3.1