From cbbcdf7c29692ccd8e498b5e4955d9a9d5df1ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20N=C3=A9meth?= Date: Fri, 20 Feb 2009 08:12:51 +0100 Subject: [PATCH] --- yaml --- r: 131799 b: refs/heads/master c: 9e8c0bccdc944bd09361672d47660810c027bcaa h: refs/heads/master i: 131797: 2f20e8ea48e5861f6c790460e459b03652ad75db 131795: 0a126af1bc8e3e30a457072c5f348614613f14c9 131791: 6cf492a097004c0fa9afc3bc5176657d598759fc v: v3 --- [refs] | 2 +- trunk/block/genhd.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d3d5201557ba..8bc6a2ab6a37 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b2bf96833c5782befc3e7700f791fde754a47b01 +refs/heads/master: 9e8c0bccdc944bd09361672d47660810c027bcaa diff --git a/trunk/block/genhd.c b/trunk/block/genhd.c index e1eadcc9546a..a9ec910974c1 100644 --- a/trunk/block/genhd.c +++ b/trunk/block/genhd.c @@ -256,6 +256,22 @@ void blkdev_show(struct seq_file *seqf, off_t offset) } #endif /* CONFIG_PROC_FS */ +/** + * register_blkdev - register a new block device + * + * @major: the requested major device number [1..255]. If @major=0, try to + * allocate any unused major number. + * @name: the name of the new block device as a zero terminated string + * + * The @name must be unique within the system. + * + * The return value depends on the @major input parameter. + * - if a major device number was requested in range [1..255] then the + * function returns zero on success, or a negative error code + * - if any unused major number was requested with @major=0 parameter + * then the return value is the allocated major number in range + * [1..255] or a negative error code otherwise + */ int register_blkdev(unsigned int major, const char *name) { struct blk_major_name **n, *p;