def fallocate(fd, size):
 global _sys_fallocate
 if (_sys_fallocate is None):
  _sys_fallocate = FallocateWrapper()
 if (size < 0):
  size = 0
 ret = _sys_fallocate(fd, 1, 0, ctypes.c_uint64(size))
 err = ctypes.get_errno()
 if (ret and (err not in (0, errno.ENOSYS, errno.EOPNOTSUPP, errno.EINVAL))):
  raise OSError(err, ('Unable to fallocate(%s)' % size))

def fallocate ( fd , size ) : global _sys_fallocate if ( _sys_fallocate is None ) : _sys_fallocate = FallocateWrapper ( ) if ( size < 0 ) : size = 0 ret = _sys_fallocate ( fd , 1 , 0 , ctypes . c_uint64 ( size ) ) err = ctypes . get_errno ( ) if ( ret and ( err not in ( 0 , errno . ENOSYS , errno . EOPNOTSUPP , errno . EINVAL ) ) ) : raise OSError ( err , ( 'Unable to fallocate(%s)' % size ) )
pre-allocate disk space for a file .