From cd661dfcf839d514b24a63d1cd2565e9ad875ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 18 Aug 2005 15:13:03 +0000 Subject: [PATCH] Now dumps all semaphores matching the name you are searching for, not only the first one. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13974 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/sem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/sem.c b/src/system/kernel/sem.c index 1e80d0e194..8632072dcd 100644 --- a/src/system/kernel/sem.c +++ b/src/system/kernel/sem.c @@ -114,6 +114,7 @@ dump_sem(struct sem_entry *sem) static int dump_sem_info(int argc, char **argv) { + bool found = false; addr_t num; int32 i; @@ -143,11 +144,12 @@ dump_sem_info(int argc, char **argv) if (sSems[i].u.used.name != NULL && strcmp(argv[1], sSems[i].u.used.name) == 0) { dump_sem(&sSems[i]); - return 0; + found = true; } } - kprintf("sem \"%s\" doesn't exist!\n", argv[1]); + if (!found) + kprintf("sem \"%s\" doesn't exist!\n", argv[1]); return 0; }