Codebase list hwinfo / 091668e
Imported Upstream version 21.27 Tomasz Buchert 7 years ago
5 changed file(s) with 37 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
0 .TH HWINFO 8 "June 2009" "hwinfo" "System configuration"
0 .TH HWINFO 8 "June 2016" "hwinfo" "System configuration"
11 .\"
2 .nh
23 .SH NAME
34 hwinfo \- probe for hardware
45 .\"
2627 network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd,
2728 reallyall, scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, uml, usb,
2829 usb-ctrl, vbe, wlan, xen, zip
30
31 Note that if this option is missing, no hardware probing will be done!
2932 .TP
3033 \fB--short\fR
3134 Show only a summary. Use this option in addition to a hardware probing
3538 Normally hwinfo does not report RAID devices. Add this option to see them.
3639 .TP
3740 \fB--only \fIDEVNAME\fR
38 This option can be given more than once. If you add this option, only data
39 about devices with \fIDEVNAME\fR will be shown.
41 This option can be given more than once. If you add this option
42 only entries in the device list matching \fIDEVNAME\fR will be shown.
43 Note that you also have to specify --<\fIHARDWARE_ITEM\fR> to trigger
44 any device probing.
4045 .TP
4146 \fB--save-config \fISPEC\fR
4247 Store config for a particular device below /var/lib/hardware. \fISPEC\fR
5358 .TP
5459 \fB--debug \fIN\fR
5560 Set debug level to \fIN\fR. The debug info is shown only in the log file.
56 If you specify a log file, the debug level is implicitly set to a reasonable value.
61 If you specify a log file, the debug level is implicitly set to a reasonable value
62 (N is a bitmask of individual flags).
5763 .TP
5864 \fB--verbose\fR
5965 Increase verbosity. Only together with --map.
6066 .TP
6167 \fB--log \fIFILE\fR
6268 Write log info to \fIFILE\fR.
69 Don't forget to also specify --<\fIHARDWARE_ITEM\fR> to trigger any device probing.
6370 .TP
6471 \fB--dump-db \fIN\fR
6572 Dump hardware data base. \fIN\fR is either 0 for the external data base in
149149 { "memory", 0, NULL, 1000 + hw_memory },
150150 { "manual", 0, NULL, 1000 + hw_manual },
151151 { "pcmcia", 0, NULL, 1000 + hw_pcmcia },
152 { "pcmcia-ctrl", 0, NULL, 1000 + hw_pcmcia_ctrl },
152153 { "pcmcia_ctrl", 0, NULL, 1000 + hw_pcmcia_ctrl },
153154 { "ieee1394", 0, NULL, 1000 + hw_ieee1394 },
155 { "ieee1394-ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl },
154156 { "ieee1394_ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl },
155157 { "firewire", 0, NULL, 1000 + hw_ieee1394 },
158 { "firewire-ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl },
156159 { "firewire_ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl },
157160 { "hotplug", 0, NULL, 1000 + hw_hotplug },
161 { "hotplug-ctrl", 0, NULL, 1000 + hw_hotplug_ctrl },
158162 { "hotplug_ctrl", 0, NULL, 1000 + hw_hotplug_ctrl },
159163 { "zip", 0, NULL, 1000 + hw_zip },
160164 { "pppoe", 0, NULL, 1000 + hw_pppoe },
816820 " Normally hwinfo does not report RAID devices. Add this option to\n"
817821 " see them.\n"
818822 " --only DEVNAME\n"
819 " This option can be given more than once. If you add this option,\n"
820 " only data about devices with DEVNAME will be shown.\n"
823 " This option can be given more than once. If you add this option\n"
824 " only entries in the device list matching DEVNAME will be shown.\n"
825 " Note that you also have to specify --<HARDWARE_ITEM> to trigger\n"
826 " any device probing.\n"
821827 " --save-config SPEC\n"
822828 " Store config for a particular device below /var/lib/hardware.\n"
823829 " SPEC can be a device name, an UDI, or 'all'. This option must be\n"
831837 " --debug N\n"
832838 " Set debug level to N. The debug info is shown only in the log\n"
833839 " file. If you specify a log file, the debug level is implicitly\n"
834 " set to a reasonable value.\n"
840 " set to a reasonable value (N is a bitmask of individual flags).\n"
835841 " --verbose\n"
836842 " Increase verbosity. Only together with --map.\n"
837843 " --log FILE\n"
838844 " Write log info to FILE.\n"
845 " Don't forget to also specify --<HARDWARE_ITEM> to trigger any\n"
846 " device probing.\n"
839847 " --dump-db N\n"
840848 " Dump hardware data base. N is either 0 for the external data\n"
841849 " base in /var/lib/hardware, or 1 for the internal data base.\n"
707707
708708 /*
709709 * assumes hd->drivers aleady includes scsi device drivers (like 'sd')
710 *
711 * The following code uses ioctl() calls to issue some SCSI commands
712 * directly (namely the INQUIRY command).
713 *
714 * For reference, and to understand the layout of the ioctl() calls below,
715 * google for a document named 'SCSI Primary Commands 5 (SPC-5)' (or more
716 * recent versions - it doesn't matter for our purpose).
717 *
718 * The latest draft is usually freely available but not directly downloadable.
710719 */
711720 void add_scsi_sysfs_info(hd_data_t *hd_data, hd_t *hd, char *sf_dev)
712721 {
9911000 str_printf(&pr_str, 0, "%s serial", hd->unix_dev_name);
9921001 PROGRESS(5, 2, pr_str);
9931002
994 char *serial_buf = NULL;
1003 unsigned char *serial_buf = NULL;
9951004 unsigned serial_buf_len = 0;
9961005 memset(scsi_cmd_buf, 0, sizeof scsi_cmd_buf);
9971006
569569
570570 if (strstr(devtree->path, "vpd") == devtree->path)
571571 ADD2LOG(
572 " ccin \"%s\", fru-number \"%s\", location-code \"%s\", serial-number \"%s\", part-number \"%s,\"\n"
572 " ccin \"%s\", fru-number \"%s\", location-code \"%s\", serial-number \"%s\", part-number \"%s\",\n"
573573 " description \"%s\"\n",
574574 devtree->ccin ? devtree->ccin : "",
575575 devtree->fru_number ? devtree->fru_number : "",
471471 NULL, "Other", "Unknown", "SIMM",
472472 "SIP", "Chip", "DIP", "ZIP",
473473 "Proprietary Card", "DIMM", "TSOP", "Row of Chips",
474 "RIMM", "SODIMM", "SRIMM"
474 "RIMM", "SODIMM", "SRIMM", "FB-DIMM"
475475 };
476476 SMBIOS_DEF_MAP(smbios_memdevice_form);
477477
992992 sm->memdevice.asset = get_string(sl_any, sm_data[0x19]);
993993 sm->memdevice.part = get_string(sl_any, sm_data[0x1a]);
994994 }
995 if(data_len >= 0x20 && sm->memdevice.size == (0x7fff << 10)) {
996 sm->memdevice.size = (READ_MEM32(sm_data + 0x1c) & 0x7fffffff) << 10;
997 }
995998 break;
996999
9971000 case sm_memerror: