Minor fix: Output of SysFS accepting new slave state.
authorFlorian Pose <fp@igh-essen.com>
Fri, 04 Aug 2006 09:35:32 +0000
changeset 333 2b15335f9f35
parent 332 e16093374dfd
child 334 2be97e069602
Minor fix: Output of SysFS accepting new slave state.
master/slave.c
--- a/master/slave.c	Thu Aug 03 20:11:20 2006 +0000
+++ b/master/slave.c	Fri Aug 04 09:35:32 2006 +0000
@@ -849,6 +849,7 @@
     ec_slave_t *slave = container_of(kobj, ec_slave_t, kobj);
 
     if (attr == &attr_state) {
+        char state[25];
         if (!strcmp(buffer, "INIT\n"))
             slave->requested_state = EC_SLAVE_STATE_INIT;
         else if (!strcmp(buffer, "PREOP\n"))
@@ -862,8 +863,9 @@
             return -EINVAL;
         }
 
+        ec_state_string(slave->requested_state, state);
         EC_INFO("Accepted new state %s for slave %i.\n",
-                buffer, slave->ring_position);
+                state, slave->ring_position);
         slave->error_flag = 0;
         return size;
     }