mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Decouple enc/ses verbosity from bootverbose.
I don't want to be regularly notified that my enclosure violates standards until there is some real problem I want to debug. MFC after: 2 weeks
This commit is contained in:
parent
05b626019a
commit
6d4d657360
3 changed files with 14 additions and 2 deletions
|
|
@ -81,6 +81,14 @@ static enctyp enc_type(struct ccb_getdev *);
|
|||
SYSCTL_NODE(_kern_cam, OID_AUTO, enc, CTLFLAG_RD, 0,
|
||||
"CAM Enclosure Services driver");
|
||||
|
||||
#if defined(DEBUG) || defined(ENC_DEBUG)
|
||||
int enc_verbose = 1;
|
||||
#else
|
||||
int enc_verbose = 0;
|
||||
#endif
|
||||
SYSCTL_INT(_kern_cam_enc, OID_AUTO, verbose, CTLFLAG_RWTUN,
|
||||
&enc_verbose, 0, "Enable verbose logging");
|
||||
|
||||
static struct periph_driver encdriver = {
|
||||
enc_init, "ses",
|
||||
TAILQ_HEAD_INITIALIZER(encdriver.units), /* generation */ 0
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef __SCSI_ENC_INTERNAL_H__
|
||||
#define __SCSI_ENC_INTERNAL_H__
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
typedef struct enc_element {
|
||||
uint32_t
|
||||
enctype : 8, /* enclosure type */
|
||||
|
|
@ -204,6 +206,9 @@ enc_softc_init_t ses_softc_init;
|
|||
/* SAF-TE interface */
|
||||
enc_softc_init_t safte_softc_init;
|
||||
|
||||
SYSCTL_DECL(_kern_cam_enc);
|
||||
extern int enc_verbose;
|
||||
|
||||
/* Helper macros */
|
||||
MALLOC_DECLARE(M_SCSIENC);
|
||||
#define ENC_CFLAGS CAM_RETRY_SELTO
|
||||
|
|
@ -216,7 +221,7 @@ MALLOC_DECLARE(M_SCSIENC);
|
|||
#else
|
||||
#define ENC_DLOG if (0) enc_log
|
||||
#endif
|
||||
#define ENC_VLOG if (bootverbose) enc_log
|
||||
#define ENC_VLOG if (enc_verbose) enc_log
|
||||
#define ENC_MALLOC(amt) malloc(amt, M_SCSIENC, M_NOWAIT)
|
||||
#define ENC_MALLOCZ(amt) malloc(amt, M_SCSIENC, M_ZERO|M_NOWAIT)
|
||||
/* Cast away const avoiding GCC warnings. */
|
||||
|
|
|
|||
|
|
@ -227,7 +227,6 @@ static char *safte_2little = "Too Little Data Returned (%d) at line %d\n";
|
|||
}
|
||||
|
||||
int emulate_array_devices = 1;
|
||||
SYSCTL_DECL(_kern_cam_enc);
|
||||
SYSCTL_INT(_kern_cam_enc, OID_AUTO, emulate_array_devices, CTLFLAG_RWTUN,
|
||||
&emulate_array_devices, 0, "Emulate Array Devices for SAF-TE");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue