Lines Matching refs:slp

225 close_service(struct service_list *slp)
233 assert(slp != NULL);
234 psp = slp->sl_parse;
241 sep = &slp->sl_entry;
256 if (slp == &cfile->pf_global) {
284 logdbg("service %s ends", slp->sl_entry.se_name);
287 if (slp->sl_dev == NULL) {
288 slp->sl_dev = cfile->pf_global.sl_dev;
363 set_service(struct service_list *slp, const char *str)
369 close_service(slp);
372 psp = slp->sl_parse;
373 slp = (struct service_list *)calloc(sizeof (*slp) + strlen(str) + 1,
375 if (slp == NULL) {
383 cfile->pf_svc = slp;
385 cfile->pf_svc_last->sl_next = slp;
386 cfile->pf_svc_last = slp;
390 slp->sl_entry.se_name = (const char *)(slp+1);
391 (void) strcpy((char *)(slp+1), str);
392 logdbg("service %s begins", slp->sl_entry.se_name);
393 slp->sl_serial = psp->ps_serial++;
394 slp->sl_parse = psp;
397 psp->ps_csvc = slp;
405 set_wildcard(struct service_list *slp, const char *str)
408 if (!ISGLOBAL(slp) &&
409 (slp->sl_entry.se_flags & (SEF_WILD|SEF_NOWILD))) {
411 slp->sl_parse->ps_cfile->pf_name, str);
414 slp->sl_entry.se_flags =
415 (slp->sl_entry.se_flags & ~(SEF_WILD|SEF_NOWILD)) |
425 set_debug(struct service_list *slp, const char *str)
427 slp->sl_entry.se_debug++;
428 if (ISGLOBAL(slp) && (slp->sl_parse->ps_flags & PSF_SETLEVEL)) {
429 log_level = slp->sl_entry.se_debug;
439 set_nodebug(struct service_list *slp, const char *str)
441 slp->sl_entry.se_flags |= SEF_DEBUGCLR;
442 slp->sl_entry.se_debug = 0;
443 if (ISGLOBAL(slp) && (slp->sl_parse->ps_flags & PSF_SETLEVEL)) {
444 log_level = slp->sl_entry.se_debug;
454 set_string(struct service_list *slp, const char *str)
458 assert(!(slp->sl_entry.se_flags &
460 switch (slp->sl_parse->ps_state) {
462 cpp = &slp->sl_entry.se_server;
465 cpp = &slp->sl_entry.se_pppd;
468 cpp = &slp->sl_entry.se_path;
471 cpp = &slp->sl_entry.se_extra;
474 cpp = &slp->sl_entry.se_log;
491 set_file(struct service_list *slp, const char *str)
497 close_service(slp);
500 logwarn("%s: %s: %s", slp->sl_parse->ps_cfile->pf_name, str,
516 psp = slp->sl_parse;
531 set_device(struct service_list *slp, const char *str)
533 struct parse_state *psp = slp->sl_parse;
548 if (!(slp->sl_entry.se_flags & SEF_CDEV))
549 free_device_list(slp->sl_dev);
550 slp->sl_dev = psp->ps_star;
551 slp->sl_entry.se_flags |= SEF_CDEV;
586 dlpp = &slp->sl_dev;
587 if (!(slp->sl_entry.se_flags & SEF_CDEV))
591 slp->sl_entry.se_flags &= ~SEF_CDEV;
602 set_client(struct service_list *slp, const char *str)
604 struct parse_state *psp = slp->sl_parse;
616 fep = slp->sl_entry.se_flist;
673 slp->sl_entry.se_flist = fep;
681 set_user(struct service_list *slp, const char *str)
691 slp->sl_parse->ps_cfile->pf_name, str);
697 slp->sl_entry.se_uid = uid;
703 slp->sl_parse->ps_cfile->pf_name, uid, str);
706 slp->sl_entry.se_flags |= SEF_UIDSET;
714 set_group(struct service_list *slp, const char *str)
724 slp->sl_parse->ps_cfile->pf_name, str);
730 slp->sl_entry.se_gid = gid;
733 slp->sl_parse->ps_cfile->pf_name, gid, str);
736 slp->sl_entry.se_flags |= SEF_GIDSET;
749 int (*kwe_func)(struct service_list *slp, const char *str);
1233 struct service_list *slp;
1238 for (slp = pfp->pf_svc; slp != NULL; slp = slp->sl_next)
1239 if (!(slp->sl_entry.se_flags & SEF_CDEV))
1240 ndevs += count_devs(slp->sl_dev);
1258 struct service_list *slp;
1262 for (slp = pfp->pf_svc; slp != NULL; slp = slp->sl_next)
1263 if (!(slp->sl_entry.se_flags & SEF_CDEV))
1264 dnames = devs_to_list(slp->sl_dev, dnames);
1327 struct service_list *slp;
1367 for (slp = psp->ps_files->pf_svc; slp != NULL; slp = slp->sl_next)
1368 for (dlp = slp->sl_dev; dlp != NULL; dlp = dlp->dl_next)
1409 for (slp = osp->os_pfjunk->pf_svc; slp != NULL;
1410 slp = slp->sl_next)
1411 for (dlp = slp->sl_dev; dlp != NULL;
1418 slp->sl_entry.se_name ||
1420 se_name, slp->sl_entry.
1431 *sepp++ = &slp->sl_entry;
1433 SESERIAL(slp->sl_entry))
1434 *se2pp = &slp->sl_entry;
1456 free_service(struct service_list *slp)
1461 if (!(slp->sl_entry.se_flags & SEF_CDEV))
1462 free_device_list(slp->sl_dev);
1463 if (!(slp->sl_entry.se_flags & SEF_CFLIST)) {
1464 fep = slp->sl_entry.se_flist;
1471 if (!(slp->sl_entry.se_flags & SEF_CPPPD) &&
1472 slp->sl_entry.se_pppd != NULL)
1473 free(slp->sl_entry.se_pppd);
1474 if (!(slp->sl_entry.se_flags & SEF_CSERVER) &&
1475 slp->sl_entry.se_server != NULL)
1476 free(slp->sl_entry.se_server);
1477 if (!(slp->sl_entry.se_flags & SEF_CPATH) &&
1478 slp->sl_entry.se_path != NULL)
1479 free(slp->sl_entry.se_path);
1480 if (!(slp->sl_entry.se_flags & SEF_CEXTRA) &&
1481 slp->sl_entry.se_extra != NULL)
1482 free(slp->sl_entry.se_extra);
1483 if (!(slp->sl_entry.se_flags & SEF_CLOG) &&
1484 slp->sl_entry.se_log != NULL)
1485 free(slp->sl_entry.se_log);
1492 free_service_list(struct service_list *slp)
1496 while (slp != NULL) {
1497 free_service(slp);
1498 sln = slp->sl_next;
1499 free(slp);
1500 slp = sln;