Lines Matching refs:pos

97 	char *pos = ERR_PTR(-ENOMEM);  in tomoyo_get_absolute_path()  local
101 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
102 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_absolute_path()
111 return pos; in tomoyo_get_absolute_path()
128 char *pos = ERR_PTR(-ENOMEM); in tomoyo_get_dentry_path() local
131 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
132 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_dentry_path()
141 return pos; in tomoyo_get_dentry_path()
157 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() local
159 if (IS_ERR(pos)) in tomoyo_get_local_path()
160 return pos; in tomoyo_get_local_path()
162 if (sb->s_magic == PROC_SUPER_MAGIC && *pos == '/') { in tomoyo_get_local_path()
164 const pid_t pid = (pid_t) simple_strtoul(pos + 1, &ep, 10); in tomoyo_get_local_path()
169 pos = ep - 5; in tomoyo_get_local_path()
170 if (pos < buffer) in tomoyo_get_local_path()
172 memmove(pos, "/self", 5); in tomoyo_get_local_path()
199 pos -= name_len; in tomoyo_get_local_path()
200 if (pos < buffer) in tomoyo_get_local_path()
202 memmove(pos, name, name_len); in tomoyo_get_local_path()
203 return pos; in tomoyo_get_local_path()
211 pos -= name_len + 1; in tomoyo_get_local_path()
212 if (pos < buffer) in tomoyo_get_local_path()
214 memmove(pos, name, name_len); in tomoyo_get_local_path()
215 pos[name_len] = ':'; in tomoyo_get_local_path()
217 return pos; in tomoyo_get_local_path()
246 char *pos; in tomoyo_realpath_from_path() local
258 pos = dentry->d_op->d_dname(dentry, buf, buf_len - 1); in tomoyo_realpath_from_path()
267 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
271 pos = tomoyo_get_absolute_path(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
276 if (pos == ERR_PTR(-EINVAL)) in tomoyo_realpath_from_path()
277 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
281 if (IS_ERR(pos)) in tomoyo_realpath_from_path()
283 name = tomoyo_encode(pos); in tomoyo_realpath_from_path()