Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbaLFNzi (ORCPT ); Sat, 6 Dec 2014 08:55:38 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:56172 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751443AbaLFNzg (ORCPT ); Sat, 6 Dec 2014 08:55:36 -0500 Date: Sat, 6 Dec 2014 14:55:33 +0100 From: Pavel Machek To: Grant Likely Cc: atull , Pantelis Antoniou , Greg Kroah-Hartman , Jason Gunthorpe , "H. Peter Anvin" , Michal Simek , Michal Simek , Randy Dunlap , linux-kernel , "devicetree@vger.kernel.org" , Rob Herring , Ira Snyder , "linux-doc@vger.kernel.org" , Mark Brown , philip@balister.org, rubini , Steffen Trumtrar , Jason , kyle.teske@ni.com, Nicolas Pitre , Felipe Balbi , Mauro Carvalho Chehab , David Brown , Rob Landley , David Miller , cesarb@cesarb.net, "sameo@linux.intel.com" , Andrew Morton , Linus Walleij , Alan Tull , dinguyen@opensource.altera.com, Yves Vandervennet Subject: Re: [PATCH v2 2/3] fpga manager: framework core Message-ID: <20141206135533.GA19672@amd> References: <1414007405-32186-1-git-send-email-atull@opensource.altera.com> <1414007405-32186-3-git-send-email-atull@opensource.altera.com> <20141024105200.GA20775@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > > I am accustomed to doing 'echo -n' for most of sysfs anyway. Once in a > > while I am a bonehead and forget the '-n' and spend a few minutes > > wondering why this thing that worked last week suddenly rejects all > > commands. I'm just trying to make my user interface a bit user-friendly. > > > > I will take out the '\n' stripping and update the documentation. I didn't > > realize this would be controversial. > > Don't. You're doing the right thing by scrubbing your input. Requiring > 'echo -n' is just stupid when it is so easy to make work easily. 'foo\nbar\n' is unusual but valid filename in linux. It is bad idea to echo filenames into files in the first place... and arbitrarily disallowing certain filenames is not helping. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/