Lines Matching defs:contents

4  * The contents of this file are subject to the terms of the
2475 * Construct link contents, then call create_link_common().
2514 /* prepend link with dev_dir contents */
2596 char contents[PATH_MAX + 1];
2603 /* prepend link with dev_dir contents */
2608 * building extra link, so use first link as link contents, but first
2613 op = contents;
2639 devlink, contents);
2642 if ((rv = create_link_common(devlink, contents, &link_exists))
2645 * we need to save the ultimate /devices contents, and not the
2660 op = strrchr(contents, '/');
2674 (void) di_devlink_add_link(devlink_cache, link, contents,
2693 create_link_common(char *devlink, char *contents, int *exists)
2706 /* we want *actual* link contents so no alias redirection */
2710 if (strcmp(checkcontents, contents) != 0) {
2716 " %s -> %s\n", devlink, contents);
2721 vprint(VERBOSE_MID, CREATING_LINK, devlink, contents);
2741 if (symlink(contents, devlink) == 0) {
2743 contents);
2765 contents, strerror(errno));
2778 * contents.
2783 if (strcmp(checkcontents, contents) != 0) {
2792 " %s -> %s\n", devlink, contents);
2811 err_print(MAX_ATTEMPTS, devlink, contents);
2862 * We dont need redirection here - the actual link contents
3111 * a double link) that file's link contents refer to.
3118 char contents[PATH_MAX + 1];
3143 ((linksize = readlink(newfile, contents, PATH_MAX)) > 0)) {
3144 contents[linksize] = '\0';
3149 if (is_minor_node(contents, &ptr) != DEVFSADM_TRUE) {
3150 if (strncmp(contents, DEV "/", strlen(DEV) + 1) == 0) {
3151 devfsadm_rm_work(&contents[strlen(DEV) + 1],
3162 (void) strcat(nextfile, contents);
3285 * any link whose contents match "valid_link_contents" with a corresponding link
3339 if ((strcmp(link->contents, valid_link_contents) == 0) &&
3343 link->devlink, link->contents,
3414 char contents[PATH_MAX + 1];
3429 * so this readlink gets the "current" contents
3431 linksize = readlink(newlink, contents, PATH_MAX);
3444 contents[linksize] = '\0';
3447 if (is_minor_node(contents, &r_contents) == DEVFSADM_FALSE) {
3449 * assume that link contents is really a pointer to
3450 * another link, so recurse and read its link contents.
3452 * some link contents are absolute:
3455 if (strncmp(contents, DEV "/",
3461 newlink, contents);
3468 (void) strcat(stage_link, contents);
3474 &contents[strlen(DEV) + strlen("/")]);
3500 link->contents = s_strdup(r_contents);
3532 link->contents = s_strdup(physpath);
3574 free(save->contents);
3604 free(link->contents);
4289 skip = strcmp(link->contents, path);
4291 skip = strncmp(link->contents, path,
4300 link->devlink, link->contents);
4477 /* prepend link with dev_dir contents */
4497 char devlink[PATH_MAX + 1], *contents, *raw_contents;
4501 /* prepend link with dev_dir contents */
4521 contents = raw_contents;
4523 contents = di_alias2curr(anynode, raw_contents);
4530 (void) di_devlink_add_link(devlink_cache, link, contents, type);
4532 strstr(devlink, DA_AUDIO_NAME) && contents) {
4533 (void) sscanf(contents, "%*[a-z]%d", &instance);
4538 free(contents);
4552 * Caller is assumed to have initialized pointer contents to NULL
4559 char contents[PATH_MAX + 1];
4568 * This routine will return the "raw" contents. It is upto the
4571 linksize = readlink(devpath, contents, PATH_MAX);
4576 contents[linksize] = '\0';
4578 vprint(REMOVE_MID, "%s %s -> %s\n", fcn, devpath, contents);
4581 *content_p = s_strdup(contents);
4589 if (is_minor_node(contents, &ptr) == DEVFSADM_FALSE) {
4597 * link, and if so recurse and read its link contents.
4599 if (strncmp(contents, DEV "/", strlen(DEV) + 1) == 0) {
4603 &contents[strlen(DEV) + strlen("/")]);
4607 "missing '/'\n", fcn, devpath, contents);
4614 (void) strcat(stage_link, contents);
4827 * match of a specified substring of a symlink's contents. If the specified
4829 * for a existing symlink's contents, the cached id is returned. Else, a new
5673 char *contents;
5730 contents = di_alias2curr(devi_root_node, linkbuf);
5737 (void) is_minor_node(contents, &linkptr);
5741 free(contents);
5756 free(contents);
6653 char contents[PATH_MAX + 1];
6661 (void) strcpy(contents, dev_path);
6664 (void) strcat(contents, ":");
6665 (void) strcat(contents, di_minor_name(minor));
6667 if (construct_devlink(primary_link, entry->p_link, contents,
6729 construct_devlink(char *link, link_list_t *link_build, char *contents,
6795 if (devfsadm_enumerate_int_start(contents, 0, &buff,
7800 * returns DEVFSADM_TRUE if contents is a minor node in /devices.
7802 * if contents is a /dev node, mn_root = contents
7804 * if contents is a /devices node, mn_root set to the '/'
7808 is_minor_node(char *contents, char **mn_root)
7815 if ((ptr = strstr(contents, device_prefix)) != NULL) {
7825 if (strncmp(contents, device_prefix, strlen(device_prefix)) == 0) {
7828 *mn_root = contents + strlen(device_prefix) - 1;
7834 *mn_root = contents;