From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergio Paracuellos Subject: Problems with current file descriptor Date: Wed, 26 Oct 2005 17:43:12 +0200 Message-ID: <1130341392.3278.0.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from duero.optyma.com ([213.254.241.67]:35778 "EHLO duero.optyma.com") by vger.kernel.org with ESMTP id S964788AbVJZPnk (ORCPT ); Wed, 26 Oct 2005 11:43:40 -0400 Received: from [192.168.1.35] (5.Red-83-46-115.dynamicIP.rima-tde.net [83.46.115.5]) (authenticated bits=0) by duero.optyma.com (8.12.8/8.12.8) with ESMTP id j9QFhDNf001359 for ; Wed, 26 Oct 2005 17:43:34 +0200 To: LINUX-Fs-DEVEL Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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