annoying nitlet in kernel click_chatter()

Douglas S. J. De Couto decouto at lcs.mit.edu
Tue Jun 24 21:17:47 EDT 2003


hahaha, it's tricky tricky....

build the Pct element, under local/

userlevel:

grid-10% ./userlevel/click -q -e 'Pct'
hello 7% there


kernel:

# echo Pct > /proc/click/config
# dmesg | grep hello | tail -1
chatter: hello 7% there

hmm, seems to work.  but i didn't make it up.  look:

# grep hello /var/log/messages | tail -1
Jun 24 20:09:42 roofnet-10 kernel: chatter: hello 7%% there


So it's not a kernel or click thing, it's how syslog or whatever is 
treating `%'!!!  what an exciting obscure fact to learn.
 From the syslog(3) man page

        syslog() generates a log message, which will be distributed by 
syslogd(8).  The priority
        argument  is  formed  by ORing the facility and the level values 
(explained below).  The
        remaining arguments are a format, as in printf(3) and any 
arguments required by the for-
        mat,  except  that  the  two character sequence %m will be 
replaced by the error message
        string strerror(errno).  A trailing newline is added when needed.

d

On Tuesday, Jun 24, 2003, at 18:53 US/Eastern, Eddie Kohler wrote:

> Dearest Douglas,
>
> Could you provide a more specific bug case? I did this in the kernel:
>
>     click_chatter("%d%% %d", 10, 200);
>
> and got:
>
>     chatter: 10% 200
>
> So that looks correct.
> HMM
> E
>
>
--
Douglas S. J. De Couto     <decouto at lcs.mit.edu>




More information about the click mailing list