lkml.org 
[lkml]   [2011]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] usb: gadget: f_mass_storage: If 'ro'/'cdrom' specified, open file as read-only
Date
From
On Tue, 05 Apr 2011 17:36:39 +0200, Roger Quadros  
<roger.quadros@nokia.com> wrote:
> If we don't need Write access then attempt to open backing file in Read
> Only mode instead of bailing out too soon.
>
> Signed-off-by: Roger Quadros <roger.quadros@nokia.com>

Acked-by: Michal Nazarewicz <mina86@mina86.com>

> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -2810,6 +2810,7 @@ static struct fsg_common *fsg_common_init(struct
> fsg_common *common,
> for (i = 0, lcfg = cfg->luns; i < nluns; ++i, ++curlun, ++lcfg) {
> curlun->cdrom = !!lcfg->cdrom;
> curlun->ro = lcfg->cdrom || lcfg->ro;
> + curlun->initially_ro = curlun->ro;
> curlun->removable = lcfg->removable;
> curlun->dev.release = fsg_lun_release;
> curlun->dev.parent = &gadget->dev;

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +-----<email/xmpp: mnazarewicz@google.com>-----ooO--(_)--Ooo--


\
 
 \ /
  Last update: 2011-04-05 18:07    [W:1.287 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site