version 1.108, 2024/04/02 05:21:32 |
version 1.109, 2024/04/22 10:39:51 |
|
|
return 1; |
return 1; |
} |
} |
|
|
void |
int |
ctl_del(int scope, void *arg0, void *arg1) |
ctl_del(int scope, void *arg0, void *arg1) |
{ |
{ |
struct ctl *c, **pc; |
struct ctl *c, **pc; |
|
int found; |
|
|
|
found = 0; |
pc = &ctl_list; |
pc = &ctl_list; |
for (;;) { |
for (;;) { |
c = *pc; |
c = *pc; |
if (c == NULL) |
if (c == NULL) |
return; |
return found; |
if (ctl_match(c, scope, arg0, arg1)) { |
if (ctl_match(c, scope, arg0, arg1)) { |
#ifdef DEBUG |
#ifdef DEBUG |
if (log_level >= 2) { |
if (log_level >= 2) { |
|
|
log_puts(": removed\n"); |
log_puts(": removed\n"); |
} |
} |
#endif |
#endif |
|
found++; |
c->refs_mask &= ~CTL_DEVMASK; |
c->refs_mask &= ~CTL_DEVMASK; |
if (c->refs_mask == 0) { |
if (c->refs_mask == 0) { |
*pc = c->next; |
*pc = c->next; |