Dmitry V. Levin
92e347b556
We do our best to keep copyright headers up to date, yet git history provides better information on this subject and is more accurate than copyright headers.
35 lines
588 B
C
35 lines
588 B
C
/*
|
|
* Copyright (c) 2016-2018 The strace developers.
|
|
* All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include "tests.h"
|
|
#include <asm/unistd.h>
|
|
|
|
#ifdef __NR_syslog
|
|
|
|
# include <stdio.h>
|
|
# include <unistd.h>
|
|
|
|
# define SYSLOG_ACTION_READ 2
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
const long addr = (long) 0xfacefeeddeadbeefULL;
|
|
int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1);
|
|
printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n",
|
|
addr, rc, errno2name());
|
|
|
|
puts("+++ exited with 0 +++");
|
|
return 0;
|
|
}
|
|
|
|
#else
|
|
|
|
SKIP_MAIN_UNDEFINED("__NR_syslog")
|
|
|
|
#endif
|