Problems with current file descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have problems to know whats is the current file descriptor. 

"task_struct" have a files_struct structure which contains all files for
a process in "fd". If I want to get the complete path for one of them,
How can I know what is the correct one in fd_array?

I suppose is something like:

path = d_path(task->files->fd[x]->f_dentry,
task->files->fd[x]->f_vfsmnt, buf, PAGE_SIZE);

But I don't know how to know this x for my correct file (for example the
last file I used).

Thanks in advance...

Cheers,
	Sergio

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux