• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "tests.h"
2 #include <asm/unistd.h>
3 
4 #ifdef __NR_syslog
5 
6 # include <stdio.h>
7 # include <unistd.h>
8 
9 # define SYSLOG_ACTION_READ 2
10 
11 int
main(void)12 main(void)
13 {
14 	const long addr = (long) 0xfacefeeddeadbeefULL;
15 	int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1);
16 	printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n",
17 	       addr, rc, errno2name());
18 
19 	puts("+++ exited with 0 +++");
20 	return 0;
21 }
22 
23 #else
24 
25 SKIP_MAIN_UNDEFINED("__NR_syslog")
26 
27 #endif
28