# HG changeset patch # User Florian Pose # Date 1144759880 0 # Node ID af570302dceebac9e80ec98c1323e95b1864e587 # Parent 2fc86cec12dfc161ae099e33350d995c2fcfb39f Slave (special) type in SysFS diff -r 2fc86cec12df -r af570302dcee master/slave.c --- a/master/slave.c Tue Apr 11 10:17:30 2006 +0000 +++ b/master/slave.c Tue Apr 11 12:51:20 2006 +0000 @@ -33,6 +33,7 @@ EC_SYSFS_READ_ATTR(vendor_name); EC_SYSFS_READ_ATTR(product_name); EC_SYSFS_READ_ATTR(product_desc); +EC_SYSFS_READ_ATTR(type); static struct attribute *def_attrs[] = { &attr_ring_position, @@ -40,6 +41,7 @@ &attr_vendor_name, &attr_product_name, &attr_product_desc, + &attr_type, NULL, }; @@ -1224,6 +1226,14 @@ if (slave->type) return sprintf(buffer, "%s\n", slave->type->description); } + else if (attr == &attr_type) { + if (slave->type) { + if (slave->type->special == EC_TYPE_BUS_COUPLER) + return sprintf(buffer, "coupler\n"); + else + return sprintf(buffer, "normal\n"); + } + } return 0; }