diff options
| author | Richard Lowe <richlowe@richlowe.net> | 2011-06-22 10:37:21 -0700 |
|---|---|---|
| committer | Richard Lowe <richlowe@richlowe.net> | 2011-06-22 10:37:21 -0700 |
| commit | 8682d1ef2a0960ed5a9f05b9448eaa3e68ac931f (patch) | |
| tree | 97a8eff38c31609d814ca5b2ed5806e5e0553d26 /usr/src/cmd/picl | |
| parent | e65fcc69bb33b3f4525b0c2c9732ece17c90b196 (diff) | |
| download | illumos-joyent-8682d1ef2a0960ed5a9f05b9448eaa3e68ac931f.tar.gz | |
1200 various modules declare static functions within function bodies
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Eric Schrock <eric.schrock@delphix.com>
Diffstat (limited to 'usr/src/cmd/picl')
| -rw-r--r-- | usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c index 6ac96ce407..60b6b99efa 100644 --- a/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c +++ b/usr/src/cmd/picl/plugins/sun4u/snowbird/frutree/piclkstat.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Implementation to get PORT nodes state and condition information */ @@ -70,6 +68,7 @@ static int serial_port_state(kstat_ctl_t *, char *, int); static int serial_port_cond(kstat_ctl_t *kc, char *, int); static int parallel_port_state(kstat_ctl_t *, char *, int); static int parallel_port_cond(kstat_ctl_t *kc, char *, int); +static void sig_alarm_handler(int); static funcp port_state[] = { kstat_network_port_state, @@ -144,13 +143,13 @@ kstat_name_lookup(kstat_ctl_t *kc, char *ks_module, int ks_instance, char *name) for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { if (strcmp(ksp->ks_module, ks_module) == 0 && - ksp->ks_instance == ks_instance && - ksp->ks_type == KSTAT_TYPE_NAMED && - kstat_read(kc, ksp, NULL) != -1 && - kstat_data_lookup(ksp, name)) { + ksp->ks_instance == ks_instance && + ksp->ks_type == KSTAT_TYPE_NAMED && + kstat_read(kc, ksp, NULL) != -1 && + kstat_data_lookup(ksp, name)) { ksp = kstat_lookup(kc, ks_module, ks_instance, - ksp->ks_name); + ksp->ks_name); if (!ksp) return (NULL); if (kstat_read(kc, ksp, NULL) == -1) @@ -171,7 +170,7 @@ kstat_network_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance) kstat_named_t *port_datap = NULL; if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - LINK_UP)) == NULL) { + LINK_UP)) == NULL) { return (-1); } if (port_datap == NULL) { @@ -208,7 +207,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) uint64_t ifspeed, ierrors, ipackets, oerrors, opackets; if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - LINK_UP)) == NULL) { + LINK_UP)) == NULL) { return (-1); } @@ -222,7 +221,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - DUPLEX)) == NULL) { + DUPLEX)) == NULL) { return (-1); } @@ -236,7 +235,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - IF_SPEED)) == NULL) { + IF_SPEED)) == NULL) { return (-1); } if (port_datap->data_type == KSTAT_DATA_UINT32) { @@ -250,7 +249,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) /* check for FAILING conditions */ if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - IERRORS)) == NULL) { + IERRORS)) == NULL) { return (-1); } if (port_datap->data_type == KSTAT_DATA_UINT32) { @@ -260,7 +259,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - IPACKETS)) == NULL) { + IPACKETS)) == NULL) { return (-1); } @@ -274,7 +273,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - OERRORS)) == NULL) { + OERRORS)) == NULL) { return (-1); } if (port_datap->data_type == KSTAT_DATA_UINT32) { @@ -284,7 +283,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - OPACKETS)) == NULL) { + OPACKETS)) == NULL) { return (-1); } if (port_datap->data_type == KSTAT_DATA_UINT32) { @@ -297,7 +296,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - RUNT_ERRORS)) == NULL) { + RUNT_ERRORS)) == NULL) { return (-1); } if (port_datap->data_type == KSTAT_DATA_UINT32) { @@ -310,7 +309,7 @@ kstat_network_port_cond(kstat_ctl_t *kc, char *ks_module, int ks_instance) } if ((port_datap = kstat_name_lookup(kc, ks_module, ks_instance, - COLLISIONS)) == NULL) { + COLLISIONS)) == NULL) { return (-1); } if (port_datap->data_type == KSTAT_DATA_UINT32) { @@ -337,7 +336,6 @@ serial_port_state(kstat_ctl_t *kc, char *driver, int instance) char device[20]; struct termios flags; struct sigaction old_sa, new_sa; - static void sig_alarm_handler(int); (void) memset(&old_sa, 0, sizeof (old_sa)); (void) memset(&new_sa, 0, sizeof (new_sa)); @@ -404,7 +402,7 @@ parallel_port_state(kstat_ctl_t *kc, char *ks_module, int ks_instance) char ks_name[20]; (void) snprintf(ks_name, sizeof (ks_name), "%s%d", ks_module, - ks_instance); + ks_instance); if ((ksp = kstat_lookup(kc, ks_module, ks_instance, ks_name)) == NULL) { return (-1); } |
