mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* mangled isapnp IDs in /proc/bus/isapnp/devices
@ 2003-04-22  9:46 Rene Rebe
  2003-04-22 14:06 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Rene Rebe @ 2003-04-22  9:46 UTC (permalink / raw)
  To: linux-kernel

Hi all,

is there a reason why the isapnp device id are mangled this way:

drivers/pnp/isapnp_proc.c

static void isapnp_devid(char *str, unsigned short vendor, unsigned short device)
{
        sprintf(str, "%c%c%c%x%x%x%x",
                        'A' + ((vendor >> 2) & 0x3f) - 1,
                        'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1,
                        'A' + ((vendor >> 8) & 0x1f) - 1,
                        (device >> 4) & 0x0f,
                        device & 0x0f,
                        (device >> 12) & 0x0f,
                        (device >> 8) & 0x0f);
}

This results in output like:

CSCd937 CSC0000

Which I have to un-mangle ... :-( What is the reason for not outputting
simple hex?

Sincerely,
- René

--  
René Rebe - Europe/Germany/Berlin
e-mail:   rene@rocklinux.org, rene.rebe@gmx.net
web:      http://www.rocklinux.org/people/rene http://gsmp.tfh-berlin.de/rene/

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-22 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22  9:46 mangled isapnp IDs in /proc/bus/isapnp/devices Rene Rebe
2003-04-22 14:06 ` Alan Cox
2003-04-22 15:21   ` Rene Rebe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®