kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Linux Kernel readlink equivalent
@ 2015-01-29 18:11 David Legault
  2015-01-29 19:24 ` Valdis.Kletnieks at vt.edu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Legault @ 2015-01-29 18:11 UTC (permalink / raw)
  To: kernelnewbies

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.

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.

Or any other kernel call that would correctly retrieve the block_device
information given the initial path which is a symlink.

Note: I saw that the tomoyo module has something like that but I was
looking for the generic implementation of the kernel if one exists.

Thanks

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150129/c370e541/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-30 17:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 18:11 Linux Kernel readlink equivalent David Legault
2015-01-29 19:24 ` Valdis.Kletnieks at vt.edu
2015-01-29 19:37 ` Greg KH
2015-01-30 16:02   ` David Legault
2015-01-30 16:36     ` Valdis.Kletnieks at vt.edu
2015-01-30 17:17     ` Greg KH
2015-01-30  6:07 ` Aruna Hewapathirane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).