Lines Matching defs:pkgInfo
890 struct pkgInfo {
896 struct pkgInfo *next;
900 static struct pkgInfo *pkgTab[PKGTAB_SIZE];
921 struct pkgInfo *pkgInfo = NULL;
932 pkgInfo = calloc(1, sizeof(*pkgInfo));
933 if (!pkgInfo)
939 pkgInfo->name = strdup(cur);
940 if (!pkgInfo->name)
945 pkgInfo->uid = atoi(cur);
946 if (!pkgInfo->uid)
951 pkgInfo->debuggable = atoi(cur);
955 pkgInfo->dataDir = strdup(cur);
956 if (!pkgInfo->dataDir)
961 pkgInfo->seinfo = strdup(cur);
962 if (!pkgInfo->seinfo)
965 hash = pkghash(pkgInfo->name);
967 pkgInfo->next = pkgTab[hash];
968 pkgTab[hash] = pkgInfo;
982 for (pkgInfo = pkgTab[hash]; pkgInfo; pkgInfo = pkgInfo->next) {
986 pkgInfo->name, pkgInfo->uid, pkgInfo->debuggable ? "true" : "false", pkgInfo->dataDir, pkgInfo->seinfo);
1005 if (pkgInfo) {
1006 free(pkgInfo->name);
1007 free(pkgInfo->dataDir);
1008 free(pkgInfo->seinfo);
1009 free(pkgInfo);
1016 struct pkgInfo *package_info_lookup(const char *name)
1018 struct pkgInfo *pkgInfo;
1024 for (pkgInfo = pkgTab[hash]; pkgInfo; pkgInfo = pkgInfo->next) {
1025 if (!strcmp(name, pkgInfo->name))
1026 return pkgInfo;
1043 struct pkgInfo *pkgInfo = NULL;
1077 pkgInfo = package_info_lookup(pkgname);
1078 if (!pkgInfo) {
1090 rc = seapp_context_lookup(SEAPP_TYPE, pkgInfo ? pkgInfo->uid : uid, 0,
1091 pkgInfo ? pkgInfo->seinfo : seinfo, pkgInfo ? pkgInfo->name : pkgname, pathname, ctx);
1119 __FUNCTION__, pathname, pkgname, pkgInfo->seinfo, pkgInfo->uid, strerror(errno));