Bug 163949 - bad handling of command line options for kudzu
Summary: bad handling of command line options for kudzu
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kudzu
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: FC5Blocker
TreeView+ depends on / blocked
 
Reported: 2005-07-22 11:01 UTC by Gilles J. Seguin
Modified: 2014-03-17 02:55 UTC (History)
1 user (show)

Fixed In Version: 1.1.118-1
Clone Of:
Environment:
Last Closed: 2005-07-23 01:43:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
simple fix (488 bytes, patch)
2005-07-22 21:59 UTC, Bill Nottingham
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.