Lines Matching refs:expander

89 	nvlist_t *slt_expanders;    /* List of expander log entries */
92 /* Contains expander log data retrieved from a topology node */
93 typedef struct expander
95 char slt_label[MAXNAMELEN]; /* The expander name */
97 char slt_key[MAXNAMELEN]; /* The expander key (sas address) */
98 char slt_path[MAXPATHLEN]; /* The ses path to the expander */
102 #define DATA_FIELD "data" /* Label for the expander details */
103 #define DEFAULT_DATA "0" /* Default expander details value */
139 { 684002, invert_fmri }, /* Alternate expander is down */
140 { 685002, invert_fmri } /* Alternate expander is down */
399 * expander: An expander_t struct containing path, pid etc info from the node.
403 * this expander.
406 create_filename(char *fileName, expander_t *expander, ses_log_monitor_t *slmp,
427 ses_node = strrchr(expander->slt_path, '/');
436 subchassis_val = access_fmri(slmp, expander->fmri, SUBCHASSIS,
447 label_length = strlen(expander->slt_label);
449 if ((!isspace(expander->slt_label[i])) &&
450 ('/' != expander->slt_label[i])) {
451 (void) strncat(fileName, &expander->slt_label[i], 1);
498 * Allocates and adds an entry for a given expander to the expander list.
501 * key: A unique identifier for this expander.
512 "Error allocating expander detail space (%d)", status);
520 "Error adding default data to expander details (%d)",
528 "Error storing the default expander details (%d)",
540 * Retrieves the expander record nvlist that is associated with the
541 * expander identified by the given key. If no match is found, an
545 * key: A pointer to the key for an expander.
547 * expander.
556 * Retrieve the expander record that matches this expander. A default
582 "Could not retrieve the expander data field (%d)", err);
643 * Inverts the controller instance and the expander instance in the
661 "error inverting sas-expander instance: %d", err);
674 * expander: Contains derived information for this expander.
680 expander_t *expander, char *format_time, FILE *fp)
719 (void) check_code(slmp, expander->fmri,
720 expander->slt_pid, atoi(code));
733 class_sev, ena, expander->fmri, entry_data);
769 * exp: A pointer to an expander_t structure that identifies an expander.
787 * expander: A pointer to an expander object that contains info required
793 get_log(ses_log_monitor_t *slmp, expander_t *expander,
800 /* Retrieve the last entry for this expander for the lib call */
801 if ((err = get_last_entry(slmp, expander->slt_key, &expdata)) != 0) {
803 fmd_hdl_debug(slmp->slt_hdl, "Error collecting expander entry");
806 (void) strncpy(lib_param->target_path, expander->slt_path, MAXPATHLEN);
807 (void) strncpy(lib_param->product_id, expander->slt_pid, MAXNAMELEN);
829 * If we can retrieve the expander details for this expander then store
833 if ((err = nvlist_lookup_nvlist(slmp->slt_expanders, expander->slt_key,
840 "Error saving buffer data in expander details");
844 "Could not retrieve expander to store last entry: %d", err);
859 * expander: A pointer to an expander object that contains info about the
860 * expander.
865 process_log(ses_log_monitor_t *slmp, expander_t *expander,
888 err = create_filename(fileName, expander, slmp, output_count);
918 err = handle_log_entry(slmp, entry, expander,
950 expander_t *expander;
980 expander = (expander_t *)fmd_hdl_zalloc(slmp->slt_hdl,
983 (void) snprintf(expander->slt_pid, MAXNAMELEN, "%s", product_id);
989 free_expander(slmp, expander);
992 (void) snprintf(expander->slt_label, MAXNAMELEN, "%s", label);
999 expander->slt_label, err);
1000 free_expander(slmp, expander);
1003 (void) snprintf(expander->slt_path, MAXPATHLEN, "%s", target_path);
1010 expander->slt_label, err);
1011 free_expander(slmp, expander);
1017 free_expander(slmp, expander);
1021 (void) snprintf(expander->slt_key, MAXNAMELEN, "%s", sas_address);
1027 expander->slt_label, topo_strerror(err));
1029 free_expander(slmp, expander);
1032 expander->fmri = fmri;
1035 if ((err = get_log(slmp, expander, &lib_param)) != 0) {
1044 expander->slt_label, err);
1046 free_expander(slmp, expander);
1050 if ((err = process_log(slmp, expander, &lib_param)) != 0) {
1053 expander->slt_label, err);
1056 /* Free the expander structure before exiting. */
1057 free_expander(slmp, expander);
1199 /* Allocate space for the expander id holder */
1206 "Error allocating space for the expander list: %d", error);