Lines Matching defs:entry

228 	hashentry_t *entry;
239 for (entry = mnt_cache->mounts[index]; entry != NULL;
240 entry = entry->next) {
241 unregister_rsrc(hd, entry->special);
258 * if they don't provide a critical service. The offline entry point
260 * doesn't provide a critical service, the entry point returns success
269 hashentry_t *entry;
292 if ((entry = cache_lookup(mnt_cache, rsrc)) == NULL) {
301 if (strcmp(entry->fstype, "zfs") == 0) {
609 /* Paths match. Disable this entry */
752 /* Insert each mnttab entry into the cache */
755 /* Well, not each entry... some are meant to be ignored */
788 hashentry_t *entry;
798 entry = (*cachep)->mounts[index];
799 while (entry) {
800 entry_tmp = entry->next;
801 free_entry(&entry);
802 entry = entry_tmp;
815 * Free up memory associated with a hashtable entry.
867 hashentry_t *entry;
905 for (entry = new_cache->mounts[index]; entry != NULL;
906 entry = entry->next) {
907 if (cache_lookup(old_cache, entry->special) == NULL) {
908 register_rsrc(hd, entry->special);
926 for (entry = old_cache->mounts[index]; entry != NULL;
927 entry = entry->next) {
928 if (cache_lookup(new_cache, entry->special) == NULL) {
929 unregister_rsrc(hd, entry->special);
941 * Given a cache and a mnttab entry, this routine inserts that entry in
942 * the cache. The mnttab entry's special device and filesystem type
943 * is added to the 'mounts' hashtable of the cache, and the entry's
945 * corresponding hashtable entry.
955 hashentry_t *entry;
978 * Find the special device's entry in the mounts hashtable, allocating
979 * a new entry if necessary.
982 for (entry = cache->mounts[index]; entry != NULL; entry = entry->next) {
983 if (strcmp(entry->special, mt->mnt_special) == 0)
986 if (entry == NULL) {
987 entry = (hashentry_t *)calloc(1, sizeof (hashentry_t));
988 if ((entry == NULL) ||
989 ((entry->special = strdup(mt->mnt_special)) == NULL) ||
990 ((entry->fstype = strdup(mt->mnt_fstype)) == NULL)) {
994 free_entry(&entry);
998 entry->next = cache->mounts[index];
999 cache->mounts[index] = entry;
1006 for (index = 0; index < entry->n_mounts; index++) {
1007 if (strcmp(entry->mountps[index], mt->mnt_mountp) == 0)
1015 mountps = (char **)realloc(entry->mountps,
1016 (entry->n_mounts + 2) * sizeof (char *));
1018 ((mountps[entry->n_mounts] = strdup(mt->mnt_mountp)) == NULL)) {
1022 if (entry->n_mounts == 0) {
1023 cache->mounts[index] = entry->next;
1024 free_entry(&entry);
1029 mountps[entry->n_mounts + 1] = NULL;
1030 entry->n_mounts++;
1031 entry->mountps = mountps;
1039 * Searches the cached table of mounts for a special device entry.
1044 * cache entry when successful.
1050 hashentry_t *entry;
1058 /* Search the cached mounts table for the resource's entry */
1061 for (entry = cache->mounts[index]; entry != NULL;
1062 entry = entry->next) {
1063 if (strcmp(entry->special, rsrc) == 0)
1064 return (entry);
1215 * given hashtable entry from the cache.
1221 create_dependents(hashentry_t *entry)
1226 if (entry == NULL) {
1231 if (entry->n_mounts == 0) {
1237 dependents = (char **)calloc(entry->n_mounts + 1, sizeof (char *));
1247 for (i = 0; i < entry->n_mounts; i++) {
1248 if ((dependents[i] = strdup(entry->mountps[i])) == NULL) {
1251 "(%s).\n", entry->mountps[i], strerror(errno));
1362 * entry. If an error occurs while doing this, an appropriate error
1370 hashentry_t *entry;
1373 if ((entry = cache_lookup(mnt_cache, rsrc)) == NULL) {
1381 *dependentsp = create_dependents(entry);