* [PATCH 0/5] minor cosmetics and build issues for non-Linux
@ 2016-03-21 13:04 Ruediger Meier
2016-03-21 13:04 ` [PATCH 1/5] build-sys: some libmount test progs are Linux only Ruediger Meier
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Ruediger Meier @ 2016-03-21 13:04 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <ruediger.meier@ga-group.nl>
Ruediger Meier (5):
build-sys: some libmount test progs are Linux only
build-sys: pylibmount, mount context is Linux only
sulogin: ignore missing WEXITED, add warning
tests: skip ipcs test which require /proc
ipcs: consolidate output header printing
libmount/python/Makemodule.am | 6 ++++--
libmount/python/pylibmount.c | 2 ++
libmount/python/pylibmount.h | 4 ++++
libmount/src/Makemodule.am | 6 ++++--
login-utils/sulogin.c | 5 +++++
sys-utils/ipcs.c | 16 +++++++++++-----
tests/ts/ipcs/functions.sh | 2 ++
7 files changed, 32 insertions(+), 9 deletions(-)
--
1.8.4.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] build-sys: some libmount test progs are Linux only
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
@ 2016-03-21 13:04 ` Ruediger Meier
2016-03-21 13:04 ` [PATCH 2/5] build-sys: pylibmount, mount context is " Ruediger Meier
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ruediger Meier @ 2016-03-21 13:04 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <rudi@localhost>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
libmount/src/Makemodule.am | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libmount/src/Makemodule.am b/libmount/src/Makemodule.am
index fd007a4..8c5ef08 100644
--- a/libmount/src/Makemodule.am
+++ b/libmount/src/Makemodule.am
@@ -74,7 +74,6 @@ EXTRA_DIST += \
if BUILD_LIBMOUNT_TESTS
check_PROGRAMS += \
test_mount_cache \
- test_mount_context \
test_mount_lock \
test_mount_optstr \
test_mount_tab \
@@ -82,8 +81,11 @@ check_PROGRAMS += \
test_mount_tab_update \
test_mount_utils \
test_mount_version \
- test_mount_monitor \
test_mount_debug
+if LINUX
+check_PROGRAMS += test_mount_context
+check_PROGRAMS += test_mount_monitor
+endif
libmount_tests_cflags = -DTEST_PROGRAM $(libmount_la_CFLAGS) $(NO_UNUSED_WARN_CFLAGS)
libmount_tests_ldflags = libblkid.la -static
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] build-sys: pylibmount, mount context is Linux only
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
2016-03-21 13:04 ` [PATCH 1/5] build-sys: some libmount test progs are Linux only Ruediger Meier
@ 2016-03-21 13:04 ` Ruediger Meier
2016-03-21 13:04 ` [PATCH 3/5] sulogin: ignore missing WEXITED, add warning Ruediger Meier
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ruediger Meier @ 2016-03-21 13:04 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <rudi@localhost>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
libmount/python/Makemodule.am | 6 ++++--
libmount/python/pylibmount.c | 2 ++
libmount/python/pylibmount.h | 4 ++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libmount/python/Makemodule.am b/libmount/python/Makemodule.am
index 367d324..9964e31 100644
--- a/libmount/python/Makemodule.am
+++ b/libmount/python/Makemodule.am
@@ -12,8 +12,10 @@ pylibmount_la_SOURCES = \
libmount/python/pylibmount.c \
libmount/python/pylibmount.h \
libmount/python/fs.c \
- libmount/python/tab.c \
- libmount/python/context.c
+ libmount/python/tab.c
+if LINUX
+pylibmount_la_SOURCES += libmount/python/context.c
+endif
pylibmount_la_LIBADD = libmount.la $(PYTHON_LIBS)
diff --git a/libmount/python/pylibmount.c b/libmount/python/pylibmount.c
index c538bb5..54d7dfa 100644
--- a/libmount/python/pylibmount.c
+++ b/libmount/python/pylibmount.c
@@ -229,7 +229,9 @@ PyMODINIT_FUNC initpylibmount(void)
FS_AddModuleObject(m);
Table_AddModuleObject(m);
+#ifdef __linux__
Context_AddModuleObject(m);
+#endif
/*
* mount(8) userspace options masks (MNT_MAP_USERSPACE map)
diff --git a/libmount/python/pylibmount.h b/libmount/python/pylibmount.h
index 1a08796..7a37014 100644
--- a/libmount/python/pylibmount.h
+++ b/libmount/python/pylibmount.h
@@ -94,6 +94,8 @@ extern void Table_AddModuleObject(PyObject *mod);
extern int pymnt_table_parser_errcb(struct libmnt_table *tb, const char *filename, int line);
+#ifdef __linux__
+
/*
* context.c
*/
@@ -108,6 +110,8 @@ typedef struct {
extern PyTypeObject ContextType;
extern void Context_AddModuleObject(PyObject *mod);
+#endif /* __linux__ */
+
/*
* misc
*/
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] sulogin: ignore missing WEXITED, add warning
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
2016-03-21 13:04 ` [PATCH 1/5] build-sys: some libmount test progs are Linux only Ruediger Meier
2016-03-21 13:04 ` [PATCH 2/5] build-sys: pylibmount, mount context is " Ruediger Meier
@ 2016-03-21 13:04 ` Ruediger Meier
2016-03-21 13:04 ` [PATCH 4/5] tests: skip ipcs test which require /proc Ruediger Meier
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ruediger Meier @ 2016-03-21 13:04 UTC (permalink / raw)
To: util-linux; +Cc: Werner Fink
From: Ruediger Meier <rudi@localhost>
This happens on Debian kFreeBSD and probably on Hurd too since
cde7699c. One should review this issue to fix it properly.
CC: Werner Fink <werner@suse.de>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
login-utils/sulogin.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index b2c778a..c6d17b3 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -80,6 +80,11 @@ static volatile sig_atomic_t sigchild;
# define IUCLC 0
#endif
+#ifndef WEXITED
+# warning "WEXITED is missing, sulogin may not work as expected"
+# define WEXITED 0
+#endif
+
static int locked_account_password(const char *passwd)
{
if (passwd && (*passwd == '*' || *passwd == '!'))
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] tests: skip ipcs test which require /proc
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
` (2 preceding siblings ...)
2016-03-21 13:04 ` [PATCH 3/5] sulogin: ignore missing WEXITED, add warning Ruediger Meier
@ 2016-03-21 13:04 ` Ruediger Meier
2016-03-21 13:04 ` [PATCH 5/5] ipcs: consolidate output header printing Ruediger Meier
2016-03-21 20:04 ` [PATCH 0/5] minor cosmetics and build issues for non-Linux Karel Zak
5 siblings, 0 replies; 7+ messages in thread
From: Ruediger Meier @ 2016-03-21 13:04 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
tests/ts/ipcs/functions.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/ts/ipcs/functions.sh b/tests/ts/ipcs/functions.sh
index 80c9416..a9cf228 100644
--- a/tests/ts/ipcs/functions.sh
+++ b/tests/ts/ipcs/functions.sh
@@ -16,6 +16,8 @@
# GNU General Public License for more details.
#
+test -f /proc/sys/kernel/shmall || ts_skip "no /proc"
+
PAGE_SIZE=$($TS_HELPER_SYSINFO pagesize)
# kernel files
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] ipcs: consolidate output header printing
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
` (3 preceding siblings ...)
2016-03-21 13:04 ` [PATCH 4/5] tests: skip ipcs test which require /proc Ruediger Meier
@ 2016-03-21 13:04 ` Ruediger Meier
2016-03-21 20:04 ` [PATCH 0/5] minor cosmetics and build issues for non-Linux Karel Zak
5 siblings, 0 replies; 7+ messages in thread
From: Ruediger Meier @ 2016-03-21 13:04 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <ruediger.meier@ga-group.nl>
Print a warning (instead of header) if --limits fails, like we did
it in past (2.20.1) and like we are still doing for --summary. Note
in past we were printing the same message like for --summary
"kernel not configured for ...", but actually this message is not
really correct.
This patch simply consolidates the current behavior. Probably we
should refactor it regarding warnings (stderr) and exit codes.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
sys-utils/ipcs.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 0ebcc4c..10ce238 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -199,9 +199,11 @@ static void do_shm (char format, int unit)
{
struct ipc_limits lim;
- printf (_("------ Shared Memory Limits --------\n"));
- if (ipc_shm_get_limits(&lim))
+ if (ipc_shm_get_limits(&lim)) {
+ printf (_("unable to fetch shared memory limits\n"));
return;
+ }
+ printf (_("------ Shared Memory Limits --------\n"));
printf (_("max number of segments = %ju\n"), lim.shmmni);
ipc_print_size(unit == IPC_UNIT_DEFAULT ? IPC_UNIT_KB : unit,
_("max seg size"), lim.shmmax, "\n", 0);
@@ -351,9 +353,11 @@ static void do_sem (char format)
{
struct ipc_limits lim;
- printf (_("------ Semaphore Limits --------\n"));
- if (ipc_sem_get_limits(&lim))
+ if (ipc_sem_get_limits(&lim)) {
+ printf (_("unable to fetch semaphore limits\n"));
return;
+ }
+ printf (_("------ Semaphore Limits --------\n"));
printf (_("max number of arrays = %d\n"), lim.semmni);
printf (_("max semaphores per array = %d\n"), lim.semmsl);
printf (_("max semaphores system wide = %d\n"), lim.semmns);
@@ -451,8 +455,10 @@ static void do_msg (char format, int unit)
{
struct ipc_limits lim;
- if (ipc_msg_get_limits(&lim))
+ if (ipc_msg_get_limits(&lim)) {
+ printf (_("unable to fetch message limits\n"));
return;
+ }
printf (_("------ Messages Limits --------\n"));
printf (_("max queues system wide = %d\n"), lim.msgmni);
ipc_print_size(unit == IPC_UNIT_DEFAULT ? IPC_UNIT_BYTES : unit,
--
1.8.4.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] minor cosmetics and build issues for non-Linux
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
` (4 preceding siblings ...)
2016-03-21 13:04 ` [PATCH 5/5] ipcs: consolidate output header printing Ruediger Meier
@ 2016-03-21 20:04 ` Karel Zak
5 siblings, 0 replies; 7+ messages in thread
From: Karel Zak @ 2016-03-21 20:04 UTC (permalink / raw)
To: Ruediger Meier; +Cc: util-linux
On Mon, Mar 21, 2016 at 02:04:40PM +0100, Ruediger Meier wrote:
> libmount/python/Makemodule.am | 6 ++++--
> libmount/python/pylibmount.c | 2 ++
> libmount/python/pylibmount.h | 4 ++++
> libmount/src/Makemodule.am | 6 ++++--
> login-utils/sulogin.c | 5 +++++
> sys-utils/ipcs.c | 16 +++++++++++-----
> tests/ts/ipcs/functions.sh | 2 ++
> 7 files changed, 32 insertions(+), 9 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-03-21 20:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 13:04 [PATCH 0/5] minor cosmetics and build issues for non-Linux Ruediger Meier
2016-03-21 13:04 ` [PATCH 1/5] build-sys: some libmount test progs are Linux only Ruediger Meier
2016-03-21 13:04 ` [PATCH 2/5] build-sys: pylibmount, mount context is " Ruediger Meier
2016-03-21 13:04 ` [PATCH 3/5] sulogin: ignore missing WEXITED, add warning Ruediger Meier
2016-03-21 13:04 ` [PATCH 4/5] tests: skip ipcs test which require /proc Ruediger Meier
2016-03-21 13:04 ` [PATCH 5/5] ipcs: consolidate output header printing Ruediger Meier
2016-03-21 20:04 ` [PATCH 0/5] minor cosmetics and build issues for non-Linux Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.