c99 initializer

This commit is contained in:
christos 2006-10-16 00:43:00 +00:00
parent 18243309bd
commit 5b08cf393d
2 changed files with 64 additions and 44 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: intercept-translate.c,v 1.9 2006/04/16 05:19:02 provos Exp $ */
/* $NetBSD: intercept-translate.c,v 1.10 2006/10/16 00:43:00 christos Exp $ */
/* $OpenBSD: intercept-translate.c,v 1.9 2002/08/01 20:16:45 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
@ -30,7 +30,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: intercept-translate.c,v 1.9 2006/04/16 05:19:02 provos Exp $");
__RCSID("$NetBSD: intercept-translate.c,v 1.10 2006/10/16 00:43:00 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -341,32 +341,38 @@ ic_print_msghdr(char *buf, size_t buflen, struct intercept_translate *tl)
}
struct intercept_translate ic_translate_string = {
"string",
ic_get_string, ic_print_filename,
.name = "string",
.translate = ic_get_string,
.print = ic_print_filename,
};
struct intercept_translate ic_translate_filename = {
"filename",
ic_get_filename, ic_print_filename,
.name = "filename",
.translate = ic_get_filename,
.print = ic_print_filename,
};
struct intercept_translate ic_translate_linkname = {
"filename",
ic_get_linkname, ic_print_filename,
.name = "filename",
.translate = ic_get_linkname,
.print = ic_print_filename,
};
struct intercept_translate ic_translate_unlinkname = {
"filename",
ic_get_unlinkname, ic_print_filename,
.name = "filename",
.translate = ic_get_unlinkname,
.print = ic_print_filename,
};
struct intercept_translate ic_translate_connect = {
"sockaddr",
ic_get_sockaddr, ic_print_sockaddr,
/* XXX - Special handling */ 1,
.name = "sockaddr",
.translate = ic_get_sockaddr,
.print = ic_print_sockaddr,
.off2 = /* XXX - Special handling */ 1,
};
struct intercept_translate ic_translate_sendmsg = {
"sockaddr",
ic_get_msghdr, ic_print_msghdr,
.name = "sockaddr",
.translate = ic_get_msghdr,
.print = ic_print_msghdr,
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: systrace-translate.c,v 1.16 2005/06/25 18:47:42 elad Exp $ */
/* $NetBSD: systrace-translate.c,v 1.17 2006/10/16 00:43:00 christos Exp $ */
/* $OpenBSD: systrace-translate.c,v 1.10 2002/08/01 20:50:17 provos Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
@ -532,73 +532,87 @@ print_argv(char *buf, size_t buflen, struct intercept_translate *tl)
}
struct intercept_translate ic_trargv = {
"argv",
get_argv, print_argv,
.name = "argv",
.translate = get_argv,
.print = print_argv,
};
struct intercept_translate ic_oflags = {
"oflags",
NULL, print_oflags,
.name = "oflags",
.translate = NULL,
.print = print_oflags,
};
#ifdef HAVE_LINUX_FCNTL_H
struct intercept_translate ic_linux_oflags = {
"oflags",
NULL, linux_print_oflags,
.name = "oflags",
.translate = NULL,
.print = linux_print_oflags,
};
#endif
struct intercept_translate ic_modeflags = {
"mode",
NULL, print_modeflags,
.name = "mode",
.translate = NULL,
.print = print_modeflags,
};
struct intercept_translate ic_uidt = {
"uid",
NULL, print_number,
.name = "uid",
.translate = NULL,
.print = print_number,
};
struct intercept_translate ic_uname = {
"uname",
NULL, print_uname,
.name = "uname",
.translate = NULL,
.print = print_uname,
};
struct intercept_translate ic_gidt = {
"gid",
NULL, print_number,
.name = "gid",
.translate = NULL,
.print = print_number,
};
struct intercept_translate ic_fdt = {
"fd",
NULL, print_number,
.name = "fd",
.translate = NULL,
.print = print_number,
};
struct intercept_translate ic_sockdom = {
"sockdom",
NULL, print_sockdom,
.name = "sockdom",
.translate = NULL,
.print = print_sockdom,
};
struct intercept_translate ic_socktype = {
"socktype",
NULL, print_socktype,
.name = "socktype",
.translate = NULL,
.print = print_socktype,
};
struct intercept_translate ic_pidname = {
"pidname",
NULL, print_pidname,
.name = "pidname",
.translate = NULL,
.print = print_pidname,
};
struct intercept_translate ic_signame = {
"signame",
NULL, print_signame,
.name = "signame",
.translate = NULL,
.print = print_signame,
};
struct intercept_translate ic_fcntlcmd = {
"cmd",
NULL, print_fcntlcmd,
.name = "cmd",
.translate = NULL,
.print = print_fcntlcmd,
};
struct intercept_translate ic_memprot = {
"prot",
NULL, print_memprot,
.name = "prot",
.translate = NULL,
.print = print_memprot,
};