Lines Matching refs:pos

95 	char *pos = ERR_PTR(-ENOMEM);  in tomoyo_get_absolute_path()  local
98 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
99 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_absolute_path()
107 return pos; in tomoyo_get_absolute_path()
124 char *pos = ERR_PTR(-ENOMEM); in tomoyo_get_dentry_path() local
126 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
127 if (!IS_ERR(pos) && *pos == '/' && pos[1]) { in tomoyo_get_dentry_path()
135 return pos; in tomoyo_get_dentry_path()
151 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() local
152 if (IS_ERR(pos)) in tomoyo_get_local_path()
153 return pos; in tomoyo_get_local_path()
155 if (sb->s_magic == PROC_SUPER_MAGIC && *pos == '/') { in tomoyo_get_local_path()
157 const pid_t pid = (pid_t) simple_strtoul(pos + 1, &ep, 10); in tomoyo_get_local_path()
160 pos = ep - 5; in tomoyo_get_local_path()
161 if (pos < buffer) in tomoyo_get_local_path()
163 memmove(pos, "/self", 5); in tomoyo_get_local_path()
188 pos -= name_len; in tomoyo_get_local_path()
189 if (pos < buffer) in tomoyo_get_local_path()
191 memmove(pos, name, name_len); in tomoyo_get_local_path()
192 return pos; in tomoyo_get_local_path()
199 pos -= name_len + 1; 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 pos[name_len] = ':'; in tomoyo_get_local_path()
205 return pos; in tomoyo_get_local_path()
261 char *pos; in tomoyo_realpath_from_path() local
272 pos = tomoyo_get_socket_name(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
277 pos = dentry->d_op->d_dname(dentry, buf, buf_len - 1); in tomoyo_realpath_from_path()
287 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
291 pos = tomoyo_get_absolute_path(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
296 if (pos == ERR_PTR(-EINVAL)) in tomoyo_realpath_from_path()
297 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
301 if (IS_ERR(pos)) in tomoyo_realpath_from_path()
303 name = tomoyo_encode(pos); in tomoyo_realpath_from_path()