Hi all
I need to remove some unwanted symlinks on /dev using a C program.
The struct dirent only shows the symlink name, how do I find what that
symlink points to for verification purpose?
Regards
Unga
___
freebsd-questions@freebsd.org
On Mon, Jul 27, 2009 at 05:44:59AM -0700, Unga wrote:
Hi all
I need to remove some unwanted symlinks on /dev using a C program.
The struct dirent only shows the symlink name, how do I find what that
symlink points to for verification purpose?
By using the readlink(2) system call.
--
--- On Mon, 7/27/09, Erik Trulsson ertr1...@student.uu.se wrote:
From: Erik Trulsson ertr1...@student.uu.se
Subject: Re: How to find what symlink points to?
To: Unga unga...@yahoo.com
Cc: freebsd-questions@freebsd.org
Date: Monday, July 27, 2009, 9:36 PM
On Mon, Jul 27, 2009 at 05:44:59AM
On Mon, Jul 27, 2009 at 8:45 AM, Ungaunga...@yahoo.com wrote:
--- On Mon, 7/27/09, Erik Trulsson ertr1...@student.uu.se wrote:
From: Erik Trulsson ertr1...@student.uu.se
Subject: Re: How to find what symlink points to?
To: Unga unga...@yahoo.com
Cc: freebsd-questions@freebsd.org
Date
On Monday 27 July 2009 05:45:13 Unga wrote:
Hi all
I need to remove some unwanted symlinks on /dev using
a C program.
The struct dirent only shows the symlink name, how
do I find what that
symlink points to for verification purpose?
By using the readlink(2) system
--- On Tue, 7/28/09, Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net
wrote:
From: Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net
Subject: Re: How to find what symlink points to?
To: freebsd-questions@freebsd.org
Date: Tuesday, July 28, 2009, 1:25 AM
On Monday 27 July 2009
On Monday 27 July 2009 20:54:51 Unga wrote:
Thanks everybody for valuable replies. In fact, I also used readlink(2) but
fed the symlink path directly from dirent, which was partial, readlink(2)
requires full path.
Nope it doesn't. It's the classical opendir does not chdir problem.