Lines Matching refs:links

190 static mode_t get_device_perm(const char *path, const char **links,  in get_device_perm()  argument
209 if (links) { in get_device_perm()
211 for (i = 0; links[i]; i++) { in get_device_perm()
212 if (perm_path_matches(links[i], dp)) { in get_device_perm()
235 const char **links) in make_device() argument
243 mode = get_device_perm(path, links, &uid, &gid) | (block ? S_IFBLK : S_IFCHR); in make_device()
245 if (selabel_lookup_best_match(sehandle, &secontext, path, links, mode)) { in make_device()
424 char **links; in get_character_device_symlinks() local
433 links = (char**) malloc(sizeof(char *) * 2); in get_character_device_symlinks()
434 if (!links) in get_character_device_symlinks()
436 memset(links, 0, sizeof(char *) * 2); in get_character_device_symlinks()
457 if (asprintf(&links[link_num], "/dev/usb/%s%.*s", uevent->subsystem, width, parent) > 0) in get_character_device_symlinks()
460 links[link_num] = NULL; in get_character_device_symlinks()
467 return links; in get_character_device_symlinks()
469 free(links); in get_character_device_symlinks()
495 char **links = (char**) malloc(sizeof(char *) * 4); in get_block_device_symlinks() local
496 if (!links) in get_block_device_symlinks()
498 memset(links, 0, sizeof(char *) * 4); in get_block_device_symlinks()
509 if (asprintf(&links[link_num], "%s/by-name/%s", link_path, p) > 0) in get_block_device_symlinks()
512 links[link_num] = NULL; in get_block_device_symlinks()
517 if (asprintf(&links[link_num], "%s/by-num/p%d", link_path, uevent->partition_num) > 0) in get_block_device_symlinks()
520 links[link_num] = NULL; in get_block_device_symlinks()
524 if (asprintf(&links[link_num], "%s/%s", link_path, slash + 1) > 0) in get_block_device_symlinks()
527 links[link_num] = NULL; in get_block_device_symlinks()
529 return links; in get_block_device_symlinks()
533 const char *path, int block, int major, int minor, char **links) in handle_device() argument
538 make_device(devpath, path, block, major, minor, (const char **)links); in handle_device()
539 if (links) { in handle_device()
540 for (i = 0; links[i]; i++) in handle_device()
541 make_link_init(devpath, links[i]); in handle_device()
546 if (links) { in handle_device()
547 for (i = 0; links[i]; i++) in handle_device()
548 remove_link(devpath, links[i]); in handle_device()
553 if (links) { in handle_device()
554 for (i = 0; links[i]; i++) in handle_device()
555 free(links[i]); in handle_device()
556 free(links); in handle_device()
599 char **links = NULL; in handle_block_device_event() local
609 links = get_block_device_symlinks(uevent); in handle_block_device_event()
612 uevent->major, uevent->minor, links); in handle_block_device_event()
649 char **links = NULL; in handle_generic_device_event() local
736 links = get_character_device_symlinks(uevent); in handle_generic_device_event()
742 uevent->major, uevent->minor, links); in handle_generic_device_event()