On Tue, 20 May 2014 01:04:30 +0800
Anand Jain <anand.j...@oracle.com> wrote:

> From: Anand Jain <anand.j...@oracle.com>
> 
> generally if you use
>   echo "test" > /sys/fs/btrfs/<fsid>/label
> it would introduce return char at the end and it can not
> be part of the label. The correct command is
>   echo -n "test" > /sys/fs/btrfs/<fsid>/label
> 
> This patch will check for this user error

Maybe instead consider checking for one trailing "\n", and silently remove it
if passed, so that both of the mentioned variants of 'echo' can be used?

All other sysfs files do not care if you pass an extra "\n" at the end, e.g.

  echo cfq > /sys/block/sda/queue/scheduler  

works fine, doesn't require you to use "echo -n cfq".

-- 
With respect,
Roman

Attachment: signature.asc
Description: PGP signature

Reply via email to