summaryrefslogtreecommitdiff
path: root/usr/src/cmd/auditreduce
diff options
context:
space:
mode:
authorPalle Lyckegaard <palle@lyckegaard.dk>2008-10-29 22:28:53 -0400
committerPalle Lyckegaard <palle@lyckegaard.dk>2008-10-29 22:28:53 -0400
commit406d62731eff92f06723c04de94992d94a293145 (patch)
tree82964992dfe4bbe8186a3a95491534a28ad50955 /usr/src/cmd/auditreduce
parent3b11abfaf709999edad1b6e40bd7c7a8442664d8 (diff)
downloadillumos-joyent-406d62731eff92f06723c04de94992d94a293145.tar.gz
6442434 Solaris should have AF_LOCAL/PF_LOCAL/AF_FILE/PF_FILE as synonyms for AF_UNIX/PF_UNIX
Contributed by Palle Lyckegaard <palle@lyckegaard.dk>
Diffstat (limited to 'usr/src/cmd/auditreduce')
-rw-r--r--usr/src/cmd/auditreduce/auditrt.h6
-rw-r--r--usr/src/cmd/auditreduce/option.c13
-rw-r--r--usr/src/cmd/auditreduce/proc.c13
3 files changed, 14 insertions, 18 deletions
diff --git a/usr/src/cmd/auditreduce/auditrt.h b/usr/src/cmd/auditreduce/auditrt.h
index df27b8016f..cd1356e7b3 100644
--- a/usr/src/cmd/auditreduce/auditrt.h
+++ b/usr/src/cmd/auditreduce/auditrt.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _AUDITRT_H
#define _AUDITRT_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -111,7 +109,7 @@ typedef struct audit_pcb audit_pcb_t;
*/
#define PF_ROOT 0x01 /* current pcb is the root of process tree */
#define PF_LEAF 0x02 /* current pcb is a leaf of process tree */
-#define PF_FILE 0x04 /* current pcb uses files as input, not pipes */
+#define PF_USEFILE 0x04 /* current pcb uses files as input, not pipes */
/*
* Message selection options
diff --git a/usr/src/cmd/auditreduce/option.c b/usr/src/cmd/auditreduce/option.c
index 28e31a0d29..3dfe91f779 100644
--- a/usr/src/cmd/auditreduce/option.c
+++ b/usr/src/cmd/auditreduce/option.c
@@ -23,7 +23,6 @@
* Use is subject to license terms.
*/
-
/*
* Command line option processing for auditreduce.
* The entry point is process_options(), which is called by main().
@@ -220,8 +219,8 @@ start_over:
}
if (error) {
(void) fprintf(stderr,
- gettext("%s command line error - %s.\n"),
- ar, error_str);
+ gettext("%s command line error - %s.\n"),
+ ar, error_str);
return (-1);
}
}
@@ -253,7 +252,7 @@ start_over:
}
if (m_after >= m_before) {
error_str =
- gettext("'a' parameter must be before 'b' parameter");
+ gettext("'a' parameter must be before 'b' parameter");
error_combo = TRUE;
}
if (f_delete &&
@@ -370,8 +369,8 @@ proc_object(char *optarg)
if (he->h_addrtype == AF_INET6) {
/* LINTED */
- if (IN6_IS_ADDR_V4MAPPED((in6_addr_t *)
- he->h_addr_list[0])) {
+ if (IN6_IS_ADDR_V4MAPPED(
+ (in6_addr_t *)he->h_addr_list[0])) {
/* address is IPv4 (32 bits) */
(void) memcpy(&obj_id, he->h_addr_list[0], 4);
ip_type = AU_IPv4;
@@ -1132,7 +1131,7 @@ proc_pcb(audit_pcb_t *pcb, char *suffix, int i)
pcb->pcb_size = AUDITBUFSIZE;
pcb->pcb_rec = (char *)a_calloc(1, AUDITBUFSIZE);
pcb->pcb_time = -1;
- pcb->pcb_flags |= PF_FILE; /* note this one controls files */
+ pcb->pcb_flags |= PF_USEFILE; /* note this one controls files */
pcb->pcb_procno = i; /* save index into audit_pcbs [] for id */
}
diff --git a/usr/src/cmd/auditreduce/proc.c b/usr/src/cmd/auditreduce/proc.c
index 2de2465990..455af400de 100644
--- a/usr/src/cmd/auditreduce/proc.c
+++ b/usr/src/cmd/auditreduce/proc.c
@@ -23,7 +23,6 @@
* Use is subject to license terms.
*/
-
/*
* Main processor for auditreduce.
* Mproc() is the entry point for this module. It is the only visible
@@ -482,7 +481,7 @@ int *nr;
* Must be check here because the start time of the file name
* may be after the first record(s).
*/
- if (pcb->pcb_nrecs == 0 && (pcb->pcb_flags & PF_FILE)) {
+ if (pcb->pcb_nrecs == 0 && (pcb->pcb_flags & PF_USEFILE)) {
/*
* If the first record read failed then use the time
* that was in the filename to judge.
@@ -509,7 +508,7 @@ int *nr;
pcb->pcb_nrecs++; /* # of read recs from stream */
nrecs++; /* # of recs read this call */
/* Only check record if at bottom of process tree. */
- if (pcb->pcb_flags & PF_FILE) {
+ if (pcb->pcb_flags & PF_USEFILE) {
check_order(pcb); /* check time sequence */
if ((ret2 = check_rec(pcb)) == 0) {
pcb->pcb_nprecs++;
@@ -541,7 +540,7 @@ int *nr;
if (ret < 0 || ret2 == -2) {
pcb->pcb_nrecs++; /* # of read records */
if (!f_quiet) {
- if (pcb->pcb_flags & PF_FILE) {
+ if (pcb->pcb_flags & PF_USEFILE) {
/* Ignore if this is not_terminated. */
if (!strstr((pcb->pcb_cur)->fcb_file,
"not_terminated")) {
@@ -558,12 +557,12 @@ int *nr;
* Only mark infile for deleting if we have succesfully
* processed all of it.
*/
- if (pcb->pcb_flags & PF_FILE)
+ if (pcb->pcb_flags & PF_USEFILE)
(pcb->pcb_cur)->fcb_flags |= FF_DELETE;
}
if (fclose(pcb->pcb_fpr) == EOF) {
if (!f_quiet) {
- if (pcb->pcb_flags & PF_FILE) {
+ if (pcb->pcb_flags & PF_USEFILE) {
str = (pcb->pcb_cur)->fcb_file;
} else {
str = "pipe";
@@ -600,7 +599,7 @@ audit_pcb_t *pcb;
/*
* For file give filename, too.
*/
- if (pcb->pcb_flags & PF_FILE) {
+ if (pcb->pcb_flags & PF_USEFILE) {
(void) fprintf(stderr, "%s closed %s: %d records read recs: \
%d record written.\n", ar, (pcb->pcb_cur)->fcb_file,
pcb->pcb_nrecs, pcb->pcb_nprecs);