Lines Matching refs:dc
144 dump_conf_t *dc; in dump_unregister() local
147 while ((dc = cache) != NULL) { in dump_unregister()
149 (void) rcm_unregister_interest(hdl, dc->device, 0); in dump_unregister()
150 free(dc); in dump_unregister()
162 dump_conf_t *dc; in dump_getinfo() local
168 if ((dc = cache_lookup(rsrcname)) == NULL) { in dump_getinfo()
174 conf_flags = dc->conf_flags; in dump_getinfo()
190 dump_conf_t *dc; in dump_suspend() local
199 if ((dc = cache_lookup(rsrcname)) == NULL) { in dump_suspend()
204 rv = dump_relocate(dc, errstr); in dump_suspend()
215 dump_conf_t *dc; in dump_resume() local
221 if ((dc = cache_lookup(rsrcname)) == NULL) { in dump_resume()
226 rv = dump_configure(dc, errstr); in dump_resume()
241 dump_conf_t *dc; in dump_offline() local
251 if ((dc = cache_lookup(rsrcname)) == NULL) { in dump_offline()
257 rv = dump_relocate(dc, errstr); in dump_offline()
263 conf_flags = dc->conf_flags; in dump_offline()
275 dump_conf_t *dc; in dump_online() local
281 if ((dc = cache_lookup(rsrcname)) == NULL) { in dump_online()
286 rv = dump_configure(dc, errstr); in dump_online()
297 dump_conf_t *dc; in dump_remove() local
302 if ((dc = cache_lookup(rsrcname)) == NULL) { in dump_remove()
306 cache_remove(dc); in dump_remove()
307 free(dc); in dump_remove()
322 dump_relocate(dump_conf_t *dc, char **errstr) in dump_relocate() argument
332 dc->cache_flags |= DUMP_CACHE_OFFLINED; in dump_relocate()
335 if (!(dc->conf_flags & DUMP_EXCL)) in dump_relocate()
342 dc->cache_flags &= ~DUMP_CACHE_OFFLINED; in dump_relocate()
354 dump_configure(dump_conf_t *dc, char **errstr) in dump_configure() argument
359 assert(dc != NULL && dc->device != NULL); in dump_configure()
362 if (!(dc->cache_flags & DUMP_CACHE_OFFLINED)) in dump_configure()
365 (void) snprintf(cmd, sizeof (cmd), "%s%s", DUMPADM, dc->device); in dump_configure()
372 dc->cache_flags &= ~DUMP_CACHE_OFFLINED; in dump_configure()
383 dump_conf_t *dc; in dump_conf_alloc() local
388 if ((dc = calloc(1, sizeof (*dc))) == NULL) { in dump_conf_alloc()
405 free(dc); in dump_conf_alloc()
410 if (ioctl(fd, DIOCGETDEV, dc->device) == -1) { in dump_conf_alloc()
412 dc->device[0] = '\0'; in dump_conf_alloc()
417 free(dc); in dump_conf_alloc()
422 if (dc->device[0] != '\0') { in dump_conf_alloc()
423 if ((dc->conf_flags = ioctl(fd, DIOCGETCONF, 0)) == -1) { in dump_conf_alloc()
427 free(dc); in dump_conf_alloc()
433 return (dc); in dump_conf_alloc()
519 dump_conf_t *dc; in cache_lookup() local
521 for (dc = cache; dc != NULL; dc = dc->next) { in cache_lookup()
522 if (strcmp(rsrc, dc->device) == 0) { in cache_lookup()
523 return (dc); in cache_lookup()
564 dump_conf_t *dc; in free_cache() local
567 while ((dc = cache) != NULL) { in free_cache()
569 free(dc); in free_cache()