Lines Matching defs:dp
80 struct perms_ dp;
102 node->dp.name = strdup(name);
103 if (!node->dp.name)
107 node->dp.attr = strdup(attr);
108 if (!node->dp.attr)
112 node->dp.perm = perm;
113 node->dp.uid = uid;
114 node->dp.gid = gid;
115 node->dp.prefix = prefix;
129 struct perms_ *dp;
135 dp = &(node_to_item(node, struct perm_node, plist))->dp;
136 if (dp->prefix) {
137 if (strncmp(upath, dp->name + 4, strlen(dp->name + 4)))
140 if (strcmp(upath, dp->name + 4))
144 if ((strlen(upath) + strlen(dp->attr) + 6) > sizeof(buf))
147 sprintf(buf,"/sys%s/%s", upath, dp->attr);
148 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm);
149 chown(buf, dp->uid, dp->gid);
150 chmod(buf, dp->perm);
159 struct perms_ *dp;
166 dp = &perm_node->dp;
168 if (dp->prefix) {
169 if (strncmp(path, dp->name, strlen(dp->name)))
172 if (strcmp(path, dp->name))
175 *uid = dp->uid;
176 *gid = dp->gid;
177 return dp->perm;