• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/adv_cmds-158/ps/

Lines Matching refs:inf

782 addelem_gid(struct listinfo *inf, const char *elem)
791 warnx("Invalid (zero-length) %s name", inf->lname);
793 warnx("%s name too long: %s", inf->lname, elem);
818 warnx("No %s %s '%s'", inf->lname, nameorID, elem);
822 if (inf->count >= inf->maxcount)
823 expand_list(inf);
824 inf->l.gids[(inf->count)++] = grp->gr_gid;
830 addelem_pid(struct listinfo *inf, const char *elem)
844 warnx("Invalid %s: %s", inf->lname, elem);
847 warnx("%s too large: %s", inf->lname, elem);
854 if (inf->count >= inf->maxcount)
855 expand_list(inf);
856 inf->l.pids[(inf->count)++] = tempid;
869 addelem_tty(struct listinfo *inf, const char *elem)
928 if (inf->count >= inf->maxcount)
929 expand_list(inf);
930 inf->l.ttys[(inf->count)++] = sb.st_rdev;
935 addelem_uid(struct listinfo *inf, const char *elem)
943 warnx("Invalid (zero-length) %s name", inf->lname);
945 warnx("%s name too long: %s", inf->lname, elem);
955 warnx("No %s named '%s'", inf->lname, elem);
961 inf->lname, elem);
973 if (inf->count >= inf->maxcount)
974 expand_list(inf);
975 inf->l.uids[(inf->count)++] = pwd->pw_uid;
980 add_list(struct listinfo *inf, const char *argp)
988 inf->addelem(inf, elemcopy);
1008 inf->addelem(inf, elemcopy);
1033 inf->addelem(inf, argp);
1040 expand_list(struct listinfo *inf)
1045 newmax = (inf->maxcount + 1) << 1;
1046 newlist = realloc(inf->l.ptr, newmax * inf->elemsize);
1048 free(inf->l.ptr);
1049 errx(1, "realloc to %d %ss failed", newmax, inf->lname);
1051 inf->maxcount = newmax;
1052 inf->l.ptr = newlist;
1058 free_list(struct listinfo *inf)
1061 inf->count = inf->elemsize = inf->maxcount = 0;
1062 if (inf->l.ptr != NULL)
1063 free(inf->l.ptr);
1064 inf->addelem = NULL;
1065 inf->lname = NULL;
1066 inf->l.ptr = NULL;
1070 init_list(struct listinfo *inf, addelem_rtn artn, int elemsize,
1074 inf->count = inf->maxcount = 0;
1075 inf->elemsize = elemsize;
1076 inf->addelem = artn;
1077 inf->lname = lname;
1078 inf->l.ptr = NULL;