blkdev_get_by_path(9)

blkdev_get_by_path9

Open a block device by name

Usage

struct block_device * blkdev_get_by_path(const char * path, fmode_t mode, void * holder);

Arguments

path

path to the block device to open

mode

FMODE_* mask

holder

exclusive holder identifier

Overview

Open the blockdevice described by the device file at path. mode and holder are identical to blkdev_get.

On success, the returned block_device has reference count of one.

Context

Might sleep.

Return

Pointer to block_device on success, ERR_PTR(-errno) on failure.

Releases

3 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.