[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080422223149.GA4845@martell.zuzino.mipt.ru>
Date: Wed, 23 Apr 2008 02:31:49 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...l.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] SHM: tweak /proc/sysvipc/shm banner
"size" field and everything after in banner isn't aligned properly on 64-bit archs.
Before:
key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime
0 0 0 4194304 4749 0 0 1000 1000 1000 1000 0 0 1208902917
After:
key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime
0 0 0 4194304 4745 0 0 1000 1000 1000 1000 0 0 1208902637
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
ipc/shm.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -106,9 +106,14 @@ void shm_exit_ns(struct ipc_namespace *ns)
void __init shm_init (void)
{
+ char *banner;
+
shm_init_ns(&init_ipc_ns);
- ipc_init_proc_interface("sysvipc/shm",
- " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n",
+ if (sizeof(size_t) <= sizeof(int))
+ banner = " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n";
+ else
+ banner = " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n";
+ ipc_init_proc_interface("sysvipc/shm", banner,
IPC_SHM_IDS, sysvipc_shm_proc_show);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists