Name

lookup_bdev — lookup a struct block_device by name

Synopsis

struct block_device * lookup_bdev (const char * pathname,
 int mask);
 

Arguments

pathname

special file representing the block device

mask

rights to check for (MAY_READ, MAY_WRITE, MAY_EXEC)

Description

Get a reference to the blockdevice at pathname in the current namespace if possible and return it. Return ERR_PTR(error) otherwise. If mask is non-zero, check for access rights to the inode at pathname.