lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] usb: gadget: f_mass_storage: forced_eject attribute
В Thu, 7 Jul 2022 10:57:42 -0400
Alan Stern <stern@rowland.harvard.edu> wrote:

> On Wed, Jul 06, 2022 at 09:59:37PM +0300, Maxim Devaev wrote:
> > It allows to reset prevent_medium_removal flag and "eject" the image.
> >
> > The patch is a completely alternative implementation of the previously
> > proposed [1], the idea of which was born after the mentioned discussion.
>
> Generally quite good, but the documentation needs some improvement.

Thanks for your help, I've fixed it and submitted v3 patch.

> By the way, what does happen if someone writes to this attribute file
> before the function is active? Have you tested this?

Yes. This simply detaches the backing file, as if you had written an empty
string to the "file" attribute. This is literally the same code, just
resetting a flag that, with an inactive configuration, cannot even be set.

> Doesn't a zero-byte write also work?

No, the same as with the rest of the configfs attributes.

\
 
 \ /
  Last update: 2022-07-07 19:11    [W:0.061 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site