Re: [PATCH] Clean up old names in tty code to current names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux