[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] console: allow log level threshold adjustments from serial console



>>> On 22.09.15 at 15:17, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 22/09/15 13:45, Jan Beulich wrote:
>> +static void do_adj_thresh(unsigned char key)
>> +{
>> +    if ( *upper_thresh_adj < *lower_thresh_adj )
>> +        *upper_thresh_adj = *lower_thresh_adj;
>> +    printk("'%c' pressed -> %s log level: %s (rate limited %s)\n",
>> +           key, thresh_adj, loglvl_str(*lower_thresh_adj),
>> +           loglvl_str(*upper_thresh_adj));
> 
> It might be useful for this printk() to indicate whether it was the 
> standard or the guest log level which was adjusted.

It does, by printing the string thresh_adj currently points to.

>> +static struct keyhandler inc_thresh_keyhandler = {
>> +    .irq_callback = 1,
>> +    .u.irq_fn = do_inc_thresh,
>> +    .desc = "increase log level threshold"
>> +};
>> +static struct keyhandler dec_thresh_keyhandler = {
>> +    .irq_callback = 1,
>> +    .u.irq_fn = do_dec_thresh,
>> +    .desc = "decrease log level threshold"
>> +};
>> +static struct keyhandler toggle_guest_keyhandler = {
>> +    .irq_callback = 1,
>> +    .u.irq_fn = do_toggle_guest,
>> +    .desc = "toggle host/guest log level adjustment"
>> +};
>> +
> 
> I am guessing from the looks of these that I should augment my 
> keyhandler cleanup to also be able to register irq handlers from outside 
> of common/keyhandler.c

Yeah, I was actually surprised you got away without (i.e. that all of
them lived in this one file so far).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.