Lines Matching +full:- +full:36000
1 /*-
64 if (mtinfo->error != 0) in mt_start_element()
67 mtinfo->level++; in mt_start_element()
68 if ((u_int)mtinfo->level >= (sizeof(mtinfo->cur_sb) / in mt_start_element()
69 sizeof(mtinfo->cur_sb[0]))) { in mt_start_element()
70 mtinfo->error = 1; in mt_start_element()
71 snprintf(mtinfo->error_str, sizeof(mtinfo->error_str), in mt_start_element()
73 sizeof(mtinfo->cur_sb) / sizeof(mtinfo->cur_sb[0])); in mt_start_element()
77 mtinfo->cur_sb[mtinfo->level] = sbuf_new_auto(); in mt_start_element()
78 if (mtinfo->cur_sb[mtinfo->level] == NULL) { in mt_start_element()
79 mtinfo->error = 1; in mt_start_element()
80 snprintf(mtinfo->error_str, sizeof(mtinfo->error_str), in mt_start_element()
87 mtinfo->error = 1; in mt_start_element()
88 snprintf(mtinfo->error_str, sizeof(mtinfo->error_str), in mt_start_element()
94 STAILQ_INIT(&entry->nv_list); in mt_start_element()
95 STAILQ_INIT(&entry->child_entries); in mt_start_element()
96 entry->entry_name = strdup(name); in mt_start_element()
97 mtinfo->cur_entry[mtinfo->level] = entry; in mt_start_element()
98 if (mtinfo->cur_entry[mtinfo->level - 1] == NULL) { in mt_start_element()
99 STAILQ_INSERT_TAIL(&mtinfo->entries, entry, links); in mt_start_element()
102 &mtinfo->cur_entry[mtinfo->level - 1]->child_entries, in mt_start_element()
104 entry->parent = mtinfo->cur_entry[mtinfo->level - 1]; in mt_start_element()
113 entry->size = strtoull(attr[i+1], NULL, 0); in mt_start_element()
116 entry->var_type = MT_TYPE_INT; in mt_start_element()
118 entry->var_type = MT_TYPE_UINT; in mt_start_element()
120 entry->var_type = MT_TYPE_STRING; in mt_start_element()
122 entry->var_type = MT_TYPE_NODE; in mt_start_element()
127 entry->fmt = strdup(attr[i+1]); in mt_start_element()
129 entry->desc = strdup(attr[i+1]); in mt_start_element()
136 mtinfo->error = 1; in mt_start_element()
137 snprintf(mtinfo->error_str, in mt_start_element()
138 sizeof(mtinfo->error_str), in mt_start_element()
143 nv->name = strdup(attr[i]); in mt_start_element()
144 nv->value = strdup(attr[i+1]); in mt_start_element()
145 STAILQ_INSERT_TAIL(&entry->nv_list, nv, links); in mt_start_element()
161 if (mtinfo->error != 0) in mt_end_element()
164 if (mtinfo->cur_sb[mtinfo->level] == NULL) { in mt_end_element()
165 mtinfo->error = 1; in mt_end_element()
166 snprintf(mtinfo->error_str, sizeof(mtinfo->error_str), in mt_end_element()
168 mtinfo->level, name); in mt_end_element()
171 sbuf_finish(mtinfo->cur_sb[mtinfo->level]); in mt_end_element()
172 str = strdup(sbuf_data(mtinfo->cur_sb[mtinfo->level])); in mt_end_element()
174 mtinfo->error = 1; in mt_end_element()
175 snprintf(mtinfo->error_str, sizeof(mtinfo->error_str), in mt_end_element()
177 sbuf_len(mtinfo->cur_sb[mtinfo->level])); in mt_end_element()
188 entry = mtinfo->cur_entry[mtinfo->level]; in mt_end_element()
189 switch(entry->var_type) { in mt_end_element()
191 entry->value_signed = strtoll(str, NULL, 0); in mt_end_element()
194 entry->value_unsigned = strtoull(str, NULL, 0); in mt_end_element()
201 mtinfo->cur_entry[mtinfo->level]->value = str; in mt_end_element()
203 sbuf_delete(mtinfo->cur_sb[mtinfo->level]); in mt_end_element()
204 mtinfo->cur_sb[mtinfo->level] = NULL; in mt_end_element()
205 mtinfo->cur_entry[mtinfo->level] = NULL; in mt_end_element()
206 mtinfo->level--; in mt_end_element()
218 if (mtinfo->error != 0) in mt_char_handler()
221 sbuf_bcat(mtinfo->cur_sb[mtinfo->level], str, len); in mt_char_handler()
236 "type: %d, desc: %s\n", indent, "", entry->entry_name, in mt_status_tree_sbuf()
237 entry->value, entry->fmt, entry->size, entry->var_type, in mt_status_tree_sbuf()
238 entry->desc); in mt_status_tree_sbuf()
239 STAILQ_FOREACH(nv, &entry->nv_list, links) { in mt_status_tree_sbuf()
241 indent + 1, "", nv->name, nv->value); in mt_status_tree_sbuf()
245 STAILQ_FOREACH(entry2, &entry->child_entries, links) in mt_status_tree_sbuf()
258 STAILQ_FOREACH(entry2, &entry->child_entries, links) in mt_status_tree_print()
299 if (strcmp(entry->entry_name, tmpstr) == 0) { in mt_entry_find()
321 STAILQ_FOREACH(entry2, &entry->child_entries, links) { in mt_entry_find()
342 STAILQ_FOREACH(entry, &status_data->entries, links) { in mt_status_entry_find()
357 STAILQ_FOREACH_SAFE(entry2, &entry->child_entries, links, entry3) { in mt_status_entry_free()
358 STAILQ_REMOVE(&entry->child_entries, entry2, mt_status_entry, in mt_status_entry_free()
363 free(entry->entry_name); in mt_status_entry_free()
364 free(entry->value); in mt_status_entry_free()
365 free(entry->fmt); in mt_status_entry_free()
366 free(entry->desc); in mt_status_entry_free()
368 STAILQ_FOREACH_SAFE(nv, &entry->nv_list, links, nv2) { in mt_status_entry_free()
369 STAILQ_REMOVE(&entry->nv_list, nv, mt_status_nv, links); in mt_status_entry_free()
370 free(nv->name); in mt_status_entry_free()
371 free(nv->value); in mt_status_entry_free()
382 STAILQ_FOREACH_SAFE(entry, &status_data->entries, links, entry2) { in mt_status_free()
383 STAILQ_REMOVE(&status_data->entries, entry, mt_status_entry, in mt_status_free()
392 switch(entry->var_type) { in mt_entry_sbuf()
395 sbuf_printf(sb, fmt, (intmax_t)entry->value_signed); in mt_entry_sbuf()
398 (intmax_t)entry->value_signed); in mt_entry_sbuf()
402 sbuf_printf(sb, fmt, (uintmax_t)entry->value_unsigned); in mt_entry_sbuf()
405 (uintmax_t)entry->value_unsigned); in mt_entry_sbuf()
409 sbuf_printf(sb, fmt, entry->value); in mt_entry_sbuf()
411 sbuf_printf(sb, "%s", entry->value); in mt_entry_sbuf()
420 if (entry->parent != NULL) in mt_param_parent_print()
421 mt_param_parent_print(entry->parent, print_params); in mt_param_parent_print()
423 if (((print_params->flags & MT_PF_INCLUDE_ROOT) == 0) in mt_param_parent_print()
424 && (strcmp(entry->entry_name, print_params->root_name) == 0)) in mt_param_parent_print()
427 printf("%s.", entry->entry_name); in mt_param_parent_print()
434 if (entry->parent != NULL) in mt_param_parent_sbuf()
435 mt_param_parent_sbuf(sb, entry->parent, print_params); in mt_param_parent_sbuf()
437 if (((print_params->flags & MT_PF_INCLUDE_ROOT) == 0) in mt_param_parent_sbuf()
438 && (strcmp(entry->entry_name, print_params->root_name) == 0)) in mt_param_parent_sbuf()
441 sbuf_printf(sb, "%s.", entry->entry_name); in mt_param_parent_sbuf()
454 if (entry->var_type == MT_TYPE_NODE) in mt_param_entry_sbuf()
457 if ((print_params->flags & MT_PF_FULL_PATH) in mt_param_entry_sbuf()
458 && (entry->parent != NULL)) in mt_param_entry_sbuf()
459 mt_param_parent_sbuf(sb, entry->parent, print_params); in mt_param_entry_sbuf()
461 sbuf_printf(sb, "%s: %s", entry->entry_name, entry->value); in mt_param_entry_sbuf()
462 if ((print_params->flags & MT_PF_VERBOSE) in mt_param_entry_sbuf()
463 && (entry->desc != NULL) in mt_param_entry_sbuf()
464 && (strlen(entry->desc) > 0)) in mt_param_entry_sbuf()
465 sbuf_printf(sb, " (%s)", entry->desc); in mt_param_entry_sbuf()
480 if (entry->var_type == MT_TYPE_NODE) in mt_param_entry_print()
483 if ((print_params->flags & MT_PF_FULL_PATH) in mt_param_entry_print()
484 && (entry->parent != NULL)) in mt_param_entry_print()
485 mt_param_parent_print(entry->parent, print_params); in mt_param_entry_print()
487 printf("%s: %s", entry->entry_name, entry->value); in mt_param_entry_print()
488 if ((print_params->flags & MT_PF_VERBOSE) in mt_param_entry_print()
489 && (entry->desc != NULL) in mt_param_entry_print()
490 && (strlen(entry->desc) > 0)) in mt_param_entry_print()
491 printf(" (%s)", entry->desc); in mt_param_entry_print()
542 STAILQ_FOREACH(entry, &status_data->entries, links) in mt_param_list()
558 * SCSI-3 Stream Device Commands (SSC)
559 * Revision 11, 4-Nov-97
561 * LTO 1-6 definitions obtained from the eighth edition of the
569 * DAT-72 and DAT-160 bpi values taken from "HP StorageWorks DAT160
572 * DAT-160 / SDLT220 density code (0x48) conflict information
575 * http://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01065117&sp4ts.oid=429311
579 { 0x1, 32, 800, "X3.22-1983" },
580 { 0x2, 63, 1600, "X3.39-1986" },
581 { 0x3, 246, 6250, "X3.54-1986" },
582 { 0x5, 315, 8000, "X3.136-1986" },
583 { 0x6, 126, 3200, "X3.157-1987" },
584 { 0x7, 252, 6400, "X3.116-1986" },
585 { 0x8, 315, 8000, "X3.158-1987" },
587 { 0xA, 262, 6667, "X3B5/86-199" },
588 { 0xB, 63, 1600, "X3.56-1986" },
589 { 0xC, 500, 12690, "HI-TC1" },
590 { 0xD, 999, 25380, "HI-TC2" },
591 { 0xF, 394, 10000, "QIC-120" },
592 { 0x10, 394, 10000, "QIC-150" },
593 { 0x11, 630, 16000, "QIC-320" },
594 { 0x12, 2034, 51667, "QIC-1350" },
595 { 0x13, 2400, 61000, "X3B5/88-185A" },
596 { 0x14, 1703, 43245, "X3.202-1991" },
598 { 0x16, 394, 10000, "X3.193-1990" },
599 { 0x17, 1673, 42500, "X3B5/91-174" },
600 { 0x18, 1673, 42500, "X3B5/92-50" },
604 { 0x1C, 1654, 42000, "QIC-385M" },
605 { 0x1D, 1512, 38400, "QIC-410M" },
606 { 0x1E, 1385, 36000, "QIC-1000C" },
607 { 0x1F, 2666, 67733, "QIC-2100C" },
608 { 0x20, 2666, 67733, "QIC-6GB(M)" },
609 { 0x21, 2666, 67733, "QIC-20GB(C)" },
610 { 0x22, 1600, 40640, "QIC-2GB(C)" },
611 { 0x23, 2666, 67733, "QIC-875M" },
612 { 0x24, 2400, 61000, "DDS-2" },
613 { 0x25, 3816, 97000, "DDS-3" },
614 { 0x26, 3816, 97000, "DDS-4" },
617 { 0x40, 4880, 123952, "LTO-1" },
619 { 0x42, 7398, 187909, "LTO-2" },
620 { 0x44, 9638, 244805, "LTO-3" },
621 { 0x46, 12725, 323215, "LTO-4" },
622 { 0x47, 6417, 163000, "DAT-72" },
624 * XXX KDM note that 0x48 is also the density code for DAT-160.
628 { 0x48, 6870, 174500, "DAT-160" },
643 { 0x58, 15142, 384607, "LTO-5" },
645 { 0x5A, 15142, 384607, "LTO-6" },
646 { 0x5C, 19107, 485318, "LTO-7" },
647 { 0x5D, 19107, 485318, "LTO-M8" },
648 { 0x5E, 20669, 524993, "LTO-8" },
649 { 0x60, 23031, 584987, "LTO-9" },
658 { 0x8c, 1789, 45434, "EXB-8500c" },
659 { 0x90, 1703, 43245, "EXB-8200c" },
674 for (sd = dens; sd->dens != 0; sd++) in mt_density_name()
675 if (sd->dens == density_num) in mt_density_name()
677 if (sd->dens == 0) in mt_density_name()
679 return (sd->name); in mt_density_name()
691 for (sd = dens; sd->dens; sd++) in mt_density_bp()
692 if (sd->dens == density_num) in mt_density_bp()
694 if (sd->dens == 0) in mt_density_bp()
697 return (sd->bpi); in mt_density_bp()
699 return (sd->bpmm); in mt_density_bp()
708 for (sd = dens; sd->dens; sd++) in mt_density_num()
709 if (strncasecmp(sd->name, density_name, l) == 0) in mt_density_num()
711 return (sd->dens); in mt_density_num()
716 * Returns 0 on success, -1 on failure (with errno set, and *xml_str == NULL).
731 return (-1); in mt_get_xml_str()
743 return (-1); in mt_get_xml_str()
756 * The caller must check status_data->error.
765 STAILQ_INIT(&status_data->entries); in mt_get_status()