On Mon, 10 Jul 2006 16:21:47 BST, Russell King said: > Maybe - what if userspace is looking up /dev/tty0 in /proc/tty/drivers > and happens to know that it's called /dev/vc/0, because it's working > around this known idiosyncrasy of the kernel ? It only breaks if it's being totally brain-dead and doing this: if (!strcmp(inputdev,"/dev/tty0") inputdev = "/dev/vc/0"; and not bothering to check that /dev/tty0 could *possibly* actually appear in the /proc/tty entry. In fact, it would have to be actively asserting that it can't appear. Code that does this sort of thing: if (!strcmp(procentry,"/dev/vc/0") procentry = "/dev/tty0"; if (!strcmp(procentry, inputdev)) { whatever to to do when found } will still work. > That "terminally broken stuff" might just happen to work with today's > kernels. Even so, that's no reason to pile in additional user-visible > changes which could potentially have adverse effects. Oddly enough, "This PoS code only happened to work" is considered a good and sufficient reason to fix kernel code. :) Also, please note that I *did* agree with Alan - this needs to be done right in /sys first, and then tools updated. However, having provided a *correct* way to do it, we should not *then* use "old crap might break further" as a reason to not finish the cleanup.
Attachment:
pgpfjWxODiqlS.pgp
Description: PGP signature
- References:
- Re: [PATCH] Clean up old names in tty code to current names
- From: Alan Cox <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: "Jon Smirl" <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: Alan Cox <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: "Jon Smirl" <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: Alan Cox <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: "Jon Smirl" <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: "Antonino A. Daplas" <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: "Jon Smirl" <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: Alan Cox <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- From: [email protected]
- Re: [PATCH] Clean up old names in tty code to current names
- From: Russell King <[email protected]>
- Re: [PATCH] Clean up old names in tty code to current names
- Prev by Date: Re: [PATCH v2] cirrus-logic-framebuffer-i2c-support.patch
- Next by Date: Re: [linux-pm] [BUG] sleeping function called from invalid context during resume
- Previous by thread: Re: [PATCH] Clean up old names in tty code to current names
- Next by thread: Re: [PATCH] Clean up old names in tty code to current names
- Index(es):