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.

swapon.c 539B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2014-2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. #include <sys/swap.h>
  9. #include "xlat/swap_flags.h"
  10. SYS_FUNC(swapon)
  11. {
  12. unsigned int flags = tcp->u_arg[1];
  13. unsigned int prio = flags & SWAP_FLAG_PRIO_MASK;
  14. flags &= ~SWAP_FLAG_PRIO_MASK;
  15. printpath(tcp, tcp->u_arg[0]);
  16. tprints(", ");
  17. if (flags) {
  18. printflags(swap_flags, flags, "SWAP_FLAG_???");
  19. tprintf("|%u", prio);
  20. } else {
  21. tprintf("%u", prio);
  22. }
  23. return RVAL_DECODED;
  24. }