Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getrandom.c 490B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2015-2018 Dmitry V. Levin <ldv@altlinux.org>
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. #include "xlat/getrandom_flags.h"
  9. SYS_FUNC(getrandom)
  10. {
  11. if (exiting(tcp)) {
  12. if (syserror(tcp))
  13. printaddr(tcp->u_arg[0]);
  14. else
  15. printstr_ex(tcp, tcp->u_arg[0], tcp->u_rval,
  16. QUOTE_FORCE_HEX);
  17. tprintf(", %" PRI_klu ", ", tcp->u_arg[1]);
  18. printflags(getrandom_flags, tcp->u_arg[2], "GRND_???");
  19. }
  20. return 0;
  21. }