[PATCH] Re: make bzImage fails on 2.5.38

Hiroshi Takekawa (sian@big.or.jp)
Sun, 22 Sep 2002 15:43:31 +0900 (JST)


Here's diff for this.
No sooner than had I made this diff than I read your mail...
But just replacing devfs_handle with cdroms causes weird
cdroms/cdroms/cdrom0 symlink.
Please review.

> > First post to the list, I've followed the format given in REPORTING-BUGS
> >
> > 1. make bzImage fails on 2.5.38

> Arrgh.

> ed fs/partitions/check.c <<EOF
> 365s/devfs_handle/cdroms/
> w
> q
> EOF

diff -Naur linux-2.5.38.vanilla/fs/partitions/check.c linux-2.5.38/fs/partitions/check.c
--- linux-2.5.38.vanilla/fs/partitions/check.c Sun Sep 22 15:27:26 2002
+++ linux-2.5.38/fs/partitions/check.c Sun Sep 22 15:17:10 2002
@@ -338,17 +338,13 @@
static void devfs_create_cdrom(struct gendisk *dev)
{
#ifdef CONFIG_DEVFS_FS
- int pos = 0;
- devfs_handle_t dir, slave;
- unsigned int devfs_flags = DEVFS_FL_DEFAULT;
- char dirname[64], symlink[16];
char vname[23];

if (!cdroms)
cdroms = devfs_mk_dir (NULL, "cdroms", NULL);

dev->number = devfs_alloc_unique_number(&cdrom_numspace);
- sprintf(vname, "cdroms/cdrom%d", dev->number);
+ sprintf(vname, "cdrom%d", dev->number);
if (dev->de) {
int pos;
devfs_handle_t slave;
@@ -362,13 +358,13 @@
pos = devfs_generate_path(dev->disk_de, rname+3, sizeof(rname)-3);
if (pos >= 0) {
strncpy(rname + pos, "../", 3);
- devfs_mk_symlink(devfs_handle, vname,
+ devfs_mk_symlink(cdroms, vname,
DEVFS_FL_DEFAULT,
rname + pos, &slave, NULL);
devfs_auto_unregister(dev->de, slave);
}
} else {
- dev->disk_de = devfs_register (NULL, vname, DEVFS_FL_DEFAULT,
+ dev->disk_de = devfs_register (cdroms, vname, DEVFS_FL_DEFAULT,
dev->major, dev->first_minor,
S_IFBLK | S_IRUGO | S_IWUGO,
dev->fops, NULL);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/