Lines Matching refs:entry

93 	struct swins_entry *entry;  member
126 struct swins_entry *entry; in swins_entry_create() local
171 if ((entry = malloc(sizeof(*entry))) == NULL) { in swins_entry_create()
175 memset(entry, 0, sizeof(*entry)); in swins_entry_create()
177 if ((entry->name = strdup(map->name)) == NULL) { in swins_entry_create()
179 free(entry); in swins_entry_create()
183 entry->index = map->index; in swins_entry_create()
184 map->entry = entry; in swins_entry_create()
186 INSERT_OBJECT_INT(entry, &swins_tbl); in swins_entry_create()
188 return (entry); in swins_entry_create()
195 swins_entry_delete(struct swins_entry *entry) in swins_entry_delete() argument
199 assert(entry != NULL); in swins_entry_delete()
201 TAILQ_REMOVE(&swins_tbl, entry, link); in swins_entry_delete()
204 if (map->entry == entry) { in swins_entry_delete()
205 map->entry = NULL; in swins_entry_delete()
209 free(entry->name); in swins_entry_delete()
210 free(entry); in swins_entry_delete()
219 struct swins_entry *entry; in swins_find_by_name() local
221 TAILQ_FOREACH(entry, &swins_tbl, link) in swins_find_by_name()
222 if (strcmp((const char*)entry->name, name) == 0) in swins_find_by_name()
223 return (entry); in swins_find_by_name()
237 if (n1->entry != NULL) { in fini_swins_tbl()
238 TAILQ_REMOVE(&swins_tbl, n1->entry, link); in fini_swins_tbl()
239 free(n1->entry->name); in fini_swins_tbl()
240 free(n1->entry); in fini_swins_tbl()
256 struct swins_entry *entry; in swins_get_OS_ident() local
269 if ((entry = swins_find_by_name(os_string)) != NULL || in swins_get_OS_ident()
270 (entry = swins_entry_create(os_string)) == NULL) in swins_get_OS_ident()
273 entry->flags |= (HR_SWINSTALLED_FOUND | HR_SWINSTALLED_IMMUTABLE); in swins_get_OS_ident()
274 entry->id = &oid_zeroDotZero; in swins_get_OS_ident()
275 entry->type = (int32_t)SWI_OPERATING_SYSTEM; in swins_get_OS_ident()
276 memset(entry->date, 0, sizeof(entry->date)); in swins_get_OS_ident()
281 entry->date_len = make_date_time(entry->date, &k_ts, 0); in swins_get_OS_ident()
295 struct swins_entry *entry; in swins_get_packages() local
316 TAILQ_FOREACH(entry, &swins_tbl, link) in swins_get_packages()
317 entry->flags |= HR_SWINSTALLED_FOUND; in swins_get_packages()
361 if ((entry = swins_find_by_name(ent->d_name)) == NULL && in swins_get_packages()
362 (entry = swins_entry_create(ent->d_name)) == NULL) { in swins_get_packages()
367 entry->flags |= HR_SWINSTALLED_FOUND; in swins_get_packages()
368 entry->id = &oid_zeroDotZero; in swins_get_packages()
369 entry->type = (int32_t)SWI_APPLICATION; in swins_get_packages()
371 entry->date_len = make_date_time(entry->date, &k_ts, 0); in swins_get_packages()
397 struct swins_entry *entry, *entry_tmp; in refresh_swins_tbl() local
405 TAILQ_FOREACH(entry, &swins_tbl, link) in refresh_swins_tbl()
406 entry->flags &= ~HR_SWINSTALLED_FOUND; in refresh_swins_tbl()
410 TAILQ_FOREACH_SAFE(entry, &swins_tbl, link, entry_tmp) in refresh_swins_tbl()
411 if (!(entry->flags & HR_SWINSTALLED_FOUND) && in refresh_swins_tbl()
412 !(entry->flags & HR_SWINSTALLED_IMMUTABLE)) in refresh_swins_tbl()
413 swins_entry_delete(entry); in refresh_swins_tbl()
445 struct swins_entry *entry; in op_hrSWInstalledTable() local
452 if ((entry = NEXT_OBJECT_INT(&swins_tbl, in op_hrSWInstalledTable()
456 value->var.subs[sub] = entry->index; in op_hrSWInstalledTable()
460 if ((entry = FIND_OBJECT_INT(&swins_tbl, in op_hrSWInstalledTable()
466 if ((entry = FIND_OBJECT_INT(&swins_tbl, in op_hrSWInstalledTable()
481 value->v.integer = entry->index; in op_hrSWInstalledTable()
485 return (string_get(value, entry->name, -1)); in op_hrSWInstalledTable()
489 assert(entry->id != NULL); in op_hrSWInstalledTable()
490 value->v.oid = *entry->id; in op_hrSWInstalledTable()
494 value->v.integer = entry->type; in op_hrSWInstalledTable()
498 return (string_get(value, entry->date, entry->date_len)); in op_hrSWInstalledTable()