4 * Copyright(c) 2007-2008 Intel Corporation. All rights reserved.
5 * The contents of this file are subject to the terms of the
6 * Common Development and Distribution License (the "License").
7 * You may not use this file except in compliance with the License.
9 * You can obtain a copy of the license at:
10 * http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When using or redistributing this file, you may do so under the
15 * License only. No other modification of this header is permitted.
17 * If applicable, add the following below this CDDL HEADER, with the
18 * fields enclosed by brackets "[]" replaced with your own identifying
19 * information: Portions Copyright [yyyy] [name of copyright owner]
25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms of the CDDL.
29 #pragma ident "%Z%%M% %I% %E% SMI"
33 #define LOG_BUF_LEN 128
36 * ixgbe_notice - Report a run-time event (CE_NOTE, to console & log)
39 ixgbe_notice(void *arg
, const char *fmt
, ...)
41 ixgbe_t
*ixgbep
= (ixgbe_t
*)arg
;
42 char buf
[LOG_BUF_LEN
];
46 (void) vsnprintf(buf
, sizeof (buf
), fmt
, ap
);
50 cmn_err(CE_NOTE
, "%s%d: %s", MODULE_NAME
, ixgbep
->instance
,
53 cmn_err(CE_NOTE
, "%s: %s", MODULE_NAME
, buf
);
57 * ixgbe_log - Log a run-time event (CE_NOTE, to log only)
60 ixgbe_log(void *arg
, const char *fmt
, ...)
62 ixgbe_t
*ixgbep
= (ixgbe_t
*)arg
;
63 char buf
[LOG_BUF_LEN
];
67 (void) vsnprintf(buf
, sizeof (buf
), fmt
, ap
);
71 cmn_err(CE_NOTE
, "!%s%d: %s", MODULE_NAME
, ixgbep
->instance
,
74 cmn_err(CE_NOTE
, "!%s: %s", MODULE_NAME
, buf
);
78 * ixgbe_error - Log a run-time problem (CE_WARN, to log only)
81 ixgbe_error(void *arg
, const char *fmt
, ...)
83 ixgbe_t
*ixgbep
= (ixgbe_t
*)arg
;
84 char buf
[LOG_BUF_LEN
];
88 (void) vsnprintf(buf
, sizeof (buf
), fmt
, ap
);
92 cmn_err(CE_WARN
, "!%s%d: %s", MODULE_NAME
, ixgbep
->instance
,
95 cmn_err(CE_WARN
, "!%s: %s", MODULE_NAME
, buf
);