diff --git a/alpine/packages/9pinit/etc/init.d/9pinit b/alpine/packages/9pinit/etc/init.d/9pinit index 13310bc58..ab59e0c4c 100755 --- a/alpine/packages/9pinit/etc/init.d/9pinit +++ b/alpine/packages/9pinit/etc/init.d/9pinit @@ -18,7 +18,8 @@ start() ;; "fuse") mkdir -p /Transfuse - mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 fuse /Transfuse + mkdir -p /Mac + mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000,msize=32768 fuse /Transfuse ;; "db") mkdir -p /Database diff --git a/alpine/packages/9pudfuse/etc/init.d/9pudfuse b/alpine/packages/9pudfuse/etc/init.d/9pudfuse index ea8abc289..68bb02a54 100755 --- a/alpine/packages/9pudfuse/etc/init.d/9pudfuse +++ b/alpine/packages/9pudfuse/etc/init.d/9pudfuse @@ -20,7 +20,6 @@ start() # --pidfile "${PIDFILE}" \ # -- -path /Transfuse # eend $? "Failed to start 9pudfuse" - mkdir -p /Mac OCAMLRUNPARAM=b /sbin/9pudfuse & } diff --git a/alpine/packages/9pudfuse/fuse_socket_9p.ml b/alpine/packages/9pudfuse/fuse_socket_9p.ml index bfda8a47a..104ce47f3 100644 --- a/alpine/packages/9pudfuse/fuse_socket_9p.ml +++ b/alpine/packages/9pudfuse/fuse_socket_9p.ml @@ -38,11 +38,11 @@ let finally f at_end = let copy description dst src = let sz = 1 lsl 16 in let buf = Bytes.create sz in - let pnum = ref 0 in + (*let pnum = ref 0 in*) let rec loop () = let n = Unix.read src buf 0 sz in (if n = 0 then raise ReadClosed); - +(* let fd = Unix.( openfile ("/tmp/"^description^"_"^(string_of_int !pnum)) [O_WRONLY; O_CREAT] 0o600) in @@ -50,8 +50,15 @@ let copy description dst src = assert (k = n); Unix.close fd; incr pnum; - - let written = Unix.write dst buf 0 n in +*) + let written = try + Unix.write dst buf 0 n + with + | Unix.Unix_error (Unix.EINVAL, "write", _) -> + failwith ("copy write for "^description^" failed with EINVAL") + | Unix.Unix_error (Unix.ENOENT, "write", _) -> + failwith ("copy write for "^description^" failed with ENOENT") + in (if n <> written then Log.error "copy of %s read %d but wrote %d" description n written); loop ()