Lines Matching defs:dp
84 struct perms_ dp;
105 node->dp.name = strdup(name);
106 if (!node->dp.name)
110 node->dp.attr = strdup(attr);
111 if (!node->dp.attr)
115 node->dp.perm = perm;
116 node->dp.uid = uid;
117 node->dp.gid = gid;
118 node->dp.prefix = prefix;
132 struct perms_ *dp;
138 dp = &(node_to_item(node, struct perm_node, plist))->dp;
139 if (dp->prefix) {
140 if (strncmp(upath, dp->name + 4, strlen(dp->name + 4)))
143 if (strcmp(upath, dp->name + 4))
147 if ((strlen(upath) + strlen(dp->attr) + 6) > sizeof(buf))
150 sprintf(buf,"/sys%s/%s", upath, dp->attr);
151 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm);
152 chown(buf, dp->uid, dp->gid);
153 chmod(buf, dp->perm);
162 struct perms_ *dp;
169 dp = &perm_node->dp;
171 if (dp->prefix) {
172 if (strncmp(path, dp->name, strlen(dp->name)))
175 if (strcmp(path, dp->name))
178 *uid = dp->uid;
179 *gid = dp->gid;
180 return dp->perm;