diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-03-21 23:23:16 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-03-21 23:23:16 +0000 |
commit | 7f2f81f738813c6ab75db898f63e91023c834f19 (patch) | |
tree | 1fe3d02fea79a9ba9f11365a66cd3b8f433a6ff0 /regress/usr.sbin/syslogd/funcs.pl | |
parent | a81086228df307910c2ce8786eaecbf2ff6473b7 (diff) |
System call sendsyslog2 is gone, adapt tests.
Diffstat (limited to 'regress/usr.sbin/syslogd/funcs.pl')
-rw-r--r-- | regress/usr.sbin/syslogd/funcs.pl | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/regress/usr.sbin/syslogd/funcs.pl b/regress/usr.sbin/syslogd/funcs.pl index 54f137c350b..025de56803c 100644 --- a/regress/usr.sbin/syslogd/funcs.pl +++ b/regress/usr.sbin/syslogd/funcs.pl @@ -1,4 +1,4 @@ -# $OpenBSD: funcs.pl,v 1.29 2015/12/30 13:15:52 bluhm Exp $ +# $OpenBSD: funcs.pl,v 1.30 2016/03/21 23:23:15 bluhm Exp $ # Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org> # @@ -86,14 +86,9 @@ sub write_message { if (defined($self->{connectdomain})) { my $msg = join("", @_); if ($self->{connectdomain} eq "sendsyslog") { - if (($self->{connect}{version} || 0) == 2) { - my $flags = $self->{connect}{flags} || 0; - sendsyslog2($msg, $flags) or die ref($self), - " sendsyslog2 failed: $!"; - } else { - sendsyslog($msg) or die ref($self), - " sendsyslog failed: $!"; - } + my $flags = $self->{connect}{flags} || 0; + sendsyslog($msg, $flags) or die ref($self), + " sendsyslog failed: $!"; } elsif ($self->{connectproto} eq "udp") { # writing UDP packets works only with syswrite() defined(my $n = syswrite(STDOUT, $msg)) @@ -112,15 +107,9 @@ sub write_message { sub sendsyslog { my $msg = shift; - require 'sys/syscall.ph'; - return syscall(&SYS_sendsyslog, $msg, length($msg)) != -1; -} - -sub sendsyslog2 { - my $msg = shift; my $flags = shift; require 'sys/syscall.ph'; - return syscall(&SYS_sendsyslog2, $msg, length($msg), $flags) != -1; + return syscall(&SYS_sendsyslog, $msg, length($msg), $flags) != -1; } sub write_shutdown { |