From: Oleg Drokin <green@namesys.com>
To: Jeff Dike <jdike@karaya.com>
Cc: linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: uml-patch-2.5.62-1
Date: Thu, 20 Feb 2003 11:08:51 +0300 [thread overview]
Message-ID: <20030220110851.A1069@namesys.com> (raw)
In-Reply-To: <200302192008.h1JK88P16444@uml.karaya.com>
Hello!
On Wed, Feb 19, 2003 at 03:08:08PM -0500, Jeff Dike wrote:
> ubd driver cleanups and fixes
Ah, great. Except it introduced new breakage.
That hunk below from your diff adds add_disk() call.
Notice how a bit down we have another call to add_disk(),
that is not removed. So we end up woth two add_disk() calls.
Of course sysfs gets upset immediately (probably not only it).
diff -Naur a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
--- a/arch/um/drivers/ubd_kern.c Wed Feb 19 11:24:39 2003
+++ b/arch/um/drivers/ubd_kern.c Wed Feb 19 11:29:49 2003
@@ -499,17 +516,22 @@
disk->major = major;
disk->first_minor = minor;
disk->fops = &ubd_blops;
+ disk->private_data = dev;
+ disk->queue = &ubd_queue;
set_capacity(disk, size / 512);
- /* needs to be ubd -> /dev/ubd/discX/disc */
- sprintf(disk->disk_name, "ubd");
+ sprintf(disk->disk_name, name);
*disk_out = disk;
+ add_disk(disk);
- /* /dev/ubd/N style names */
- sprintf(devfs_name, "%d", unit);
- *handle_out = devfs_register(dir_handle, devfs_name,
- DEVFS_FL_REMOVABLE, major, minor,
- S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |
- S_IWGRP, &ubd_blops, NULL);
+ if(handle_out != NULL){
+ /* /dev/ubd/N style names */
+ sprintf(devfs_name, "%d", unit);
+ *handle_out = devfs_register(dir_handle, devfs_name,
+ DEVFS_FL_DEFAULT, major, minor,
+ S_IFBLK | S_IRUSR | S_IWUSR |
+ S_IRGRP | S_IWGRP, &ubd_blops,
+ NULL);
+ }
disk->private_data = &ubd_dev[unit];
disk->queue = &ubd_queue;
add_disk(disk);
Bye,
Oleg
next prev parent reply other threads:[~2003-02-20 7:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-19 20:08 uml-patch-2.5.62-1 Jeff Dike
2003-02-20 8:08 ` Oleg Drokin [this message]
2003-02-21 18:50 ` [uml-devel] uml-patch-2.5.62-1 Jeff Dike
-- strict thread matches above, loose matches on Subject: below --
2003-02-26 19:05 uml-patch-2.5.62-1 Jeff Dike
2003-02-27 5:45 ` uml-patch-2.5.62-1 Daniel Phillips
2003-02-27 7:40 ` uml-patch-2.5.62-1 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=20030220110851.A1069@namesys.com \
--to=green@namesys.com \
--cc=jdike@karaya.com \
--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