Display requested state in slave info.
--- 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]+)$/) {