Lines Matching refs:pos
96 char *pos = ERR_PTR(-ENOMEM); in tomoyo_get_absolute_path() local
99 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
100 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_absolute_path()
108 return pos; in tomoyo_get_absolute_path()
125 char *pos = ERR_PTR(-ENOMEM); in tomoyo_get_dentry_path() local
127 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
128 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_dentry_path()
136 return pos; in tomoyo_get_dentry_path()
152 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() local
153 if (IS_ERR(pos)) in tomoyo_get_local_path()
154 return pos; in tomoyo_get_local_path()
156 if (sb->s_magic == PROC_SUPER_MAGIC && *pos == '/') { in tomoyo_get_local_path()
158 const pid_t pid = (pid_t) simple_strtoul(pos + 1, &ep, 10); in tomoyo_get_local_path()
161 pos = ep - 5; in tomoyo_get_local_path()
162 if (pos < buffer) in tomoyo_get_local_path()
164 memmove(pos, "/self", 5); in tomoyo_get_local_path()
189 pos -= name_len; in tomoyo_get_local_path()
190 if (pos < buffer) in tomoyo_get_local_path()
192 memmove(pos, name, name_len); in tomoyo_get_local_path()
193 return pos; in tomoyo_get_local_path()
200 pos -= name_len + 1; in tomoyo_get_local_path()
201 if (pos < buffer) in tomoyo_get_local_path()
203 memmove(pos, name, name_len); in tomoyo_get_local_path()
204 pos[name_len] = ':'; in tomoyo_get_local_path()
206 return pos; in tomoyo_get_local_path()
262 char *pos; in tomoyo_realpath_from_path() local
273 pos = tomoyo_get_socket_name(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
278 pos = dentry->d_op->d_dname(dentry, buf, buf_len - 1); in tomoyo_realpath_from_path()
288 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
292 pos = tomoyo_get_absolute_path(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
297 if (pos == ERR_PTR(-EINVAL)) in tomoyo_realpath_from_path()
298 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
302 if (IS_ERR(pos)) in tomoyo_realpath_from_path()
304 name = tomoyo_encode(pos); in tomoyo_realpath_from_path()