PRE_MEM_WRITE( "getdents(dirp)", ARG2, ARG3 );
}
+#if !defined(VGO_freebsd) // Darwin as well?
+
/* Check if the given file descriptor points to a /proc/PID/fd or /proc/PID/fdinfo directory.
Returns True if it's a directory we should filter Valgrind FDs from. */
static Bool is_proc_fd_directory(Int fd)
return new_size;
}
+#endif
+
/* Make sure we really need the proc filtering using (32bit) getdents,
which not every linux arch implements. */
#if defined(VGO_linux) && defined(__NR_getdents)
}
#endif /* defined(VGO_linux) && defined(__NR_getdents) */
+#if !defined(VGO_freebsd) // Darwin as well?
+
/* Filter out Valgrind's internal file descriptors from getdents64 results with refill capability.
Same logic as getdents version but for 64-bit dirent structures.
Returns filtered size on success, or -1 if retry syscall failed. */
return new_size;
}
+#endif
+
POST(sys_getdents)
{
vg_assert(SUCCESS);
}
}
+#if !defined(VGO_freebsd)
+
PRE(sys_getdents64)
{
*flags |= SfMayBlock;
}
}
+#endif
+
PRE(sys_getgroups)
{
PRINT("sys_getgroups ( %ld, %#" FMT_REGWORD "x )", SARG1, ARG2);