Added slave flags to Sysfs.
authorFlorian Pose <fp@igh-essen.com>
Fri, 27 Oct 2006 13:20:16 +0000
changeset 458 6467f0f6e370
parent 457 2b4ba84b6058
child 459 f0da52cf6b5b
Added slave flags to Sysfs.
master/slave.c
--- a/master/slave.c	Fri Oct 27 12:45:44 2006 +0000
+++ b/master/slave.c	Fri Oct 27 13:20:16 2006 +0000
@@ -585,7 +585,10 @@
 
     off += sprintf(buffer + off, "State: ");
     off += ec_state_string(slave->current_state, buffer + off);
-    off += sprintf(buffer + off, "\nRing position: %i\n",
+    off += sprintf(buffer + off, "\nFlags: %s, %s\n",
+                   slave->online ? "online" : "OFFLINE",
+                   slave->error_flag ? "ERROR" : "ok");
+    off += sprintf(buffer + off, "Ring position: %i\n",
                    slave->ring_position);
     off += sprintf(buffer + off, "Advanced position: %i:%i\n",
                    slave->coupler_index, slave->coupler_subindex);