def sys_fsync(self, fd):
ret = <NUM_LIT:0><EOL>try:<EOL><INDENT>self.files[fd].sync()<EOL><DEDENT>except IndexError:<EOL><INDENT>ret = -errno.EBADF<EOL><DEDENT>except FdError:<EOL><INDENT>ret = -errno.EINVAL<EOL><DEDENT>return ret<EOL>
Synchronize a file's in-core state with that on disk.