Home | History | Annotate | Download | only in init

Lines Matching refs:links

191 static mode_t get_device_perm(const char *path, const char **links,
211 if (links) {
213 for (i = 0; links[i]; i++) {
214 if (perm_path_matches(links[i], dp)) {
237 const char **links)
245 mode = get_device_perm(path, links, &uid, &gid) | (block ? S_IFBLK : S_IFCHR);
248 selabel_lookup_best_match(sehandle, &secontext, path, links, mode);
445 char **links;
454 links = malloc(sizeof(char *) * 2);
455 if (!links)
457 memset(links, 0, sizeof(char *) * 2);
478 if (asprintf(&links[link_num], "/dev/usb/%s%.*s", uevent->subsystem, width, parent) > 0)
481 links[link_num] = NULL;
488 return links;
490 free(links);
521 char **links = malloc(sizeof(char *) * 4);
522 if (!links)
524 memset(links, 0, sizeof(char *) * 4);
535 if (asprintf(&links[link_num], "%s/by-name/%s", link_path, p) > 0)
538 links[link_num] = NULL;
543 if (asprintf(&links[link_num], "%s/by-num/p%d", link_path, uevent->partition_num) > 0)
546 links[link_num] = NULL;
550 if (asprintf(&links[link_num], "%s/%s", link_path, slash + 1) > 0)
553 links[link_num] = NULL;
555 return links;
559 const char *path, int block, int major, int minor, char **links)
564 make_device(devpath, path, block, major, minor, (const char **)links);
565 if (links) {
566 for (i = 0; links[i]; i++)
567 make_link(devpath, links[i]);
572 if (links) {
573 for (i = 0; links[i]; i++)
574 remove_link(devpath, links[i]);
579 if (links) {
580 for (i = 0; links[i]; i++)
581 free(links[i]);
582 free(links);
625 char **links = NULL;
635 links = get_block_device_symlinks(uevent);
638 uevent->major, uevent->minor, links);
680 char **links = NULL;
767 links = get_character_device_symlinks(uevent);
773 uevent->major, uevent->minor, links);