From: Sergio Paracuellos <sparacuellos@lock-linux.com>
To: KERNEL-NEWBIE <linux-newbie@vger.kernel.org>,
NUCLEO-DEVEL <nucleo-desarrollo@listas.hispalinux.es>,
LINUX-KERNEL <linux-kernel@vger.kernel.org>
Subject: Problems with current file descriptor
Date: Wed, 26 Oct 2005 16:46:53 +0200 [thread overview]
Message-ID: <1130338013.3344.5.camel@localhost.localdomain> (raw)
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-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
WARNING: multiple messages have this Message-ID (diff)
From: Sergio Paracuellos <sparacuellos@lock-linux.com>
To: KERNEL-NEWBIE <linux-newbie@vger.kernel.org>,
NUCLEO-DEVEL <nucleo-desarrollo@listas.hispalinux.es>,
LINUX-KERNEL <linux-kernel@vger.kernel.org>
Subject: Problems with current file descriptor
Date: Wed, 26 Oct 2005 16:46:53 +0200 [thread overview]
Message-ID: <1130338013.3344.5.camel@localhost.localdomain> (raw)
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
next reply other threads:[~2005-10-26 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-26 14:46 Sergio Paracuellos [this message]
2005-10-26 14:46 ` Problems with current file descriptor Sergio Paracuellos
-- strict thread matches above, loose matches on Subject: below --
2005-10-26 15:43 Sergio Paracuellos
2005-10-26 16:06 ` Jörn Engel
2005-10-27 2:34 ` winter
2005-10-27 7:20 ` Sergio Paracuellos
2005-10-27 8:30 ` winter
2005-10-27 9:06 ` Sergio Paracuellos
2005-10-27 9:26 ` Sergio Paracuellos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1130338013.3344.5.camel@localhost.localdomain \
--to=sparacuellos@lock-linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
--cc=nucleo-desarrollo@listas.hispalinux.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.