---
name: "lookup_bdev"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/lookup_bdev"
---

# lookup\_bdev(9)

lookup a struct block\_device by name

## NAME

lookup\_bdev - lookup a struct block\_device by name

## SYNOPSIS

**struct block\_device \* lookup\_bdev(const char \*** *pathname***);**

## ARGUMENTS

*pathname*

special file representing the block device

## DESCRIPTION

Get a reference to the blockdevice at *pathname* in the current namespace if possible and return it. Return ERR\_PTR(error) otherwise.

## COPYRIGHT
