introduction of mckernel_procfs_file_operations; fix /proc/self path resolution;

implementation of /proc/self/pagemap (LTP mmap12)
This commit is contained in:
bgerofi@riken.jp
2014-12-15 12:43:42 +09:00
committed by Balazs Gerofi bgerofi@riken.jp
parent 815d907ca4
commit d4ba4dc8b3
7 changed files with 185 additions and 24 deletions

View File

@@ -1405,7 +1405,11 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock, int mcosid)
__dprintf("open: %s\n", pathbuf);
fn = pathbuf;
if(!strncmp(fn, "/proc/", 6)){
if (!strncmp(fn, "/proc/self/", 11)){
sprintf(tmpbuf, "/proc/mcos%d/%d/%s", mcosid, getpid(), fn + 11);
fn = tmpbuf;
}
else if(!strncmp(fn, "/proc/", 6)){
sprintf(tmpbuf, "/proc/mcos%d/%s", mcosid, fn + 6);
fn = tmpbuf;
}