Bug 163949 - bad handling of command line options for kudzu
bad handling of command line options for kudzu
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kudzu (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks: FC5Blocker
  Show dependency treegraph
 
Reported: 2005-07-22 07:01 EDT by Gilles J. Seguin
Modified: 2014-03-16 22:55 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.1.118-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-22 21:43:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Gilles J. Seguin 2005-07-22 07:01:58 EDT
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 13:36:57 EDT
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 17:45:57 EDT
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 17:59:44 EDT
Created attachment 117085 [details]
simple fix

Try this.
Comment 4 Gilles J. Seguin 2005-07-22 20:34:14 EDT
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-22 21:43:15 EDT
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.