From owner-freebsd-hackers Thu Aug 16 10:21:49 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.teledis.be (mail.teledis.be [217.117.32.52]) by hub.freebsd.org (Postfix) with ESMTP id 35C3937B401 for ; Thu, 16 Aug 2001 10:21:45 -0700 (PDT) (envelope-from lorenzo@linuxbe.org) Received: from natalie ([217.117.38.8]) by mail.teledis.be (Netscape Messaging Server 4.15) with SMTP id GI688A01.JYK for ; Thu, 16 Aug 2001 19:21:46 +0200 Message-ID: <001501c12678$56cd2320$0201a8c0@teledisnet.be> From: "Sansonetti Laurent" To: Subject: Getting filename from descriptor or vnode struct Date: Thu, 16 Aug 2001 19:24:43 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi hackers, I'm confronted to a problem when I try to hack getdirentries(2) in a kld module : To summarize, getdirentries() filled in a buffer a series of dirent struct, and the 'd_name' field represents the filename (without the full path). I must recover the full path because I've on disk a list of files to hide ... The field 'fd' in getdirentries_args is the file descriptor of the directory.. and I've discovered that the field 'p_fd' from struct proc is a filedesc struct which contains a vnode struct representing the current directory ('fd_cdir'). VOP_GETATTR() doesn't allow me to recover this.. If someone could help me, thanks in advance ! -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message