Display requested state in slave info.
authorFlorian Pose <fp@igh-essen.com>
Tue, 09 Jan 2007 13:42:38 +0000
changeset 519 54787e1b57d4
parent 518 b6a1426ba724
child 520 d778acff9592
Display requested state in slave info.
master/slave.c
script/lsec.pl
--- a/master/slave.c	Tue Jan 09 12:56:03 2007 +0000
+++ b/master/slave.c	Tue Jan 09 13:42:38 2007 +0000
@@ -632,7 +632,9 @@
 
     off += sprintf(buffer + off, "State: ");
     off += ec_state_string(slave->current_state, buffer + off);
-    off += sprintf(buffer + off, "\nFlags: %s, %s\n",
+    off += sprintf(buffer + off, " (");
+    off += ec_state_string(slave->requested_state, buffer + off);
+    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",
--- a/script/lsec.pl	Tue Jan 09 12:56:03 2007 +0000
+++ b/script/lsec.pl	Tue Jan 09 13:42:38 2007 +0000
@@ -100,7 +100,7 @@
 			elsif ($line =~ /^Advanced position: (\d+:\d+)$/) {
 				$slave->{'advanced_position'} = $1;
 			}
-			elsif ($line =~ /^State: (.+)$/) {
+			elsif ($line =~ /^State: (.+) /) {
 				$slave->{'state'} = $1;
 			}
 			elsif ($line =~ /^Coupler: ([a-z]+)$/) {