* [BK PATCH] minor devfs cleanup for 2.5.40 @ 2002-10-03 21:39 Greg KH 2002-10-03 21:40 ` Greg KH 2002-10-04 16:17 ` Richard Gooch 0 siblings, 2 replies; 7+ messages in thread From: Greg KH @ 2002-10-03 21:39 UTC (permalink / raw) To: torvalds; +Cc: linux-kernel, hch Hi, Here's a changeset from Christoph Hellwig that removes some unneeded code from the kernel core. This was leftover from before devfs became part of the main kernel tree, and was trying to do some naming fixups in kernelspace. If anyone still has machines using these names, their startup scripts should be modified to use the "standard" devfs names. Please pull from: http://linuxusb.bkbits.net/devfs-2.5 thanks, greg k-h init/do_mounts.c | 58 ------------------------------------------------------- 1 files changed, 58 deletions(-) ----- ChangeSet@1.683, 2002-10-03 13:58:19-07:00, hch@sgi.com [PATCH] Remove some more devfs crap Translation code for old devfs names that _never_ were in mainline for root=. init/do_mounts.c | 58 ------------------------------------------------------- 1 files changed, 58 deletions(-) ------ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BK PATCH] minor devfs cleanup for 2.5.40 2002-10-03 21:39 [BK PATCH] minor devfs cleanup for 2.5.40 Greg KH @ 2002-10-03 21:40 ` Greg KH 2002-10-04 16:17 ` Richard Gooch 1 sibling, 0 replies; 7+ messages in thread From: Greg KH @ 2002-10-03 21:40 UTC (permalink / raw) To: torvalds; +Cc: linux-kernel, hch And here's the patch for those who want to see it. # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.682 -> 1.683 # init/do_mounts.c 1.23 -> 1.24 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/10/03 hch@sgi.com 1.683 # [PATCH] Remove some more devfs crap # # Translation code for old devfs names that _never_ were in mainline # for root=. # -------------------------------------------- # diff -Nru a/init/do_mounts.c b/init/do_mounts.c --- a/init/do_mounts.c Thu Oct 3 14:31:22 2002 +++ b/init/do_mounts.c Thu Oct 3 14:31:22 2002 @@ -642,63 +642,6 @@ return rd_load_image("/dev/root"); } -#ifdef CONFIG_DEVFS_FS - -static void __init convert_name(char *prefix, char *name, char *p, int part) -{ - int host, bus, target, lun; - char dest[64]; - char src[64]; - char *base = p - 1; - - /* Decode "c#b#t#u#" */ - if (*p++ != 'c') - return; - host = simple_strtol(p, &p, 10); - if (*p++ != 'b') - return; - bus = simple_strtol(p, &p, 10); - if (*p++ != 't') - return; - target = simple_strtol(p, &p, 10); - if (*p++ != 'u') - return; - lun = simple_strtol(p, &p, 10); - if (!part) - sprintf(dest, "%s/host%d/bus%d/target%d/lun%d", - prefix, host, bus, target, lun); - else if (*p++ == 'p') - sprintf(dest, "%s/host%d/bus%d/target%d/lun%d/part%s", - prefix, host, bus, target, lun, p); - else - sprintf(dest, "%s/host%d/bus%d/target%d/lun%d/disc", - prefix, host, bus, target, lun); - *base = '\0'; - sprintf(src, "/dev/%s", name); - sys_mkdir(src, 0755); - *base = '/'; - sprintf(src, "/dev/%s", name); - sys_symlink(dest, src); -} - -static void __init devfs_make_root(char *name) -{ - - if (!strncmp(name, "sd/", 3)) - convert_name("../scsi", name, name+3, 1); - else if (!strncmp(name, "sr/", 3)) - convert_name("../scsi", name, name+3, 0); - else if (!strncmp(name, "ide/hd/", 7)) - convert_name("..", name, name + 7, 1); - else if (!strncmp(name, "ide/cd/", 7)) - convert_name("..", name, name + 7, 0); -} -#else -static void __init devfs_make_root(char *name) -{ -} -#endif - static void __init mount_root(void) { #ifdef CONFIG_ROOT_NFS @@ -713,7 +656,6 @@ ROOT_DEV = Root_FD0; } #endif - devfs_make_root(root_device_name); create_dev("/dev/root", ROOT_DEV, root_device_name); #ifdef CONFIG_BLK_DEV_FD if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) { ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BK PATCH] minor devfs cleanup for 2.5.40 2002-10-03 21:39 [BK PATCH] minor devfs cleanup for 2.5.40 Greg KH 2002-10-03 21:40 ` Greg KH @ 2002-10-04 16:17 ` Richard Gooch 2002-10-04 16:24 ` Christoph Hellwig 1 sibling, 1 reply; 7+ messages in thread From: Richard Gooch @ 2002-10-04 16:17 UTC (permalink / raw) To: Greg KH; +Cc: torvalds, linux-kernel, hch Greg KH writes: > Here's a changeset from Christoph Hellwig that removes some unneeded > code from the kernel core. This was leftover from before devfs became > part of the main kernel tree, and was trying to do some naming fixups in > kernelspace. If anyone still has machines using these names, their > startup scripts should be modified to use the "standard" devfs names. > > Please pull from: http://linuxusb.bkbits.net/devfs-2.5 NO! Dammit, you'll break everyone who is using these compact names to mount the root FS. Look more closely at the code you're trying to remove, and you'll see it's *not* used to avoid work in startup scripts. It's only used to create the devfs entry for the root FS. This change is gratuitous. The code is __init code anyway, so doesn't contribute to bloat. And forcing people to migrate to the longer names isn't reasonable, as it chews up precious space on the kernel command line. I've had times where I ran out of space when I had too many options. Linus, please don't apply. Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BK PATCH] minor devfs cleanup for 2.5.40 2002-10-04 16:17 ` Richard Gooch @ 2002-10-04 16:24 ` Christoph Hellwig 2002-10-04 16:27 ` Richard Gooch 0 siblings, 1 reply; 7+ messages in thread From: Christoph Hellwig @ 2002-10-04 16:24 UTC (permalink / raw) To: Richard Gooch; +Cc: Greg KH, torvalds, linux-kernel, hch On Fri, Oct 04, 2002 at 10:17:34AM -0600, Richard Gooch wrote: > Greg KH writes: > > Here's a changeset from Christoph Hellwig that removes some unneeded > > code from the kernel core. This was leftover from before devfs became > > part of the main kernel tree, and was trying to do some naming fixups in > > kernelspace. If anyone still has machines using these names, their > > startup scripts should be modified to use the "standard" devfs names. > > > > Please pull from: http://linuxusb.bkbits.net/devfs-2.5 > > NO! Dammit, you'll break everyone who is using these compact names to > mount the root FS. Look more closely at the code you're trying to > remove, and you'll see it's *not* used to avoid work in startup > scripts. It's only used to create the devfs entry for the root FS. This is 2.5 and those names were never in mainline. Use your new devfs names or plain linux names or just hex numbers. Linux is not a place were we keep junk around. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BK PATCH] minor devfs cleanup for 2.5.40 2002-10-04 16:24 ` Christoph Hellwig @ 2002-10-04 16:27 ` Richard Gooch 2002-10-04 16:31 ` Christoph Hellwig 0 siblings, 1 reply; 7+ messages in thread From: Richard Gooch @ 2002-10-04 16:27 UTC (permalink / raw) To: Christoph Hellwig; +Cc: Greg KH, torvalds, linux-kernel Christoph Hellwig writes: > On Fri, Oct 04, 2002 at 10:17:34AM -0600, Richard Gooch wrote: > > Greg KH writes: > > > Here's a changeset from Christoph Hellwig that removes some unneeded > > > code from the kernel core. This was leftover from before devfs became > > > part of the main kernel tree, and was trying to do some naming fixups in > > > kernelspace. If anyone still has machines using these names, their > > > startup scripts should be modified to use the "standard" devfs names. > > > > > > Please pull from: http://linuxusb.bkbits.net/devfs-2.5 > > > > NO! Dammit, you'll break everyone who is using these compact names to > > mount the root FS. Look more closely at the code you're trying to > > remove, and you'll see it's *not* used to avoid work in startup > > scripts. It's only used to create the devfs entry for the root FS. > > This is 2.5 and those names were never in mainline. Use your new > devfs names or plain linux names or just hex numbers. Linux is > not a place were we keep junk around. Those names *were* in mainline. They've been there all through 2.4.x. It's a useful feature that is *still* being used. Change this and lots of people will get a panic at boot because there root FS is "missing". Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BK PATCH] minor devfs cleanup for 2.5.40 2002-10-04 16:27 ` Richard Gooch @ 2002-10-04 16:31 ` Christoph Hellwig 2002-10-04 16:37 ` Richard Gooch 0 siblings, 1 reply; 7+ messages in thread From: Christoph Hellwig @ 2002-10-04 16:31 UTC (permalink / raw) To: Richard Gooch; +Cc: Greg KH, torvalds, linux-kernel On Fri, Oct 04, 2002 at 10:27:07AM -0600, Richard Gooch wrote: > Those names *were* in mainline. They've been there all through 2.4.x. > It's a useful feature that is *still* being used. Change this and lots > of people will get a panic at boot because there root FS is "missing". They have never been the devfs names in_any_ kernel. Linus made you change to saner names before merging devfs (saner code would also have been a good idea, btw..). Anyway, 2.5 is going to initramfs, so feel free to put devfsd into your initramfs. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [BK PATCH] minor devfs cleanup for 2.5.40 2002-10-04 16:31 ` Christoph Hellwig @ 2002-10-04 16:37 ` Richard Gooch 0 siblings, 0 replies; 7+ messages in thread From: Richard Gooch @ 2002-10-04 16:37 UTC (permalink / raw) To: Christoph Hellwig; +Cc: Greg KH, torvalds, linux-kernel Christoph Hellwig writes: > On Fri, Oct 04, 2002 at 10:27:07AM -0600, Richard Gooch wrote: > > Those names *were* in mainline. They've been there all through 2.4.x. > > It's a useful feature that is *still* being used. Change this and lots > > of people will get a panic at boot because there root FS is "missing". > > They have never been the devfs names in_any_ kernel. Linus made you > change to saner names before merging devfs (saner code would also > have been a good idea, btw..). Anyway, 2.5 is going to initramfs, > so feel free to put devfsd into your initramfs. The convenience names for the root FS *have* been in the kernel since before 2.4.x. I agree with the initramfs approach: that's been my plan for handling the rootFS compatibility names (put a mini devfsd into initramfs). But until all the infrastructure for that is ready, you can't just go around breaking features people rely on. Especially where there is no benefit to breaking it. If you really feel strongly about it, and don't want to wait for devfsd to be added to initramfs, by all means move the current code (or the moral equivalent) to initramfs. But you'll have to wait for initramfs to be available and for it to be the default. Regards, Richard.... Permanent: rgooch@atnf.csiro.au Current: rgooch@ras.ucalgary.ca ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-10-04 16:32 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-10-03 21:39 [BK PATCH] minor devfs cleanup for 2.5.40 Greg KH 2002-10-03 21:40 ` Greg KH 2002-10-04 16:17 ` Richard Gooch 2002-10-04 16:24 ` Christoph Hellwig 2002-10-04 16:27 ` Richard Gooch 2002-10-04 16:31 ` Christoph Hellwig 2002-10-04 16:37 ` Richard Gooch
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox