Re: Linux Kernel readlink equivalent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 29, 2015 at 01:11:13PM -0500, David Legault wrote:
> Hello,
> 
> I'm working on some linux kernel driver stuff and I have a fake path called /
> dev/blah/whatever that points to /dev/block/real_device.

That's a userspace "path", right?  Why would the kernel care about this?

> The issue is that lookup_bdev will fail to follow the symlink so I'd like to
> massage the path upfront by getting the real path (/dev/block/real_device) so I
> can hand that off to lookup_bdev so it returns successfully instead of an
> error.

Why are you calling this from within the kernel?  You should have a bdev
already directly within the kernel, no need to muck around in /dev/

What exactly are you doing that you feel you need access to a block
device node?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux