hello this is a small patch to md.c (kernel 2.4.0-test)
it fills hd_struct[minor].de
the result of this is that /proc/partitions displays correct output
when using devfs.
it looks like the Right Thing(tm) anyway
L.
----- Forwarded message from Luca Berra <[EMAIL PROTECTED]> -----
Date: Wed, 27 Dec 2000 18:56:47 +0100
From: Luca Berra <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
--- linux/drivers/md/md.c.bluca.orig Sat Dec 23 12:13:31 2000
+++ linux/drivers/md/md.c Tue Dec 26 14:59:40 2000
@@ -3604,6 +3604,8 @@
int md__init md_init (void)
{
static char * name = "mdrecoveryd";
+ unsigned int minor;
+ char devname[128];
printk (KERN_INFO "md driver %d.%d.%d MAX_MD_DEVS=%d, MD_SB_DISKS=%d\n",
MD_MAJOR_VERSION, MD_MINOR_VERSION,
@@ -3615,9 +3617,14 @@
return (-1);
}
devfs_handle = devfs_mk_dir (NULL, "md", NULL);
- devfs_register_series (devfs_handle, "%u",MAX_MD_DEVS,DEVFS_FL_DEFAULT,
- MAJOR_NR, 0, S_IFBLK | S_IRUSR | S_IWUSR,
- &md_fops, NULL);
+ /* we don't use devfs_register_series because we want to fill md_hd_struct */
+ for (minor=0; minor < MAX_MD_DEVS; ++minor)
+ {
+ sprintf (devname, "%u", minor);
+ md_hd_struct[minor].de = devfs_register (devfs_handle,
+ devname, DEVFS_FL_DEFAULT, MAJOR_NR, minor,
+ S_IFBLK | S_IRUSR | S_IWUSR, &md_fops, NULL);
+ }
/* forward all md request to md_make_request */
blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), md_make_request);
----- End forwarded message -----
--
Luca Berra -- [EMAIL PROTECTED]
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]