From: Oleg Drokin <green@namesys.com>
To: hch@lst.de, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: "[PATCH] devfs: switch over ubd to ->devfs_name" breaks ubd/sysfs
Date: Mon, 21 Apr 2003 15:55:30 +0400 [thread overview]
Message-ID: <20030421155530.A7544@namesys.com> (raw)
Hello!
The "[PATCH] devfs: switch over ubd to ->devfs_name" patch that was included into 2.5.68,
have broken UML's ubd/sysfs interaction.
Sysfs is very upset when something tries to register several devices with
same name, so I was forced to use following patch.
If this is wrong, then please explain to me why, and suggest the correct way of handling
this situation.
Thank you.
Bye,
Oleg
===== arch/um/drivers/ubd_kern.c 1.32 vs edited =====
--- 1.32/arch/um/drivers/ubd_kern.c Sun Apr 20 01:17:05 2003
+++ edited/arch/um/drivers/ubd_kern.c Mon Apr 21 15:52:54 2003
@@ -494,7 +494,7 @@
disk->first_minor = unit << UBD_SHIFT;
disk->fops = &ubd_blops;
set_capacity(disk, size / 512);
- sprintf(disk->disk_name, "ubd");
+ sprintf(disk->disk_name, "ubd%d", unit);
sprintf(disk->devfs_name, "ubd/disc%d", unit);
disk->private_data = &ubd_dev[unit];
@@ -527,7 +527,7 @@
if(err)
return(err);
- if(fake_major)
+ if(fake_major != MAJOR_NR)
ubd_new_disk(fake_major, dev->size, n,
&fake_gendisk[n]);
next reply other threads:[~2003-04-21 11:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-21 11:55 Oleg Drokin [this message]
2003-04-21 12:18 ` "[PATCH] devfs: switch over ubd to ->devfs_name" breaks ubd/sysfs Christoph Hellwig
2003-04-21 12:30 ` Oleg Drokin
2003-04-21 12:34 ` Christoph Hellwig
2003-04-21 12:39 ` Oleg Drokin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030421155530.A7544@namesys.com \
--to=green@namesys.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox