tojocky / inxi

Automatically exported from code.google.com/p/inxi
0 stars 0 forks source link

Adaptec PCI IDE controller card fails to show disk name #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use an adaptec (and I suspect any other) IDE controller card for hard 
disk
2. Running debian stable, not sure if this matters

What is the expected output? Should show disk name

What do you see instead? Null, nothing for any drive attached to the 
controller card.

I'd like to try this with the trash80 hard disk detection logic as well 
to see if that helps or is the same.

The cause is simple: 
{{{ for disk in /proc/ide/ide*/hd*
    do 
        if [[ -e $disk/media && $( remove_erroneous_chars 
$disk/media ) = disk ]];then
            # BUGFIX: Ran into a debian sarge kernel that did 
not have the "capacity" file in the hd* directories
            # also, for PCI ata controller card, no capacity 
is listed
            if [[ ! -e $disk/capacity ]];then
                disk_capacity=0
                break
            fi
            (( disk_capacity+=$( remove_erroneous_chars 
$disk/capacity ) ))
            # this adds the (x) numbering in front of each 
disk found, and creates the full disk string
            hdd_model="${hdd_model}${hdd_model+ ${C1}
($i)${C2}}$( remove_erroneous_chars $disk/model )"
            ((i++))
        fi
    done}}}

If you do ls /proc/ide/ide*/hde, it doesn't have the file capacity in it, 
so inxi fails to do any further checking, even though you can get this 
data from other places I believe.

So what we'll need to do is create a more robust backup check, or a more 
robust primary check.

This is hdx because it's running a debian etch kernel, in other systems 
this might be handled by the sdx logic instead.

Original issue reported on code.google.com by inxi-...@techpatterns.com on 4 Nov 2008 at 8:41

GoogleCodeExporter commented 8 years ago
This is fixed with a full rewrite of the core get hdd data logic. Now it fills 
arrays, and determines itself from /proc/partitions, which seems to be 
complete, 
then fills in the data using other methods.

Original comment by inxi-...@techpatterns.com on 8 Nov 2008 at 6:37