aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/shm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index d05f6b564998..790240cd067f 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1058,16 +1058,16 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
1058static int sysvipc_shm_proc_show(struct seq_file *s, void *it) 1058static int sysvipc_shm_proc_show(struct seq_file *s, void *it)
1059{ 1059{
1060 struct shmid_kernel *shp = it; 1060 struct shmid_kernel *shp = it;
1061 char *format;
1062 1061
1063#define SMALL_STRING "%10d %10d %4o %10u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" 1062#if BITS_PER_LONG <= 32
1064#define BIG_STRING "%10d %10d %4o %21u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" 1063#define SIZE_SPEC "%10lu"
1064#else
1065#define SIZE_SPEC "%21lu"
1066#endif
1065 1067
1066 if (sizeof(size_t) <= sizeof(int)) 1068 return seq_printf(s,
1067 format = SMALL_STRING; 1069 "%10d %10d %4o " SIZE_SPEC " %5u %5u "
1068 else 1070 "%5lu %5u %5u %5u %5u %10lu %10lu %10lu\n",
1069 format = BIG_STRING;
1070 return seq_printf(s, format,
1071 shp->shm_perm.key, 1071 shp->shm_perm.key,
1072 shp->shm_perm.id, 1072 shp->shm_perm.id,
1073 shp->shm_perm.mode, 1073 shp->shm_perm.mode,