| err = ESUCCESS, err1 = err0, n = n0, ofh = abs-of(of), root.dir?, dom of < ino, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), psynced → asynced ⊦ ⟪if ¬ fd ∈ of then err := EBADFD else {if whence = SEEK_CUR then n := of[fd].pos + n else if whence = SEEK_END then choose inode with true in {afs_iget#(of[fd].ino, dirs, files, asynced; inode, err); if err = ESUCCESS then n := inode.size + n}; if err = ESUCCESS then of[fd].pos := n}⟫ ⟨posix_seek#(fd, whence, user, root, abs-files(files); n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ n = n0 ∧ err = err0) |
err = ESUCCESS, err1 = err0, n = n0, ofh = abs-of(of), root.dir?, dom of < ino, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), psynced → asynced ⊦ ⟪err := EBADFD⟫ ⟨posix_seek#(fd, whence, user, root, abs-files(files); n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ n = n0 ∧ err = err0), fd ∈ of
err = ESUCCESS, err1 = err0, n = n0, ofh = abs-of(of), root.dir?, dom of < ino, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), fd ∈ of, psynced → asynced ⊦ ⟪if whence = SEEK_CUR then n := of[fd].pos + n else if whence = SEEK_END then choose inode with true in {afs_iget#(of[fd].ino, dirs, files, asynced; inode, err); if err = ESUCCESS then n := inode.size + n}; if err = ESUCCESS then of[fd].pos := n⟫ ⟨posix_seek#(fd, whence, user, root, abs-files(files); n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ n = n0 ∧ err = err0)