(root)/
strace-6.5/
tests-m32/
flock.c
       1  /*
       2   * Check decoding of flock 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 <sys/file.h>
      15  #include <unistd.h>
      16  
      17  int
      18  main(void)
      19  {
      20  	const unsigned long fd = (long int) 0xdeadbeefffffffffULL;
      21  
      22  	long rc = syscall(__NR_flock, fd, LOCK_SH);
      23  	printf("flock(%d, LOCK_SH) = %ld %s (%m)\n",
      24  	       (int) fd, rc, errno2name());
      25  
      26  	puts("+++ exited with 0 +++");
      27  	return 0;
      28  }