summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-06-04 19:07:05 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-06-04 19:07:05 +0000
commitefa8d08e000b6269759ee267b6e4ab2b9a736ba6 (patch)
treef3311ce65a477ef8e5de941bc5cf6b77219e0073 /bin
parent8b8fc885e8f49d6c8e09aa10d4509c031d7d8d78 (diff)
__FUNCTION__ -> __func__ from espie@
Diffstat (limited to 'bin')
-rw-r--r--bin/systrace/filter.c14
-rw-r--r--bin/systrace/intercept.c14
-rw-r--r--bin/systrace/openbsd-syscalls.c12
-rw-r--r--bin/systrace/policy.c8
-rw-r--r--bin/systrace/systrace.c10
5 files changed, 29 insertions, 29 deletions
diff --git a/bin/systrace/filter.c b/bin/systrace/filter.c
index ea317f8a441..e27a8b1968c 100644
--- a/bin/systrace/filter.c
+++ b/bin/systrace/filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filter.c,v 1.1 2002/06/04 17:20:04 provos Exp $ */
+/* $OpenBSD: filter.c,v 1.2 2002/06/04 19:07:04 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -155,9 +155,9 @@ filter_policyrecord(struct policy *policy, struct filter *filter,
if (filter == NULL) {
filter = calloc(1, sizeof(struct filter));
if (filter == NULL)
- err(1, "%s:%d: calloc", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: calloc", __func__, __LINE__);
if ((filter->rule = strdup(rule)) == NULL)
- err(1, "%s:%d: strdup", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: strdup", __func__, __LINE__);
}
strlcpy(filter->name, name, sizeof(filter->name));
@@ -178,7 +178,7 @@ filter_parse(char *line, struct filter **pfilter)
return (-1);
if ((rule = strdup(line)) == NULL)
- err(1, "%s:%d: strdup", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: strdup", __func__, __LINE__);
(*pfilter)->rule = rule;
@@ -259,7 +259,7 @@ filter_prepolicy(int fd, struct policy *policy)
res = filter_parse(filter->rule, &parsed);
if (res == -1)
errx(1, "%s:%d: can not parse \"%s\"",
- __FUNCTION__, __LINE__, filter->rule);
+ __func__, __LINE__, filter->rule);
if (future == ICPOLICY_ASK) {
fls = systrace_policyflq(policy, policy->emulation,
@@ -270,7 +270,7 @@ filter_prepolicy(int fd, struct policy *policy)
filter->name, future);
if (res == -1)
errx(1, "%s:%d: modify policy for \"%s\"",
- __FUNCTION__, __LINE__, filter->rule);
+ __func__, __LINE__, filter->rule);
}
filter_policyrecord(policy, parsed, policy->emulation,
filter->name, filter->rule);
@@ -299,7 +299,7 @@ filter_ask(struct intercept_tlq *tls, struct filterq *fls,
*pflags = 0;
if ((policy = systrace_findpolnr(policynr)) == NULL)
- errx(1, "%s:%d: no policy %d\n", __FUNCTION__, __LINE__,
+ errx(1, "%s:%d: no policy %d\n", __func__, __LINE__,
policynr);
printf("%s\n", output);
diff --git a/bin/systrace/intercept.c b/bin/systrace/intercept.c
index 75a29f573f1..9679e0029c6 100644
--- a/bin/systrace/intercept.c
+++ b/bin/systrace/intercept.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intercept.c,v 1.1 2002/06/04 17:20:04 provos Exp $ */
+/* $OpenBSD: intercept.c,v 1.2 2002/06/04 19:07:04 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -170,13 +170,13 @@ intercept_register_sccb(char *emulation, char *name,
return (-1);
if (intercept.getsyscallnumber(emulation, name) == -1) {
- warnx("%s: %d: unknown syscall: %s-%s", __FUNCTION__, __LINE__,
+ warnx("%s: %d: unknown syscall: %s-%s", __func__, __LINE__,
emulation, name);
return (-1);
}
if ((tmp = calloc(1, sizeof(struct intercept_syscall))) == NULL) {
- warn("%s:%d: malloc", __FUNCTION__, __LINE__);
+ warn("%s:%d: malloc", __func__, __LINE__);
return (-1);
}
@@ -273,7 +273,7 @@ intercept_getpid(pid_t pid)
return (tmp);
if ((tmp = malloc(sizeof(struct intercept_pid))) == NULL)
- err(1, "%s: malloc", __FUNCTION__);
+ err(1, "%s: malloc", __func__);
memset(tmp, 0, sizeof(struct intercept_pid));
tmp->pid = pid;
@@ -366,11 +366,11 @@ intercept_filename(int fd, pid_t pid, void *addr)
name = intercept_get_string(fd, pid, addr);
if (name == NULL)
- err(1, "%s:%d: getstring", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: getstring", __func__, __LINE__);
if (name[0] != '/') {
if (intercept.getcwd(fd, pid, cwd, sizeof(cwd)) == NULL)
- err(1, "%s:%d: getcwd", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: getcwd", __func__, __LINE__);
strlcat(cwd, "/", sizeof(cwd));
strlcat(cwd, name, sizeof(cwd));
@@ -410,7 +410,7 @@ intercept_syscall(int fd, pid_t pid, int policynr, char *name, int code,
intercept.getarg(0, args, argsize, &addr);
icpid->newname = strdup(intercept_filename(fd, pid, addr));
if (icpid->newname == NULL)
- err(1, "%s:%d: strdup", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: strdup", __func__, __LINE__);
/* We need to know the result from this system call */
flags = ICFLAGS_RESULT;
diff --git a/bin/systrace/openbsd-syscalls.c b/bin/systrace/openbsd-syscalls.c
index d6bab1b8596..eaced2b50f4 100644
--- a/bin/systrace/openbsd-syscalls.c
+++ b/bin/systrace/openbsd-syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openbsd-syscalls.c,v 1.1 2002/06/04 17:20:04 provos Exp $ */
+/* $OpenBSD: openbsd-syscalls.c,v 1.2 2002/06/04 19:07:04 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -180,7 +180,7 @@ obsd_getpid(pid_t pid)
return (icpid);
if ((icpid->data = malloc(sizeof(struct obsd_data))) == NULL)
- err(1, "%s:%d: malloc", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: malloc", __func__, __LINE__);
data = icpid->data;
data->current = &emulations[0];
@@ -205,7 +205,7 @@ obsd_clonepid(struct intercept_pid *opid, struct intercept_pid *npid)
}
if ((npid->data = malloc(sizeof(struct obsd_data))) == NULL)
- err(1, "%s:%d: malloc", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: malloc", __func__, __LINE__);
memcpy(npid->data, opid->data, sizeof(struct obsd_data));
}
@@ -402,7 +402,7 @@ obsd_getcwd(int fd, pid_t pid, char *buf, size_t size)
path = getcwd(buf, size);
if (ioctl(fd, STRIOCRESCWD, 0) == -1)
- warn("%s: ioctl", __FUNCTION__); /* XXX */
+ warn("%s: ioctl", __func__); /* XXX */
return (path);
}
@@ -476,10 +476,10 @@ obsd_read(int fd)
if (obsd_set_emulation(msg.msg_pid, name) == -1)
errx(1, "%s:%d: set_emulation(%s)",
- __FUNCTION__, __LINE__, name);
+ __func__, __LINE__, name);
if (obsd_answer(fd, msg.msg_pid, 0, 0, 0) == -1)
- err(1, "%s:%d: answer", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: answer", __func__, __LINE__);
break;
case SYSTR_MSG_CHILD:
diff --git a/bin/systrace/policy.c b/bin/systrace/policy.c
index 080a539ba4b..a7140352992 100644
--- a/bin/systrace/policy.c
+++ b/bin/systrace/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.1 2002/06/04 17:20:04 provos Exp $ */
+/* $OpenBSD: policy.c,v 1.2 2002/06/04 19:07:04 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -177,7 +177,7 @@ systrace_newpolicy(char *emulation, char *name)
/* New policies requires intialization */
if ((tmp->name = strdup(name)) == NULL)
- err(1, "%s:%d: strdup", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: strdup", __func__, __LINE__);
strlcpy(tmp->emulation, emulation, sizeof(tmp->emulation));
SPLAY_INSERT(policytree, &policyroot, tmp);
@@ -201,7 +201,7 @@ systrace_policyflq(struct policy *policy, char *emulation, char *name)
return (&tmp->flq);
if ((tmp = calloc(1, sizeof(struct policy_syscall))) == NULL)
- err(1, "%s:%d: out of memory", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: out of memory", __func__, __LINE__);
strlcpy(tmp->emulation, emulation, sizeof(tmp->emulation));
strlcpy(tmp->name, name, sizeof(tmp->name));
@@ -353,7 +353,7 @@ systrace_readpolicy(char *filename)
filter = calloc(1, sizeof(struct filter));
if (filter == NULL)
- err(1, "%s:%d: calloc", __FUNCTION__, __LINE__);
+ err(1, "%s:%d: calloc", __func__, __LINE__);
filter->rule = strdup(rule);
strlcpy(filter->name, name, sizeof(filter->name));
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index e6f929440e6..81ca62d4ab8 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.1 2002/06/04 17:20:04 provos Exp $ */
+/* $OpenBSD: systrace.c,v 1.2 2002/06/04 19:07:04 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -69,11 +69,11 @@ trans_cb(int fd, pid_t pid, int policynr,
goto out;
if ((policy = systrace_findpolnr(policynr)) == NULL)
- errx(1, "%s:%d: find %d\n", __FUNCTION__, __LINE__,
+ errx(1, "%s:%d: find %d\n", __func__, __LINE__,
policynr);
if ((pflq = systrace_policyflq(policy, emulation, name)) == NULL)
- errx(1, "%s:%d: no filter queue\n", __FUNCTION__, __LINE__);
+ errx(1, "%s:%d: no filter queue\n", __func__, __LINE__);
ipid = intercept_getpid(pid);
ipid->uflags = 0;
@@ -133,7 +133,7 @@ gen_cb(int fd, pid_t pid, int policynr, char *name, int code,
goto out;
if ((policy = systrace_findpolnr(policynr)) == NULL)
- errx(1, "%s:%d: find %d\n", __FUNCTION__, __LINE__,
+ errx(1, "%s:%d: find %d\n", __func__, __LINE__,
policynr);
if (policy->flags & POLICY_UNSUPERVISED) {
@@ -233,7 +233,7 @@ child_handler(int sig)
}
#define X(x) if ((x) == -1) \
- err(1, "%s:%d: intercept failed", __FUNCTION__, __LINE__)
+ err(1, "%s:%d: intercept failed", __func__, __LINE__)
void
systrace_initcb(void)