Search Linux Wireless

Re: How does rfkill work?

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

 



On Thu, 2009-04-02 at 20:48 +0200, Johannes Berg wrote:
> On Thu, 2009-04-02 at 13:42 -0500, Larry Finger wrote:
> > Johannes Berg wrote:
> > > 
> > > Also, if increasing that helps, does it also work then? I mean, does the
> > > LED get turned on/off?
> > 
> > No. I'm still not getting the appropriate call to the set brightness callback.
> > Actually, I didn't expect any change as the truncation from the too-short array
> > length only occurs when the pseudo file is dumped.
> 
> Hmm. In my tree TRIG_NAME_MAX is only used when you try to /write/
> something to the trigger sysfs file, so that garbling and the patch
> don't make much sense to me. There must be some other weirdness going
> on.

Could you try something for me?

In drivers/leds/led-triggers.c in led_trigger_show you have

        list_for_each_entry(trig, &trigger_list, next_trig) {
+		printk(KERN_DEBUG "available trigger: %s\n", trig->name);
                if (led_cdev->trigger && !strcmp(led_cdev->trigger->name,
                                                        trig->name))
                        len += sprintf(buf+len, "[%s] ", trig->name);
                else
                        len += sprintf(buf+len, "%s ", trig->name);
        }

could you do the modification, with a kernel that has the TRIG_NAME_MAX
set to 50, and see what it prints? I'm completely confused by this
failure mode since the garbage you get is actually put into brackets, so
it seems the strcmp() is returning 0 which seems odd.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux