Lines Matching defs:pkgInfo
864 struct pkgInfo {
870 struct pkgInfo *next;
874 static struct pkgInfo *pkgTab[PKGTAB_SIZE];
895 struct pkgInfo *pkgInfo = NULL;
906 pkgInfo = calloc(1, sizeof(*pkgInfo));
907 if (!pkgInfo)
913 pkgInfo->name = strdup(cur);
914 if (!pkgInfo->name)
919 pkgInfo->uid = atoi(cur);
920 if (!pkgInfo->uid)
925 pkgInfo->debuggable = atoi(cur);
929 pkgInfo->dataDir = strdup(cur);
930 if (!pkgInfo->dataDir)
935 pkgInfo->seinfo = strdup(cur);
936 if (!pkgInfo->seinfo)
939 hash = pkghash(pkgInfo->name);
941 pkgInfo->next = pkgTab[hash];
942 pkgTab[hash] = pkgInfo;
956 for (pkgInfo = pkgTab[hash]; pkgInfo; pkgInfo = pkgInfo->next) {
960 pkgInfo->name, pkgInfo->uid, pkgInfo->debuggable ? "true" : "false", pkgInfo->dataDir, pkgInfo->seinfo);
979 if (pkgInfo) {
980 free(pkgInfo->name);
981 free(pkgInfo->dataDir);
982 free(pkgInfo->seinfo);
983 free(pkgInfo);
990 struct pkgInfo *package_info_lookup(const char *name)
992 struct pkgInfo *pkgInfo;
998 for (pkgInfo = pkgTab[hash]; pkgInfo; pkgInfo = pkgInfo->next) {
999 if (!strcmp(name, pkgInfo->name))
1000 return pkgInfo;
1017 struct pkgInfo *pkgInfo = NULL;
1051 pkgInfo = package_info_lookup(pkgname);
1052 if (!pkgInfo) {
1064 rc = seapp_context_lookup(SEAPP_TYPE, pkgInfo ? pkgInfo->uid : uid, 0,
1065 pkgInfo ? pkgInfo->seinfo : seinfo, pkgInfo ? pkgInfo->name : pkgname, pathname, ctx);
1093 __FUNCTION__, pathname, pkgname, pkgInfo->seinfo, pkgInfo->uid, strerror(errno));