[Imprint][Data Privacy Statement][E-Mail]

View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Theorem write

vfs_write#(FD, BUF, USER; N, ERR, OF, DIRS, FILES, ASYNCED) {if N ≤ # BUF then {ERR := ESUCCESS; if ¬ FD ∈ OF then ERR := EBADFD else if OF[FD].mode ≠ MODE_W ∧ OF[FD].mode ≠ MODE_RW then ERR := EBADFD else if N ≠ 0 then choose INODE, MODIFIED with true in {afs_iget#(OF[FD].ino, DIRS, FILES, ASYNCED; INODE, ERR); if ERR = ESUCCESS then if INODE.directory then ERR := EISDIR else let START = OF[FD].pos, END = OF[FD].pos + N, TOTAL = 0, PAGENO = 0, PBUF-OPT = none in {if ERR = ESUCCESS then PAGENO := INODE.size / VFS_PAGE_SIZE; if ERR = ESUCCESS then afs_truncate#(INODE.size, PAGENO; PBUF-OPT, INODE, MODIFIED, ERR, DIRS, FILES, ASYNCED); if ERR = ESUCCESS then vfs_write_loop#(START, INODE, END, BUF, DIRS; TOTAL, ERR, FILES, ASYNCED); if TOTAL ≠ 0 then ERR := ESUCCESS; if ERR = ESUCCESS then let SIZE = INODE.size in {N := TOTAL, END := START + TOTAL; if TOTAL ≠ 0 ∧ SIZE < END then {INODE.size := END; afs_check_commit#(DIRS, FILES; ERR; ASYNCED); if ERR = ESUCCESS then afs_write_inode#(INODE; ERR, DIRS, FILES; ASYNCED)}; if ERR ≠ ESUCCESS then N := (START ≤ SIZE ⊃ SIZE - START;0), ERR := ESUCCESS; OF[FD].pos := START + N}}}} else abort }