[HN Gopher] FatFs - Generic FAT Filesystem Module
___________________________________________________________________
 
FatFs - Generic FAT Filesystem Module
 
Author : gjvc
Score  : 42 points
Date   : 2023-01-01 19:48 UTC (3 hours ago)
 
web link (elm-chan.org)
w3m dump (elm-chan.org)
 
| EdSharkey wrote:
| I am in the process of compiling this with emscripten to
| javascript+wasm. The integration between your block storage
| implementation and FatFs is straightforward other than ioctl,
| which is mysterious to me and will take me a long time to figure
| out what all my responibilities are.
| 
| This is my first time playing with emscripten and sharing buffers
| between wasm and javascript is awkward.
 
  | snvzz wrote:
  | ioctl really is a ugly unixism that's totally out of place
  | there.
  | 
  | It could have been replaced by 3 or 4 calls with a clear single
  | purpose, and I'd hope they'll realize this and fix the API in a
  | future version.
 
  | loeg wrote:
  | http://elm-chan.org/fsw/ff/doc/dioctl.html describes the
  | expected ioctls to implement and their behavior. The mandatory
  | ioctls seem pretty straightforward. CTRL_SYNC will be a nop on
  | a browser-based storage, GET_BLOCK_SIZE should return 1
  | (unknown), and CTRL_TRIM looks like it could be nop (or you
  | could zero the range to more closely match real devices).
 
  | tremon wrote:
  | Sorry, but I can't help wonder: why?
  | 
  | What's the value of having direct device access in Javascript?
  | Are we expected to give the browser raw block device access
  | now? Maybe we could implement a FAT layer on top of S3, but I
  | really don't see the value in reimplementing block-level
  | storage on top of object storage.
 
    | kaoD wrote:
    | Might be useful for non-browser VMs? E.g. a microcontroller
    | running WASM.
 
      | marcosdumay wrote:
      | Even tough yes, that's a good answer to the GP... Are
      | people expecting WASM machines to be a thing? And with a
      | different fate from the Java machines? (I don't see how
      | they are different enough to change that fate.)
 
    | kzsdvkajsf wrote:
    | so you can snoop on users pendrives if they make the mistake
    | of allowing USB access from their google-chomeTM browser to
    | your domain. ;)
 
      | beatrobot wrote:
      | I don't think Chrome allows access to storage devices
      | through webusb.
 
___________________________________________________________________
(page generated 2023-01-01 23:00 UTC)