Re: [PATCH v2 cosmetic] Remove trailing newline in elevator switch error message

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

 



On 2017.05.05 at 20:05 +0000, Bart Van Assche wrote:
> On Mon, 2017-05-01 at 18:29 +0200, markus@xxxxxxxxxxxxxxx wrote:
> > +	strlcpy(elevator_name, name, sizeof(elevator_name));
> > +	strstrip(elevator_name);
> > +	ret = __elevator_change(q, elevator_name);
> 
> 
> Are you aware that the current implementation of __elevator_change() strips
> leading whitespace but that with your patch applied leading whitespace is no
> longer removed from the elevator name? If you have a look at strim() in
> lib/string.c you will see that in case of leading whitespace that function
> does not remove the leading whitespace but returns a pointer to the first
> non-whitespace character.

Well, only in the call to elevator_get(). The dmesg output does contain
leading whitespace. But the fix is simple. I will send a new patch.

-- 
Markus



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux