Commit graph

11 commits

Author SHA1 Message Date
Karel Zak
7d8ea9df69 ipcs: fix compiler warning [clang -Wuninitialized]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-20 15:20:47 +01:00
Karel Zak
278e7203fa ipcs: fix compiler warnings, use 64bit time
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-20 19:52:16 +01:00
Sami Kerola
56692a6701 ipcs: add --human readable size conversion option
Introduces new function ipc_print_size() which will call
size_to_human_string(), and handles the occasional '([k]bytes)' printing
if default size format is requested.

Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:04:53 +01:00
Sami Kerola
2bd2f79dde ipcs: make individual message queue id printing to use /proc
[kzak@redhat.com: - fix msgctl() call,
		  move q_qbytes to ipc_msg_get_info]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-23 14:58:22 +01:00
Sami Kerola
35118dfc31 ipcs: clean up do_msg(), and add ipc_msg_get_info()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-11-23 14:58:22 +01:00
Sami Kerola
b5504a3d4b ipcs: make individual semaphore id printing to use /proc
And reindent the print_shm() function.

[kzak@redhat.com: move semctl(GET*...) calls to ipcutils.c]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-23 14:58:22 +01:00
Sami Kerola
1e2418a234 ipcs: clean up do_sem(), and add ipc_sem_get_info()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-11-23 14:58:22 +01:00
Karel Zak
7d94d1cebc ipcs: fix ipc_shm_get_info(), use calloc
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-23 14:58:21 +01:00
Karel Zak
61e14b4a61 ipcs: clean up do_shm()
- don't expect maxid as argument in ipc_shm_get_info()
 - if there is @id argument then use it everywhere in ipc_shm_get_info()
 - don't call shmctl() if not necessary in do_shm()

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-23 14:58:21 +01:00
Sami Kerola
058e81540f ipcs: read shared memory values from /proc
[kzak@redhat.com: - move to ipcutils.{c,h},
                  - fix datatypes to be arch independent]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-23 14:58:21 +01:00
Sami Kerola
e5995acda2 ipcs: determine ipc limits from /proc
Some of the limit values are not dynamic.  Like in kernel these values
are #defined.

[kzak@redhat.com: - use better names for functions,
                  - add ipcutils.{c,h}
                  - read also shmmax from /proc]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-23 14:58:21 +01:00