patch-1.3.70 linux/drivers/block/md.c
Next file: linux/drivers/block/rz1000.c
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Wed Feb 28 08:42:33 1996
- Orig file:
v1.3.69/linux/drivers/block/md.c
- Orig date:
Wed Feb 28 11:50:00 1996
diff -u --recursive --new-file v1.3.69/linux/drivers/block/md.c linux/drivers/block/md.c
@@ -28,6 +28,7 @@
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/blkdev.h>
+#include <linux/genhd.h>
#include <errno.h>
#define MAJOR_NR MD_MAJOR
@@ -94,8 +95,6 @@
static char name[10]; /* This should be long
enough for a device name ! */
struct gendisk *hd=find_gendisk (dev);
- char base_name;
- int minor=MINOR(dev);
if (!hd)
{
@@ -104,12 +103,7 @@
return (name);
}
- base_name = (hd->major == IDE1_MAJOR) ? 'c' : 'a';
- sprintf(name, "%s%c%d",
- hd->major_name,
- base_name + (minor >> hd->minor_shift),
- minor & ((1 << hd->minor_shift) - 1));
- return (name);
+ return disk_name (hd, MINOR(dev), name); /* routine in genhd.c */
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this