Bug 33202

Summary: sys/dev/mly/mly.c minor mly_printf cosmetic problem
Product: Base System Reporter: Chris Dillon <cdillon>
Component: kernAssignee: msmith
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   

Description Chris Dillon 2001-12-26 17:00:01 UTC
In mly_process_event of sys/dev/mly/mly.c, the mly_printf for event class 'e' (enclosure) does not appear to output a terminating newline like the rest of the event classes.  This results in logfile output such as this:

Dec 26 05:44:32 duey /kernel: mly0:  enclosure 1 temperature sensor 0 failedmly0:  enclosure 1 temperature sensor 0 failedmly0:  enclosure 1 temperature sensor 0 failed

Fix: 

Since I won't be able to test any changes I make (I don't know how to cause an enclosure event out of the blue, and the box in question is also not in front of me right now) and since I'm really not all that good with C anyway, I'll leave this up to someone more qualified.
How-To-Repeat: Cause an enclosure event, or be unlucky enough to witness one.
Comment 1 Chris Dillon 2001-12-30 06:22:30 UTC
On Wed, 26 Dec 2001, Chris Dillon wrote:

> >Fix:
> Since I won't be able to test any changes I make (I don't know how
> to cause an enclosure event out of the blue, and the box in
> question is also not in front of me right now) and since I'm
> really not all that good with C anyway, I'll leave this up to
> someone more qualified.

OK, I underestimated myself.  After some discussion with people in
#FreeBSD on IRC and trying several different routes, I finally decided
that just taking the printf arguments out of the lookup table was the
cleanest way to handle this.  Unfortunately the error messages won't
be quite as perfectly clear as they were before, but should still make
sense.  I'm currently running this patch on my production box that has
the mly controller in it, but unfortunately the source of the problems
seems to have disappeared and so I haven't seen any enclosure errors
again to verify that the output is what is expected.  If anybody can
test this patch by applying it and enerating any of the affected
enclosure errors involved, I'd appreciate it.

Uuencoded patch follows:

begin 644 mly_patch
M+2TM('-Y<R]D978O;6QY+VUL>2YC+F]R:6<)36]N($UA<B`@-2`Q-#HQ-SHR
M-"`R,#`Q"BLK*R!S>7,O9&5V+VUL>2]M;'DN8PE4:'4@1&5C(#(W(#$U.C0Y
M.C4Y(#(P,#$*0$`@+3<W-"PW("LW-S0L-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)"3!X,#$T-7TL"BL@("`@>R)E("!T96UP97)A='5R92!S96YS;W(@9F%I
M;&5D(BP)"0D)"3!X,#$T-GTL"BL@("`@>R)E("!T96UP97)A='5R92!S96YS
M;W(@8W)I=&EC86PB+`D)"0D),'@P,30W?2P**R`@("![(F4@('1E;7!E<F%T
M=7)E('-E;G-O<B!O:R(L"0D)"0DP>#`Q-#A]+`HK("`@('LB92`@=&5M<&5R
M871U<F4@<V5N<V]R(&YO="!P<F5S96YT(BP)"0D),'@P,30Y?2P**R`@("![
M(F4@('5N:70@86-C97-S(&-R:71I8V%L(BP)"0D)"0DP>#`Q-&%]+`HK("`@
M('LB92`@=6YI="!A8V-E<W,@;VLB+`D)"0D)"3!X,#$T8GTL"BL@("`@>R)E
M("!U;FET(&%C8V5S<R!O9F9L:6YE(BP)"0D)"0DP>#`Q-&-]+`H@("`@("\J
M(&-O;G1R;VQL97(@979E;G1S("@P>#`Q.#`@+2`P>#`Q9F8I("HO"B`@("`@
M>R)C("!C86-H92!W<FET92!B86-K(&5R<F]R(BP)"0D)"3!X,#$X,7TL"B`@
M("`@>R)C("!B871T97)Y(&)A8VMU<"!U;FET(&9O=6YD(BP)"0D)"3!X,#$X
$.'TL"@``
`
end



--
 Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32 (Intel x86) and Alpha architectures
 - IA64, PowerPC, UltraSPARC, and ARM architectures under development
 - http://www.freebsd.org
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2002-01-09 12:42:52 UTC
Responsible Changed
From-To: freebsd-bugs->msmith

Over to the Mylex driver maintainer.  If he's happy with the patch, 
I can commit it for him, but for now, the ball is in his court.
Comment 3 Chris Dillon 2002-01-30 20:12:19 UTC
On Wed, 26 Dec 2001, Chris Dillon wrote:

> >Number:         33202
> >Category:       kern
> >Synopsis:       sys/dev/mly/mly.c minor mly_printf cosmetic problem

Hmm...  I just noticed that GNATS didn't attach the message I sent a
while back with the revised patch in it to the audit trail.  Let's
hope it attaches this one.  The message containing the revised patch
has the following Message-ID:

<Pine.BSF.4.32.0112301857120.45706-100000@mail.wolves.k12.mo.us>

--
 Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32 (Intel x86) and Alpha architectures
 - IA64, PowerPC, UltraSPARC, and ARM architectures under development
 - http://www.freebsd.org
Comment 4 Scott Long freebsd_committer freebsd_triage 2003-02-11 06:36:53 UTC
State Changed
From-To: open->closed

The simplest way to resolve this is to just do an explicit 'printf("n");' 
after the mly_printf().  Fixed.