Bug 163949

Summary: bad handling of command line options for kudzu
Product: [Fedora] Fedora Reporter: Gilles J. Seguin <segg.gill>
Component: kudzuAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.118-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-23 01:43:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 150222    
Attachments:
Description Flags
simple fix none

Description Gilles J. Seguin 2005-07-22 11:01:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-2

Description of problem:
options like --class or --bus are used in a "probe only for" mode.
which is it not true actually.

Make system-config-soundcard miss behave on my system.

Version-Release number of selected component (if applicable):
kudzu-1.1.116.2-2

How reproducible:
Always

Steps to Reproduce:
1. su -
2. kudzu -p --safe --kernel=2.6 --bus=isapnp --class=audio
3.
  

Actual Results:  -
class: UNSPEC
bus: ISAPNP
detached: 0
driver: ns558
desc: "CS4236 - CSC0001"
deviceId: CSC0001
pdeviceId: CSC0b36
-
class: UNSPEC
bus: ISAPNP
detached: 0
driver: unknown
desc: "CS4236 - CSC0003"
deviceId: CSC0003
pdeviceId: CSC0b36
-
class: UNSPEC
bus: ISAPNP
detached: 0
driver: unknown
desc: "CS4236 - CSC0010"
deviceId: CSC0010
pdeviceId: CSC0b36
-
class: AUDIO
bus: ISAPNP
detached: 0
driver: snd-cs4236
desc: "CS4236 - CSC0000"
deviceId: CSC0000
pdeviceId: CSC0b36


Expected Results:  -
class: AUDIO
bus: ISAPNP
detached: 0
driver: snd-cs4236
desc: "CS4236 - CSC0000"
deviceId: CSC0000
pdeviceId: CSC0b36


Additional info:

for the sound card the following is added to the card list
-
class: UNSPEC
bus: ISAPNP
detached: 0
driver: ns558
desc: "CS4236 - CSC0001"
deviceId: CSC0001
pdeviceId: CSC0b36

here, ns558 is a PnP Gameport
that is shown in the soundcard list.
It is perceived with index=0

# cat /etc/asound.conf
# Generated by system-config-soundcard, do not edit by hand
defaults.pcm.card 1
defaults.ctl.card 1

we want the one to be replace by zero to make the sound card work.

Comment 1 Bill Nottingham 2005-07-22 17:36:57 UTC
Hm...

'kudzu -p -c audio' shows all of those as well?

There's nothing obvious with the code there, and unfortunately, I don't have any
boxes with ISAPnP to test at the moment.

Comment 2 Gilles J. Seguin 2005-07-22 21:45:57 UTC
isapnp.c:381
in function isapnpProbe()
the line is
   if ( probeClass & dev->type )
which is supposed to remove the dev struct if it is not of the required
deviceClass (here may be CLASS_AUDIO)

since by default dev->type is CLASS_UNSPEC which is ~0
this thing is always true

we want
if (  ( dev->type != CLASS_UNSPEC && probeClass & dev->type )
   || ( probeClass == CLASS_UNSPEC && dev->type == CLASS_UNSPEC ) )

Comment 3 Bill Nottingham 2005-07-22 21:59:44 UTC
Created attachment 117085 [details]
simple fix

Try this.

Comment 4 Gilles J. Seguin 2005-07-23 00:34:14 UTC
i am happy your your fix.  Which is closing the bug report

the patch in comment #3 from Bill Nottingham
is more in line with what other bus are reporting, we have now line
class: OTHER
instead of
class: UNSPEC

present output, with comment #3 patch
# kudzu -p --safe --kernel=2.6 --bus=isapnp --class=audio
-
class: AUDIO
bus: ISAPNP
detached: 0
driver: snd-cs4236
desc: "CS4236 - CSC0000"
deviceId: CSC0000
pdeviceId: CSC0b36

# kudzu -p --safe --kernel=2.6 --bus=isapnp --class=unspec
-
class: OTHER
bus: ISAPNP
detached: 0
driver: ns558
desc: "CS4236 - CSC0001"
deviceId: CSC0001
pdeviceId: CSC0b36
-
class: OTHER
bus: ISAPNP
detached: 0
driver: unknown
desc: "CS4236 - CSC0003"
deviceId: CSC0003
pdeviceId: CSC0b36
-
class: OTHER
bus: ISAPNP
detached: 0
driver: unknown
desc: "CS4236 - CSC0010"
deviceId: CSC0010
pdeviceId: CSC0b36
-
class: AUDIO
bus: ISAPNP
detached: 0
driver: snd-cs4236
desc: "CS4236 - CSC0000"
deviceId: CSC0000
pdeviceId: CSC0b36

nice work Bill


Comment 5 Bill Nottingham 2005-07-23 01:43:15 UTC
Fixed in 1.1.118-1, in the FC5 devel tree.