| err0 = err, n0 = n, root.dir?, fids-cons(root, fs, ofh), n ≤ # buf ⊦ ⟪choose err with pre-write(fd, buf, n0, err, user, root, fs, ofh) in err0 := err; if err0 = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n with n ≤ n0 in {n0 := n; f.content := splice(buf, 0, f.content, fh.pos, n0); fs[fh.fid] := f; ofh[fd].pos := fh.pos + n0} else n0 := ?; psynced := ?⟫ fids-cons(root, fs, ofh) |
err0 = err1, n0 = n, root.dir?, fids-cons(root, fs, ofh), pre-write(fd, buf, n0, err, user, root, fs, ofh), n ≤ # buf ⊦ ⟪err0 := err; if err0 = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n with n ≤ n0 in {n0 := n; f.content := splice(buf, 0, f.content, fh.pos, n0); fs[fh.fid] := f; ofh[fd].pos := fh.pos + n0} else n0 := ?; psynced := ?⟫ fids-cons(root, fs, ofh)
err0 = err, n0 = n, root.dir?, fids-cons(root, fs, ofh), n ≤ # buf ⊦ ∃ err. pre-write(fd, buf, n0, err, user, root, fs, ofh)