Date: Mon, 04 Feb 2002 01:27:39 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: =?iso-8859-1?Q?Pawe=B3?= Jakub Dawidek <nick@FreeBSD.pl> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: File name. Message-ID: <3C5E540B.9FDACF64@mindspring.com> References: <20020203221137.A34994@FreeBSD.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
Pawe=B3 Jakub Dawidek wrote: > I can get vnode of changed file. > I can get inode number of changed file. > But how can i get file name? > = > There is a way to get inode when i have file name and p (struct proc), = so > maybe there is a way to get file name from inode number and p. > = > And another thing for chflags syscall. > I got file name, but how can I get full path name for this file? char *saved_name; func() { char *foo; ... fd =3D open( foo, O_RDWR, 0664); saved_name =3D strdup( foo); ... printf( "name that goes with fd %d is '%s'\n", fd, saved_name); ... } i.e.: You opened the thing, you ought to know its name. = -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C5E540B.9FDACF64>