|
|
99c779 |
From 51610718fd45b65d4cf458371e4d3b243dd8631f Mon Sep 17 00:00:00 2001
|
|
|
99c779 |
From: Dan Callaghan <dcallagh@redhat.com>
|
|
|
99c779 |
Date: Mon, 13 Jul 2015 14:32:12 +1000
|
|
|
99c779 |
Subject: [PATCH 17/26] scan S/390 devices in sysfs (#693)
|
|
|
99c779 |
|
|
|
99c779 |
---
|
|
|
99c779 |
src/core/Makefile | 6 +--
|
|
|
99c779 |
src/core/dasd.cc | 83 -----------------------------
|
|
|
99c779 |
src/core/dasd.h | 7 ---
|
|
|
99c779 |
src/core/main.cc | 7 +--
|
|
|
99c779 |
src/core/s390.cc | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
99c779 |
src/core/s390.h | 7 +++
|
|
|
99c779 |
src/core/sysfs.cc | 11 ++++
|
|
|
99c779 |
7 files changed, 181 insertions(+), 96 deletions(-)
|
|
|
99c779 |
delete mode 100644 src/core/dasd.cc
|
|
|
99c779 |
delete mode 100644 src/core/dasd.h
|
|
|
99c779 |
create mode 100644 src/core/s390.cc
|
|
|
99c779 |
create mode 100644 src/core/s390.h
|
|
|
99c779 |
|
|
|
99c779 |
diff --git a/src/core/Makefile b/src/core/Makefile
|
|
|
99c779 |
index 643067b..2d95a80 100644
|
|
|
99c779 |
--- a/src/core/Makefile
|
|
|
99c779 |
+++ b/src/core/Makefile
|
|
|
99c779 |
@@ -8,7 +8,7 @@ LDFLAGS=
|
|
|
99c779 |
LDSTATIC=
|
|
|
99c779 |
LIBS=
|
|
|
99c779 |
|
|
|
99c779 |
-OBJS = hw.o main.o print.o mem.o dmi.o device-tree.o cpuinfo.o osutils.o pci.o version.o cpuid.o ide.o cdrom.o pcmcia-legacy.o scsi.o dasd.o disk.o spd.o network.o isapnp.o pnp.o fb.o options.o usb.o sysfs.o display.o heuristics.o parisc.o cpufreq.o partitions.o blockio.o lvm.o ideraid.o pcmcia.o volumes.o mounts.o smp.o abi.o jedec.o dump.o fat.o virtio.o vio.o
|
|
|
99c779 |
+OBJS = hw.o main.o print.o mem.o dmi.o device-tree.o cpuinfo.o osutils.o pci.o version.o cpuid.o ide.o cdrom.o pcmcia-legacy.o scsi.o s390.o disk.o spd.o network.o isapnp.o pnp.o fb.o options.o usb.o sysfs.o display.o heuristics.o parisc.o cpufreq.o partitions.o blockio.o lvm.o ideraid.o pcmcia.o volumes.o mounts.o smp.o abi.o jedec.o dump.o fat.o virtio.o vio.o
|
|
|
99c779 |
ifeq ($(SQLITE), 1)
|
|
|
99c779 |
OBJS+= db.o
|
|
|
99c779 |
endif
|
|
|
99c779 |
@@ -37,7 +37,7 @@ hw.o: hw.h osutils.h version.h config.h options.h heuristics.h
|
|
|
99c779 |
main.o: hw.h print.h version.h options.h mem.h dmi.h cpuinfo.h cpuid.h
|
|
|
99c779 |
main.o: device-tree.h pci.h pcmcia.h pcmcia-legacy.h ide.h scsi.h spd.h
|
|
|
99c779 |
main.o: network.h isapnp.h fb.h usb.h sysfs.h display.h parisc.h cpufreq.h
|
|
|
99c779 |
-main.o: ideraid.h mounts.h smp.h abi.h dasd.h virtio.h pnp.h vio.h
|
|
|
99c779 |
+main.o: ideraid.h mounts.h smp.h abi.h s390.h virtio.h pnp.h vio.h
|
|
|
99c779 |
print.o: print.h hw.h options.h version.h osutils.h config.h
|
|
|
99c779 |
mem.o: version.h config.h mem.h hw.h
|
|
|
99c779 |
dmi.o: version.h config.h dmi.h hw.h osutils.h
|
|
|
99c779 |
@@ -75,6 +75,6 @@ mounts.o: version.h mounts.h hw.h osutils.h
|
|
|
99c779 |
smp.o: version.h smp.h hw.h osutils.h
|
|
|
99c779 |
abi.o: version.h abi.h hw.h osutils.h
|
|
|
99c779 |
jedec.o: jedec.h
|
|
|
99c779 |
-dasd.o: dasd.h disk.h hw.h osutils.h
|
|
|
99c779 |
+s390.o: hw.h sysfs.h disk.h s390.h
|
|
|
99c779 |
virtio.o: version.h hw.h sysfs.h disk.h virtio.h
|
|
|
99c779 |
vio.o: version.h hw.h sysfs.h vio.h
|
|
|
99c779 |
diff --git a/src/core/dasd.cc b/src/core/dasd.cc
|
|
|
99c779 |
deleted file mode 100644
|
|
|
99c779 |
index 626b8a8..0000000
|
|
|
99c779 |
--- a/src/core/dasd.cc
|
|
|
99c779 |
+++ /dev/null
|
|
|
99c779 |
@@ -1,83 +0,0 @@
|
|
|
99c779 |
-#include "disk.h"
|
|
|
99c779 |
-#include "osutils.h"
|
|
|
99c779 |
-#include "dasd.h"
|
|
|
99c779 |
-#include <glob.h>
|
|
|
99c779 |
-#include <string.h>
|
|
|
99c779 |
-#include <fcntl.h>
|
|
|
99c779 |
-#include <unistd.h>
|
|
|
99c779 |
-#include <inttypes.h>
|
|
|
99c779 |
-#include <sys/ioctl.h>
|
|
|
99c779 |
-#include <linux/fs.h>
|
|
|
99c779 |
-#include <map>
|
|
|
99c779 |
-
|
|
|
99c779 |
-using namespace std;
|
|
|
99c779 |
-
|
|
|
99c779 |
-/*Read only block devices, not partitions*/
|
|
|
99c779 |
-#define DEV_PATTERN "/dev/dasd[a-z]"
|
|
|
99c779 |
-#define SYSFS_PREFIX "/sys/block/"
|
|
|
99c779 |
-
|
|
|
99c779 |
-bool scan_dasd(hwNode & n)
|
|
|
99c779 |
-{
|
|
|
99c779 |
- size_t dev_num;
|
|
|
99c779 |
- char *dev_name;
|
|
|
99c779 |
- glob_t devices;
|
|
|
99c779 |
- uint64_t capacity;
|
|
|
99c779 |
-
|
|
|
99c779 |
- /* These correspond to filenames in the device/ sub-directory
|
|
|
99c779 |
- of each device
|
|
|
99c779 |
- To read other attributes, simply add the attribute here and modify the device object
|
|
|
99c779 |
- appropriately.
|
|
|
99c779 |
- */
|
|
|
99c779 |
- const char* attribs[] = {"devtype", "vendor"};
|
|
|
99c779 |
-
|
|
|
99c779 |
- std::vector<std::string> sysfs_attribs(attribs, attribs+2);
|
|
|
99c779 |
- std::map<std::string, std::string> dasd_attribs;
|
|
|
99c779 |
-
|
|
|
99c779 |
- hwNode *core = n.getChild("core");
|
|
|
99c779 |
-
|
|
|
99c779 |
- /* Probe the sysfs for this device*/
|
|
|
99c779 |
- if(glob(DEV_PATTERN, 0, NULL, &devices)!=0)
|
|
|
99c779 |
- return false;
|
|
|
99c779 |
- else
|
|
|
99c779 |
- {
|
|
|
99c779 |
- for(dev_num=0;dev_num
|
|
|
99c779 |
- {
|
|
|
99c779 |
- dev_name = basename(devices.gl_pathv[dev_num]);
|
|
|
99c779 |
- for (std::vector<std::string>::iterator it = sysfs_attribs.begin(); it != sysfs_attribs.end(); ++it)
|
|
|
99c779 |
- {
|
|
|
99c779 |
- std::string attrib_fname = std::string(SYSFS_PREFIX) + dev_name + "/device/" + *it;
|
|
|
99c779 |
- std::vector<std::string> lines;
|
|
|
99c779 |
- if (loadfile(attrib_fname, lines) && (lines.size() > 0))
|
|
|
99c779 |
- {
|
|
|
99c779 |
- dasd_attribs[*it] = lines[0];
|
|
|
99c779 |
- }
|
|
|
99c779 |
- else
|
|
|
99c779 |
- {
|
|
|
99c779 |
- dasd_attribs[*it] = " ";
|
|
|
99c779 |
- }
|
|
|
99c779 |
- }
|
|
|
99c779 |
-
|
|
|
99c779 |
- hwNode device = hwNode("disk", hw::disk);
|
|
|
99c779 |
- device.setDescription("DASD Device");
|
|
|
99c779 |
- device.setVendor(dasd_attribs["vendor"]);
|
|
|
99c779 |
- device.setProduct(dasd_attribs["devtype"]);
|
|
|
99c779 |
- device.setLogicalName(devices.gl_pathv[dev_num]);
|
|
|
99c779 |
-
|
|
|
99c779 |
- /* Get the capacity*/
|
|
|
99c779 |
- int fd = open(devices.gl_pathv[dev_num], O_RDONLY|O_NONBLOCK);
|
|
|
99c779 |
- if (ioctl(fd, BLKGETSIZE64, &capacity) != 0)
|
|
|
99c779 |
- capacity=0;
|
|
|
99c779 |
- close(fd);
|
|
|
99c779 |
-
|
|
|
99c779 |
- device.setSize(capacity);
|
|
|
99c779 |
-
|
|
|
99c779 |
- /* Non-determinant*/
|
|
|
99c779 |
- device.setPhysId(0);
|
|
|
99c779 |
- scan_disk(device);
|
|
|
99c779 |
-
|
|
|
99c779 |
- hwNode *parent = core->addChild(device);
|
|
|
99c779 |
- parent->claim();
|
|
|
99c779 |
- }
|
|
|
99c779 |
- }
|
|
|
99c779 |
- return true;
|
|
|
99c779 |
-}
|
|
|
99c779 |
diff --git a/src/core/dasd.h b/src/core/dasd.h
|
|
|
99c779 |
deleted file mode 100644
|
|
|
99c779 |
index ad11c18..0000000
|
|
|
99c779 |
--- a/src/core/dasd.h
|
|
|
99c779 |
+++ /dev/null
|
|
|
99c779 |
@@ -1,7 +0,0 @@
|
|
|
99c779 |
-#ifndef _DASD_H_
|
|
|
99c779 |
-#define _DASD_H_
|
|
|
99c779 |
-
|
|
|
99c779 |
-#include "hw.h"
|
|
|
99c779 |
-
|
|
|
99c779 |
-bool scan_dasd(hwNode & n);
|
|
|
99c779 |
-#endif
|
|
|
99c779 |
diff --git a/src/core/main.cc b/src/core/main.cc
|
|
|
99c779 |
index 3c88f4c..c9a6e44 100644
|
|
|
99c779 |
--- a/src/core/main.cc
|
|
|
99c779 |
+++ b/src/core/main.cc
|
|
|
99c779 |
@@ -45,7 +45,7 @@
|
|
|
99c779 |
#include "vio.h"
|
|
|
99c779 |
#include "smp.h"
|
|
|
99c779 |
#include "abi.h"
|
|
|
99c779 |
-#include "dasd.h"
|
|
|
99c779 |
+#include "s390.h"
|
|
|
99c779 |
|
|
|
99c779 |
#include <unistd.h>
|
|
|
99c779 |
#include <stdio.h>
|
|
|
99c779 |
@@ -132,8 +132,9 @@ bool scan_system(hwNode & system)
|
|
|
99c779 |
status("SCSI");
|
|
|
99c779 |
if (enabled("scsi"))
|
|
|
99c779 |
scan_scsi(computer);
|
|
|
99c779 |
- if (enabled("dasd"))
|
|
|
99c779 |
- scan_dasd(computer);
|
|
|
99c779 |
+ status("S/390 devices");
|
|
|
99c779 |
+ if (enabled("s390"))
|
|
|
99c779 |
+ scan_s390_devices(computer);
|
|
|
99c779 |
if (enabled("mounts"))
|
|
|
99c779 |
scan_mounts(computer);
|
|
|
99c779 |
status("Network interfaces");
|
|
|
99c779 |
diff --git a/src/core/s390.cc b/src/core/s390.cc
|
|
|
99c779 |
new file mode 100644
|
|
|
99c779 |
index 0000000..81b2740
|
|
|
99c779 |
--- /dev/null
|
|
|
99c779 |
+++ b/src/core/s390.cc
|
|
|
99c779 |
@@ -0,0 +1,156 @@
|
|
|
99c779 |
+#include "hw.h"
|
|
|
99c779 |
+#include "sysfs.h"
|
|
|
99c779 |
+#include "disk.h"
|
|
|
99c779 |
+#include "s390.h"
|
|
|
99c779 |
+#include <string.h>
|
|
|
99c779 |
+
|
|
|
99c779 |
+using namespace std;
|
|
|
99c779 |
+
|
|
|
99c779 |
+struct ccw_device_def {
|
|
|
99c779 |
+ const char *cutype;
|
|
|
99c779 |
+ const char *devtype;
|
|
|
99c779 |
+ const char *description;
|
|
|
99c779 |
+ hw::hwClass hwClass;
|
|
|
99c779 |
+};
|
|
|
99c779 |
+struct ccw_device_def ccw_device_defs[] =
|
|
|
99c779 |
+{
|
|
|
99c779 |
+ {"1403", "", "Line printer", hw::printer},
|
|
|
99c779 |
+ {"1731/01", "1732/01", "OSA-Express QDIO channel", hw::network},
|
|
|
99c779 |
+ {"1731/02", "1732/02", "OSA-Express intraensemble data network (IEDN) channel", hw::network},
|
|
|
99c779 |
+ {"1731/02", "1732/03", "OSA-Express intranode management network (NMN) channel", hw::network},
|
|
|
99c779 |
+ {"1731/05", "1732/05", "HiperSockets network", hw::network},
|
|
|
99c779 |
+ {"1731/06", "1732/06", "OSA-Express Network Control Program channel", hw::network},
|
|
|
99c779 |
+ {"1731", "1732", "Network adapter", hw::network},
|
|
|
99c779 |
+ {"1750", "3380", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"1750", "3390", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"2105", "3380", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"2105", "3390", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"2107", "3380", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"2107", "3390", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"2540", "", "Card reader/punch", hw::generic},
|
|
|
99c779 |
+ {"3088/01", "", "P/390 LAN channel station card", hw::communication},
|
|
|
99c779 |
+ {"3088/08", "", "Channel-to-Channel device", hw::network},
|
|
|
99c779 |
+ {"3088/1e", "", "Channel-to-Channel FICON adapter", hw::network},
|
|
|
99c779 |
+ {"3088/1f", "", "Channel-to-Channel ESCON adapter", hw::network},
|
|
|
99c779 |
+ {"3088/60", "", "LAN channel station OSA-2 card", hw::network},
|
|
|
99c779 |
+ {"3174", "", "3174 Establishment Controller", hw::generic},
|
|
|
99c779 |
+ {"3215", "", "3215 terminal", hw::communication},
|
|
|
99c779 |
+ {"3270", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3271", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3272", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3273", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3274", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3275", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3276", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3277", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3278", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3279", "", "3270 terminal", hw::communication},
|
|
|
99c779 |
+ {"3480", "3480", "3480 tape drive", hw::storage},
|
|
|
99c779 |
+ {"3490", "3490", "3490 tape drive", hw::storage},
|
|
|
99c779 |
+ {"3590", "3590", "3590 tape drive", hw::storage},
|
|
|
99c779 |
+ {"3592", "3592", "3592 tape drive", hw::storage},
|
|
|
99c779 |
+ {"3832", "", "Virtual network device", hw::network},
|
|
|
99c779 |
+ {"3880", "3370", "Direct attached storage device (FBA mode)", hw::disk},
|
|
|
99c779 |
+ {"3880", "3380", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"3990", "3380", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"3990", "3390", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+ {"6310", "9336", "Direct attached storage device (FBA mode)", hw::disk},
|
|
|
99c779 |
+ {"9343", "9345", "Direct attached storage device (ECKD mode)", hw::disk},
|
|
|
99c779 |
+};
|
|
|
99c779 |
+
|
|
|
99c779 |
+static void ccw_devtype(hwNode & device, string cutype, string devtype)
|
|
|
99c779 |
+{
|
|
|
99c779 |
+ for (size_t i = 0; i < sizeof(ccw_device_defs) / sizeof(ccw_device_def); i ++)
|
|
|
99c779 |
+ {
|
|
|
99c779 |
+ ccw_device_def d = ccw_device_defs[i];
|
|
|
99c779 |
+ if (cutype.compare(0, strlen(d.cutype), d.cutype) == 0 &&
|
|
|
99c779 |
+ devtype.compare(0, strlen(d.devtype), d.devtype) == 0)
|
|
|
99c779 |
+ {
|
|
|
99c779 |
+ device.setClass(d.hwClass);
|
|
|
99c779 |
+ device.setDescription(d.description);
|
|
|
99c779 |
+ break;
|
|
|
99c779 |
+ }
|
|
|
99c779 |
+ }
|
|
|
99c779 |
+ if (!devtype.empty() && devtype != "n/a")
|
|
|
99c779 |
+ device.setProduct(devtype);
|
|
|
99c779 |
+}
|
|
|
99c779 |
+
|
|
|
99c779 |
+static bool scan_ccw(hwNode & n)
|
|
|
99c779 |
+{
|
|
|
99c779 |
+ vector < sysfs::entry > entries = sysfs::entries_by_bus("ccw");
|
|
|
99c779 |
+
|
|
|
99c779 |
+ if (entries.empty())
|
|
|
99c779 |
+ return false;
|
|
|
99c779 |
+
|
|
|
99c779 |
+ for (vector < sysfs::entry >::iterator it = entries.begin();
|
|
|
99c779 |
+ it != entries.end(); ++it)
|
|
|
99c779 |
+ {
|
|
|
99c779 |
+ const sysfs::entry & e = *it;
|
|
|
99c779 |
+
|
|
|
99c779 |
+ hwNode device("device");
|
|
|
99c779 |
+
|
|
|
99c779 |
+ ccw_devtype(device, e.string_attr("cutype"), e.string_attr("devtype"));
|
|
|
99c779 |
+ string vendor = hw::strip(e.string_attr("vendor"));
|
|
|
99c779 |
+ if (!vendor.empty())
|
|
|
99c779 |
+ device.setVendor(vendor);
|
|
|
99c779 |
+
|
|
|
99c779 |
+ string businfo = e.businfo();
|
|
|
99c779 |
+ if (!businfo.empty())
|
|
|
99c779 |
+ device.setBusInfo(businfo);
|
|
|
99c779 |
+
|
|
|
99c779 |
+ if (e.string_attr("online") != "1")
|
|
|
99c779 |
+ device.disable();
|
|
|
99c779 |
+
|
|
|
99c779 |
+ string driver = e.driver();
|
|
|
99c779 |
+ if (!driver.empty())
|
|
|
99c779 |
+ device.setConfig("driver", driver);
|
|
|
99c779 |
+
|
|
|
99c779 |
+ string devname = e.name_in_class("block");
|
|
|
99c779 |
+ if (!devname.empty())
|
|
|
99c779 |
+ {
|
|
|
99c779 |
+ device.setLogicalName(devname);
|
|
|
99c779 |
+ scan_disk(device);
|
|
|
99c779 |
+ }
|
|
|
99c779 |
+
|
|
|
99c779 |
+ device.claim();
|
|
|
99c779 |
+ n.addChild(device);
|
|
|
99c779 |
+ }
|
|
|
99c779 |
+
|
|
|
99c779 |
+ return true;
|
|
|
99c779 |
+}
|
|
|
99c779 |
+
|
|
|
99c779 |
+static bool scan_iucv(hwNode & n)
|
|
|
99c779 |
+{
|
|
|
99c779 |
+ vector < sysfs::entry > entries = sysfs::entries_by_bus("iucv");
|
|
|
99c779 |
+
|
|
|
99c779 |
+ if (entries.empty())
|
|
|
99c779 |
+ return false;
|
|
|
99c779 |
+
|
|
|
99c779 |
+ for (vector < sysfs::entry >::iterator it = entries.begin();
|
|
|
99c779 |
+ it != entries.end(); ++it)
|
|
|
99c779 |
+ {
|
|
|
99c779 |
+ const sysfs::entry & e = *it;
|
|
|
99c779 |
+
|
|
|
99c779 |
+ hwNode device(e.name());
|
|
|
99c779 |
+
|
|
|
99c779 |
+ string driver = e.driver();
|
|
|
99c779 |
+ if (!driver.empty())
|
|
|
99c779 |
+ device.setConfig("driver", driver);
|
|
|
99c779 |
+ if (driver == "hvc_iucv")
|
|
|
99c779 |
+ device.setDescription("z/VM IUCV hypervisor console");
|
|
|
99c779 |
+ else
|
|
|
99c779 |
+ device.setDescription("z/VM IUCV device");
|
|
|
99c779 |
+
|
|
|
99c779 |
+ device.claim();
|
|
|
99c779 |
+ n.addChild(device);
|
|
|
99c779 |
+ }
|
|
|
99c779 |
+
|
|
|
99c779 |
+ return true;
|
|
|
99c779 |
+}
|
|
|
99c779 |
+
|
|
|
99c779 |
+bool scan_s390_devices(hwNode & n)
|
|
|
99c779 |
+{
|
|
|
99c779 |
+ scan_ccw(n);
|
|
|
99c779 |
+ scan_iucv(n);
|
|
|
99c779 |
+ return true;
|
|
|
99c779 |
+}
|
|
|
99c779 |
diff --git a/src/core/s390.h b/src/core/s390.h
|
|
|
99c779 |
new file mode 100644
|
|
|
99c779 |
index 0000000..11aaec4
|
|
|
99c779 |
--- /dev/null
|
|
|
99c779 |
+++ b/src/core/s390.h
|
|
|
99c779 |
@@ -0,0 +1,7 @@
|
|
|
99c779 |
+#ifndef _S390_H_
|
|
|
99c779 |
+#define _S390_H_
|
|
|
99c779 |
+
|
|
|
99c779 |
+#include "hw.h"
|
|
|
99c779 |
+
|
|
|
99c779 |
+bool scan_s390_devices(hwNode & n);
|
|
|
99c779 |
+#endif
|
|
|
99c779 |
diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc
|
|
|
99c779 |
index a2eca6c..fb7f2bb 100644
|
|
|
99c779 |
--- a/src/core/sysfs.cc
|
|
|
99c779 |
+++ b/src/core/sysfs.cc
|
|
|
99c779 |
@@ -149,6 +149,17 @@ static string sysfstobusinfo(const string & path)
|
|
|
99c779 |
if (bustype == "vio")
|
|
|
99c779 |
return string("vio@") + basename(path.c_str());
|
|
|
99c779 |
|
|
|
99c779 |
+ if (bustype == "ccw")
|
|
|
99c779 |
+ return string("ccw@") + basename(path.c_str());
|
|
|
99c779 |
+
|
|
|
99c779 |
+ if (bustype == "ccwgroup")
|
|
|
99c779 |
+ {
|
|
|
99c779 |
+ // just report businfo for the first device in the group
|
|
|
99c779 |
+ // because the group doesn't really fit into lshw's tree model
|
|
|
99c779 |
+ string firstdev = realpath(path + "/cdev0");
|
|
|
99c779 |
+ return sysfstobusinfo(firstdev);
|
|
|
99c779 |
+ }
|
|
|
99c779 |
+
|
|
|
99c779 |
return "";
|
|
|
99c779 |
}
|
|
|
99c779 |
|
|
|
99c779 |
--
|
|
|
99c779 |
2.10.2
|
|
|
99c779 |
|