Imported Upstream version 21.27
Tomasz Buchert
7 years ago
0 | .TH HWINFO 8 "June 2009" "hwinfo" "System configuration" | |
0 | .TH HWINFO 8 "June 2016" "hwinfo" "System configuration" | |
1 | 1 | .\" |
2 | .nh | |
2 | 3 | .SH NAME |
3 | 4 | hwinfo \- probe for hardware |
4 | 5 | .\" |
26 | 27 | network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd, |
27 | 28 | reallyall, scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, uml, usb, |
28 | 29 | usb-ctrl, vbe, wlan, xen, zip |
30 | ||
31 | Note that if this option is missing, no hardware probing will be done! | |
29 | 32 | .TP |
30 | 33 | \fB--short\fR |
31 | 34 | Show only a summary. Use this option in addition to a hardware probing |
35 | 38 | Normally hwinfo does not report RAID devices. Add this option to see them. |
36 | 39 | .TP |
37 | 40 | \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. | |
40 | 45 | .TP |
41 | 46 | \fB--save-config \fISPEC\fR |
42 | 47 | Store config for a particular device below /var/lib/hardware. \fISPEC\fR |
53 | 58 | .TP |
54 | 59 | \fB--debug \fIN\fR |
55 | 60 | 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). | |
57 | 63 | .TP |
58 | 64 | \fB--verbose\fR |
59 | 65 | Increase verbosity. Only together with --map. |
60 | 66 | .TP |
61 | 67 | \fB--log \fIFILE\fR |
62 | 68 | Write log info to \fIFILE\fR. |
69 | Don't forget to also specify --<\fIHARDWARE_ITEM\fR> to trigger any device probing. | |
63 | 70 | .TP |
64 | 71 | \fB--dump-db \fIN\fR |
65 | 72 | Dump hardware data base. \fIN\fR is either 0 for the external data base in |
149 | 149 | { "memory", 0, NULL, 1000 + hw_memory }, |
150 | 150 | { "manual", 0, NULL, 1000 + hw_manual }, |
151 | 151 | { "pcmcia", 0, NULL, 1000 + hw_pcmcia }, |
152 | { "pcmcia-ctrl", 0, NULL, 1000 + hw_pcmcia_ctrl }, | |
152 | 153 | { "pcmcia_ctrl", 0, NULL, 1000 + hw_pcmcia_ctrl }, |
153 | 154 | { "ieee1394", 0, NULL, 1000 + hw_ieee1394 }, |
155 | { "ieee1394-ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl }, | |
154 | 156 | { "ieee1394_ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl }, |
155 | 157 | { "firewire", 0, NULL, 1000 + hw_ieee1394 }, |
158 | { "firewire-ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl }, | |
156 | 159 | { "firewire_ctrl", 0, NULL, 1000 + hw_ieee1394_ctrl }, |
157 | 160 | { "hotplug", 0, NULL, 1000 + hw_hotplug }, |
161 | { "hotplug-ctrl", 0, NULL, 1000 + hw_hotplug_ctrl }, | |
158 | 162 | { "hotplug_ctrl", 0, NULL, 1000 + hw_hotplug_ctrl }, |
159 | 163 | { "zip", 0, NULL, 1000 + hw_zip }, |
160 | 164 | { "pppoe", 0, NULL, 1000 + hw_pppoe }, |
816 | 820 | " Normally hwinfo does not report RAID devices. Add this option to\n" |
817 | 821 | " see them.\n" |
818 | 822 | " --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" | |
821 | 827 | " --save-config SPEC\n" |
822 | 828 | " Store config for a particular device below /var/lib/hardware.\n" |
823 | 829 | " SPEC can be a device name, an UDI, or 'all'. This option must be\n" |
831 | 837 | " --debug N\n" |
832 | 838 | " Set debug level to N. The debug info is shown only in the log\n" |
833 | 839 | " 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" | |
835 | 841 | " --verbose\n" |
836 | 842 | " Increase verbosity. Only together with --map.\n" |
837 | 843 | " --log FILE\n" |
838 | 844 | " Write log info to FILE.\n" |
845 | " Don't forget to also specify --<HARDWARE_ITEM> to trigger any\n" | |
846 | " device probing.\n" | |
839 | 847 | " --dump-db N\n" |
840 | 848 | " Dump hardware data base. N is either 0 for the external data\n" |
841 | 849 | " base in /var/lib/hardware, or 1 for the internal data base.\n" |
707 | 707 | |
708 | 708 | /* |
709 | 709 | * 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. | |
710 | 719 | */ |
711 | 720 | void add_scsi_sysfs_info(hd_data_t *hd_data, hd_t *hd, char *sf_dev) |
712 | 721 | { |
991 | 1000 | str_printf(&pr_str, 0, "%s serial", hd->unix_dev_name); |
992 | 1001 | PROGRESS(5, 2, pr_str); |
993 | 1002 | |
994 | char *serial_buf = NULL; | |
1003 | unsigned char *serial_buf = NULL; | |
995 | 1004 | unsigned serial_buf_len = 0; |
996 | 1005 | memset(scsi_cmd_buf, 0, sizeof scsi_cmd_buf); |
997 | 1006 |
569 | 569 | |
570 | 570 | if (strstr(devtree->path, "vpd") == devtree->path) |
571 | 571 | 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" | |
573 | 573 | " description \"%s\"\n", |
574 | 574 | devtree->ccin ? devtree->ccin : "", |
575 | 575 | devtree->fru_number ? devtree->fru_number : "", |
471 | 471 | NULL, "Other", "Unknown", "SIMM", |
472 | 472 | "SIP", "Chip", "DIP", "ZIP", |
473 | 473 | "Proprietary Card", "DIMM", "TSOP", "Row of Chips", |
474 | "RIMM", "SODIMM", "SRIMM" | |
474 | "RIMM", "SODIMM", "SRIMM", "FB-DIMM" | |
475 | 475 | }; |
476 | 476 | SMBIOS_DEF_MAP(smbios_memdevice_form); |
477 | 477 | |
992 | 992 | sm->memdevice.asset = get_string(sl_any, sm_data[0x19]); |
993 | 993 | sm->memdevice.part = get_string(sl_any, sm_data[0x1a]); |
994 | 994 | } |
995 | if(data_len >= 0x20 && sm->memdevice.size == (0x7fff << 10)) { | |
996 | sm->memdevice.size = (READ_MEM32(sm_data + 0x1c) & 0x7fffffff) << 10; | |
997 | } | |
995 | 998 | break; |
996 | 999 | |
997 | 1000 | case sm_memerror: |