From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergio Paracuellos Subject: Re: Problems with current file descriptor Date: Thu, 27 Oct 2005 09:20:06 +0200 Message-ID: <1130397606.2864.4.camel@localhost.localdomain> References: <1130341392.3278.0.camel@localhost.localdomain> <16f1140f0510261934i51c53da1m@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: LINUX-Fs-DEVEL Return-path: Received: from duero.optyma.com ([213.254.241.67]:51688 "EHLO duero.optyma.com") by vger.kernel.org with ESMTP id S964979AbVJ0HU3 (ORCPT ); Thu, 27 Oct 2005 03:20:29 -0400 To: winter In-Reply-To: <16f1140f0510261934i51c53da1m@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org El jue, 27-10-2005 a las 10:34 +0800, winter escribi=C3=B3: > 2005/10/26, Sergio Paracuellos : > > Hi all, > > > > I have problems to know whats is the current file descriptor. > > > > "task_struct" have a files_struct structure which contains all file= s for > > a process in "fd". If I want to get the complete path for one of th= em, > > How can I know what is the correct one in fd_array? > > > > I suppose is something like: > > > > path =3D 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 exampl= e the > > last file I used). > current file ?what is meaning? > for exmaple ,you opened 3 file, file1,file2, file3. which is current = file? Sorry, I want the last file I used. For example if I just have done "ca= t foobar" the file I want is this. Thanks in advance, =20 > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdev= el" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html