Lines Matching refs:sp

533 insert_pmtab(struct pmtab *sp)  in insert_pmtab()  argument
548 ret = strcmp(sp->p_tag, tsp->p_tag); in insert_pmtab()
560 if (same_entry(tsp, sp)) { /* same entry */ in insert_pmtab()
563 if ((sp->p_flags & X_FLAG) && in insert_pmtab()
564 ((sp->p_dmsg == NULL) || in insert_pmtab()
565 (*(sp->p_dmsg) == '\0'))) { in insert_pmtab()
571 sp->p_tag); in insert_pmtab()
574 sp->p_next = tsp->p_next; in insert_pmtab()
576 PMtab = sp; in insert_pmtab()
578 savtsp->p_next = sp; in insert_pmtab()
580 sp->p_status = CHANGED; in insert_pmtab()
581 sp->p_fd = tsp->p_fd; in insert_pmtab()
582 sp->p_childpid = in insert_pmtab()
584 sp->p_inservice = in insert_pmtab()
586 sp = tsp; in insert_pmtab()
591 free_pmtab(sp); in insert_pmtab()
594 if ((sp->p_flags & X_FLAG) && in insert_pmtab()
595 ((sp->p_dmsg == NULL) || in insert_pmtab()
596 (*(sp->p_dmsg) == '\0'))) { /* disabled entry */ in insert_pmtab()
597 free_pmtab(sp); in insert_pmtab()
606 if (*sp->p_softcar != '\0') in insert_pmtab()
607 set_softcar(sp); in insert_pmtab()
611 sp->p_next = PMtab; in insert_pmtab()
612 PMtab = sp; in insert_pmtab()
614 sp->p_next = savtsp->p_next; in insert_pmtab()
615 savtsp->p_next = sp; in insert_pmtab()
618 debug("adding <%s>", sp->p_tag); in insert_pmtab()
622 sp->p_status = VALID; in insert_pmtab()
631 if ((sp->p_flags & X_FLAG) && in insert_pmtab()
632 ((sp->p_dmsg == NULL) || in insert_pmtab()
633 (*(sp->p_dmsg) == '\0'))) { /* disabled entry */ in insert_pmtab()
634 free_pmtab(sp); /* do not poll this entry */ in insert_pmtab()
643 if (*sp->p_softcar != '\0') in insert_pmtab()
644 set_softcar(sp); in insert_pmtab()
645 sp->p_next = NULL; in insert_pmtab()
647 PMtab = sp; in insert_pmtab()
649 savtsp->p_next = sp; in insert_pmtab()
651 debug("adding <%s>", sp->p_tag); in insert_pmtab()
655 sp->p_status = VALID; in insert_pmtab()
665 struct pmtab *sp; /* working pointer */ in purge() local
671 sp = savesp = PMtab; in purge()
672 while (sp) { in purge()
673 if (sp->p_status) { in purge()
677 savesp = sp; in purge()
678 sp = sp->p_next; in purge()
680 tsp = sp; in purge()
682 PMtab = sp->p_next; in purge()
685 savesp->p_next = sp->p_next; in purge()
688 debug("purging <%s>", sp->p_tag); in purge()
690 sp = sp->p_next; in purge()