Renamed Sysfs attributes.
authorFlorian Pose <fp@igh-essen.com>
Tue, 25 Jul 2006 10:05:04 +0000
changeset 315 119f967aead8
parent 314 26023e414f5c
child 316 23f501274ddf
Renamed Sysfs attributes.
master/domain.c
master/slave.c
script/ec_list.pl
--- a/master/domain.c	Tue Jul 25 10:04:51 2006 +0000
+++ b/master/domain.c	Tue Jul 25 10:05:04 2006 +0000
@@ -53,10 +53,10 @@
 
 /** \cond */
 
-EC_SYSFS_READ_ATTR(data_size);
+EC_SYSFS_READ_ATTR(image_size);
 
 static struct attribute *def_attrs[] = {
-    &attr_data_size,
+    &attr_image_size,
     NULL,
 };
 
@@ -345,7 +345,7 @@
 {
     ec_domain_t *domain = container_of(kobj, ec_domain_t, kobj);
 
-    if (attr == &attr_data_size) {
+    if (attr == &attr_image_size) {
         return sprintf(buffer, "%i\n", domain->data_size);
     }
 
--- a/master/slave.c	Tue Jul 25 10:04:51 2006 +0000
+++ b/master/slave.c	Tue Jul 25 10:05:04 2006 +0000
@@ -62,22 +62,22 @@
 /** \cond */
 
 EC_SYSFS_READ_ATTR(ring_position);
-EC_SYSFS_READ_ATTR(coupler_address);
-EC_SYSFS_READ_ATTR(vendor_name);
-EC_SYSFS_READ_ATTR(product_name);
-EC_SYSFS_READ_ATTR(product_desc);
-EC_SYSFS_READ_ATTR(sii_name);
-EC_SYSFS_READ_ATTR(type);
+EC_SYSFS_READ_ATTR(advanced_position);
+EC_SYSFS_READ_ATTR(vendor_name); // deprecated
+EC_SYSFS_READ_ATTR(product_name); // deprecated
+EC_SYSFS_READ_ATTR(product_desc); // deprecated
+EC_SYSFS_READ_ATTR(name);
+EC_SYSFS_READ_ATTR(type); // deprecated
 EC_SYSFS_READ_WRITE_ATTR(state);
 EC_SYSFS_READ_WRITE_ATTR(eeprom);
 
 static struct attribute *def_attrs[] = {
     &attr_ring_position,
-    &attr_coupler_address,
+    &attr_advanced_position,
     &attr_vendor_name,
     &attr_product_name,
     &attr_product_desc,
-    &attr_sii_name,
+    &attr_name,
     &attr_type,
     &attr_state,
     &attr_eeprom,
@@ -1353,7 +1353,7 @@
     if (attr == &attr_ring_position) {
         return sprintf(buffer, "%i\n", slave->ring_position);
     }
-    else if (attr == &attr_coupler_address) {
+    else if (attr == &attr_advanced_position) {
         return sprintf(buffer, "%i:%i\n", slave->coupler_index,
                        slave->coupler_subindex);
     }
@@ -1369,7 +1369,7 @@
         if (slave->type)
             return sprintf(buffer, "%s\n", slave->type->description);
     }
-    else if (attr == &attr_sii_name) {
+    else if (attr == &attr_name) {
         if (slave->eeprom_name)
             return sprintf(buffer, "%s\n", slave->eeprom_name);
     }
--- a/script/ec_list.pl	Tue Jul 25 10:04:51 2006 +0000
+++ b/script/ec_list.pl	Tue Jul 25 10:05:04 2006 +0000
@@ -84,8 +84,8 @@
 	$slave = {};
 	$slave->{'ring_position'} =
 	    &read_integer("$slave_dir/ring_position");
-	$slave->{'coupler_address'} =
-	    &read_string("$slave_dir/coupler_address");
+	$slave->{'advanced_position'} =
+	    &read_string("$slave_dir/advanced_position");
 	unless ($show_sii_naming) {
 	    $slave->{'vendor_name'} =
 		&read_string("$slave_dir/vendor_name");
@@ -95,8 +95,8 @@
 		&read_string("$slave_dir/product_desc");
 	}
 	else {
-	    $slave->{'sii_name'} =
-		&read_string("$slave_dir/sii_name");
+	    $slave->{'name'} =
+		&read_string("$slave_dir/name");
 	}
 	$slave->{'type'} =
 	    &read_string("$slave_dir/type");
@@ -114,13 +114,13 @@
 	}
 
 	$abs = sprintf "%i", $slave->{'ring_position'};
-	printf(" %3s %8s   ", $abs, $slave->{'coupler_address'});
+	printf(" %3s %8s   ", $abs, $slave->{'advanced_position'});
 	unless ($show_sii_naming) {
 	    printf("%-12s %-10s %s\n", $slave->{'vendor_name'},
 		   $slave->{'product_name'}, $slave->{'product_desc'});
 	}
 	else {
-	    printf("%s\n", $slave->{'sii_name'});
+	    printf("%s\n", $slave->{'name'});
 	}
     }
 }
@@ -183,7 +183,7 @@
 {
     print "Usage: ec_list [OPTIONS]\n";
     print "        -m <IDX>    Query master <IDX>.\n";
-    print "        -s          Show SII naming instead of";
+    print "        -s          Show EEPROM name instead of";
     print " vendor/product/description.\n";
     print "        -h          Show this help.\n";
     exit 0;