diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-02-03 18:44:38 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-03 18:44:38 -0800 |
| commit | 62c10f9eb2213c1850f26ea51b4efa6396696d68 (patch) | |
| tree | 22eb45c3dadf95ebecc8df31b64234e1574f8811 /include/linux/raid | |
| parent | fe6498c9361bf09ca14f9da281283a8216c09710 (diff) | |
[PATCH] md: Change the way the name of an md device is printed in error messages.
From: NeilBrown <neilb@cse.unsw.edu.au>
Instead of using ("md%d", mdidx(mddev)), we now use ("%s", mdname(mddev))
where mdname is the disk_name field in the associated gendisk structure.
This allows future flexability in naming.
Diffstat (limited to 'include/linux/raid')
| -rw-r--r-- | include/linux/raid/md_k.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 7b6e12c45dc9..a89da5378b5f 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -281,6 +281,10 @@ static inline int mdidx (mddev_t * mddev) { return mddev->__minor; } +static inline char * mdname (mddev_t * mddev) +{ + return mddev->gendisk ? mddev->gendisk->disk_name : "mdX"; +} extern mdk_rdev_t * find_rdev_nr(mddev_t *mddev, int nr); |
