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
This commit is contained in:
Axel Dörfler 2005-08-18 15:13:03 +00:00
parent f79ba0f9ba
commit cd661dfcf8

View File

@ -114,6 +114,7 @@ dump_sem(struct sem_entry *sem)
static int static int
dump_sem_info(int argc, char **argv) dump_sem_info(int argc, char **argv)
{ {
bool found = false;
addr_t num; addr_t num;
int32 i; int32 i;
@ -143,11 +144,12 @@ dump_sem_info(int argc, char **argv)
if (sSems[i].u.used.name != NULL if (sSems[i].u.used.name != NULL
&& strcmp(argv[1], sSems[i].u.used.name) == 0) { && strcmp(argv[1], sSems[i].u.used.name) == 0) {
dump_sem(&sSems[i]); 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; return 0;
} }