Hi Debian,

might you consider this?  (Let me know if it should go to someone else please?)

Thanks,
Ed

Ed Drouillard
Amherstburg, Ontario, Canada
edru...@hotmail.com

________________________________
From: Sander van Malssen <s...@kozmix.org>
Sent: March 21, 2024 7:07 AM
To: Ed Drouillard <edru...@hotmail.com>
Subject: Re: consideration for enhancement to the lsdev command?


Hello Ed,

That looks sensible but to be honest, I haven't actually maintained lsdev 
since, eh, around 2001 I believe! If Debian is still maintaining it, best to 
send your sugestion to them 
(packa...@qa.debian.org<mailto:packa...@qa.debian.org> I think) instead.

Cheers!
Sander


On 2024-03-21 01:34, Ed Drouillard wrote:


________________________________
From: Ed Drouillard <edru...@hotmail.com>
Sent: March 20, 2024 8:20 PM
To: s...@kozmix.cistron.nl <s...@kozmix.cistron.nl>
Subject: consideration for enhancement to the lsdev command?

Hi Sander,

I found the output of the lsdev command on Debian to be a bit hard to read, and 
so I made the following 2 changes for your consideration:

# diff /usr/bin/lsdev $HOME/bin/lsdev
54c54
< printf ("%-16s %4s%6s %s\n------------------------------------------------\n",
---
> printf ("%-25s|%4s|%15s 
> %s\n----------------------------------------------------------------------------------------------\n",
58c58
<     printf ("%-16s %4s%6s %s\n",
---
>     printf ("%-25s|%4s|%15s |%-s\n",




This simple change results in the following output:

# bin/lsdev
Device                   | DMA|            IRQ  I/O Ports
----------------------------------------------------------------------------------------------
0000:00:1f.2             |    |                |   f020-f03f   f040-f043   
f050-f057   f060-f063   f070-f077
0000:00:1f.3             |    |                |   f000-f01f
0000:01:00.0             |    |                |     e000-e07f
0000:03:00.0             |    |                |     d000-d0ff
ACPI                     |    |                |     1800-1803     1804-1805    
 1808-180b     1820-182f     1850-1850
acpi                     |    |              9 |
ahci                     |    |                |     f020-f03f     f040-f043    
 f050-f057     f060-f063     f070-f077
ahci[0000:00:1f.2]       |    |             30 |
ath9k                    |    |             19 |
cascade                  |   4|                |
dma                      |    |                |   0080-008f
dma1                     |    |                |   0000-001f
dma2                     |    |                |   00c0-00df
dmar0                    |    |             24 |
ehci_hcd:usb1            |    |             16 |
ehci_hcd:usb3            |    |             23 |
enp3s0                   |    |             29 |
fpu                      |    |                |   00f0-00ff
i801_smbus               |    |             18 |     f000-f01f
iTCO_wdt                 |    |                |       1830-1833       1860-187f
iTCO_wdt.1.auto          |    |                |     1830-1833     1860-187f
keyboard                 |    |                |   0060-0060   0064-0064
mei_me                   |    |             32 |
nvidia                   |    |             34 |
PCI                      |    |                | 0000-0cf7 0cf8-0cff 0d00-ffff  
 d000-dfff   e000-efff
PCIe PME                 |    |    25 26 27 28 |
pic1                     |    |                |   0020-0021
pic2                     |    |                |   00a0-00a1
pnp                      |    |                |   04d0-04d1   0680-069f   
0a00-0a1f   0a20-0a2f   0a30-0a3f   164e-164f   1800-18fe     1854-1857   
1c00-1cfe   1d00-1dfe   1e00-1efe   1f00-1ffe   ffff-ffff     ffff-ffff       
ffff-ffff
PNP0C04:00               |    |                |     00f0-00f0
rtc0                     |    |              8 |   0070-0077
snd_hda_intel:card0      |    |             33 |
snd_hda_intel:card1      |    |             17 |
timer                    |    |              0 |
timer0                   |    |                |   0040-0043
timer1                   |    |                |   0050-0053
vga+                     |    |                |   03c0-03df
xhci_hcd                 |    |             31 |


Instead of the more cryptic:

# lsdev
Device            DMA   IRQ  I/O Ports
------------------------------------------------
0000:00:1f.2                   f020-f03f   f040-f043   f050-f057   f060-f063   
f070-f077
0000:00:1f.3                   f000-f01f
0000:01:00.0                     e000-e07f
0000:03:00.0                     d000-d0ff
ACPI                             1800-1803     1804-1805     1808-180b     
1820-182f     1850-1850
acpi                      9
ahci                             f020-f03f     f040-f043     f050-f057     
f060-f063     f070-f077
ahci[0000:00:1f.2]         30
ath9k                    19
cascade             4
dma                            0080-008f
dma1                           0000-001f
dma2                           00c0-00df
dmar0                    24
ehci_hcd:usb1            16
ehci_hcd:usb3            23
enp3s0                   29
fpu                            00f0-00ff
i801_smbus               18      f000-f01f
iTCO_wdt                           1830-1833       1860-187f
iTCO_wdt.1.auto                  1830-1833     1860-187f
keyboard                       0060-0060   0064-0064
mei_me                   32
nvidia                   34
PCI                          0000-0cf7 0cf8-0cff 0d00-ffff   d000-dfff   
e000-efff
PCIe PME              25 26 27 28
pic1                           0020-0021
pic2                           00a0-00a1
pnp                            04d0-04d1   0680-069f   0a00-0a1f   0a20-0a2f   
0a30-0a3f   164e-164f   1800-18fe     1854-1857   1c00-1cfe   1d00-1dfe   
1e00-1efe   1f00-1ffe   ffff-ffff     ffff-ffff       ffff-ffff
PNP0C04:00                       00f0-00f0
rtc0                      8    0070-0077
snd_hda_intel:card0         33
snd_hda_intel:card1         17
timer                     0
timer0                         0040-0043
timer1                         0050-0053
vga+                           03c0-03df
xhci_hcd                 31


I find it a bit difficult to tell what goes under what heading with the 
existing version.

The installed version according to the manpage is:

3rd Release                                                              
1998-05-31                                                                
LSDEV(8)

Thanks for considering the update.
Ed

Ed Drouillard
Amherstburg, Ontario, Canada
edru...@hotmail.com

Reply via email to