(root)/
strace-6.5/
tests/
symlinkat.c
       1  /*
       2   * Check decoding of symlinkat syscall.
       3   *
       4   * Copyright (c) 2016-2021 The strace developers.
       5   * All rights reserved.
       6   *
       7   * SPDX-License-Identifier: GPL-2.0-or-later
       8   */
       9  
      10  #include "tests.h"
      11  #include "scno.h"
      12  
      13  #include <stdio.h>
      14  #include <unistd.h>
      15  
      16  int
      17  main(void)
      18  {
      19  	const long int fd = (long int) 0xdeadbeefffffffffULL;
      20  	static const char oldpath[] = "symlink_old";
      21  	static const char newpath[] = "symlink_new";
      22  
      23  	long rc = syscall(__NR_symlinkat, oldpath, fd, newpath);
      24  	printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n",
      25  	       oldpath, (int) fd, newpath, rc, errno2name());
      26  
      27  	puts("+++ exited with 0 +++");
      28  	return 0;
      29  }