Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867Ab2FRPce (ORCPT ); Mon, 18 Jun 2012 11:32:34 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:35283 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627Ab2FRPcc convert rfc822-to-8bit (ORCPT ); Mon, 18 Jun 2012 11:32:32 -0400 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Alan Stern" Cc: "Felipe Balbi" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] usb: gadget: mass_storage: require backing file for non-removable LUNs References: Date: Mon, 18 Jun 2012 17:32:21 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT From: "Michal Nazarewicz" Organization: Google Message-ID: In-Reply-To: User-Agent: Opera Mail/12.00 (Linux) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1225 Lines: 28 On Mon, 18 Jun 2012 16:18:41 +0200, Alan Stern wrote: > On Mon, 18 Jun 2012, Michal Nazarewicz wrote: > >> From: Michal Nazarewicz >> >> The fsg_file_store() function does not check whether a LUN is removable or not >> allowing one to specify an empty file name for a non-removable LUN. This >> commit adds explicit check of whether a file name is provided for >> non-removable LUNs. > > Looks okay. Note that in file_storage.c, the "file" attribute isn't > writable if the LUN isn't removable, and the "ro" attribute isn't > writable if the LUN is a cdrom. Maybe you would prefer to do things > that way instead. Makes sense, I'll rewrite this patch to do that. -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michał “mina86” Nazarewicz (o o) ooo +------------------ooO--(_)--Ooo-- -- 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/