예제 #1
0
def do_fadvise64(fd, offset, length):
    global _posix_fadvise
    if _posix_fadvise is None:
        _posix_fadvise = load_libc_function('posix_fadvise64')
    # 4 means "POSIX_FADV_DONTNEED"
    _posix_fadvise(fd, ctypes.c_uint64(offset),
                   ctypes.c_uint64(length), 4)
예제 #2
0
def do_fadvise64(fd, offset, length):
    global _posix_fadvise
    if _posix_fadvise is None:
        _posix_fadvise = load_libc_function('posix_fadvise64')
    # 4 means "POSIX_FADV_DONTNEED"
    _posix_fadvise(fd, ctypes.c_uint64(offset),
                   ctypes.c_uint64(length), 4)
예제 #3
0
 def test_load_libc_function(self):
     self.assert_(callable(
         utils.load_libc_function('printf')))
     self.assert_(callable(
         utils.load_libc_function('some_not_real_function')))
예제 #4
0
 def test_load_libc_function(self):
     self.assert_(callable(
         utils.load_libc_function('printf')))
     self.assert_(callable(
         utils.load_libc_function('some_not_real_function')))
예제 #5
0
 def test_load_libc_function(self):
     self.assert_(callable(utils.load_libc_function("printf")))
     self.assert_(callable(utils.load_libc_function("some_not_real_function")))