Bug 19817

Summary: usbd broken, does not parse usbd.conf
Product: Base System Reporter: scott_long <scott_long>
Component: miscAssignee: Nick Hibma <n_hibma>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description scott_long 2000-07-10 08:20:01 UTC
usbd fails to parse it's config file, usbd.conf.  Even though the conf
file is correct in all respects, attempting to start usbd yields 
"etc/usbd.conf:10: Syntax error in 'device'".  Looking at the source
of usbd shows a for loop that reads each line of the conf file and
parses it.  The problem arises in that when the 'device' line is parsed,
the same line is then parsed for the next keyword.  COrrect behaviour 
is for the for loop to break and allow the next conf file line to be
read in.  Attahched patch does this.

How-To-Repeat: Problem will be apparent when usbd is run
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-07-10 12:49:26 UTC
Responsible Changed
From-To: freebsd-bugs->n_hibma

Nick, this one has a patch on it. :-)
Comment 2 n_hibma 2000-07-10 15:34:48 UTC
Scott,

could you send me the offending usbd file?

The code as it is is correct. The device line is used twice, first for
the allocation of a fresh action and then for filling in the appropriate
information.

But I'd like to have a look at your usbd.conf file to make sure that
there is not another problem hiding somewhere.

Nick
--
Work: n_hibma@calcaphon.com             Personal: n_hibma@webweaving.org
Comment 3 Nick Hibma freebsd_committer freebsd_triage 2000-07-14 23:49:00 UTC
State Changed
From-To: open->feedback

Peter Wemm and green submitted a patch for this problem. Waiting 
for feedback from submitter whether this solves the problem for 
him.
Comment 4 scott_long 2000-07-15 00:25:15 UTC
The submitted fix resolves the problem for me.  Thanks
Comment 5 Nick Hibma freebsd_committer freebsd_triage 2000-08-07 00:33:23 UTC
State Changed
From-To: feedback->closed

The problem was solved by Peter Wemm. The problem was changed 
malloc flags that tripped a bugh in the code.