Fixed annoying fprintf in ecrt_slave_config_emerg_pop(). stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Wed, 06 Feb 2013 15:58:00 +0100
branchstable-1.5
changeset 2507 4ccf7634e664
parent 2506 ab9a6e109951
child 2508 6b21b3f88a9a
Fixed annoying fprintf in ecrt_slave_config_emerg_pop().
lib/slave_config.c
--- a/lib/slave_config.c	Tue Feb 05 17:08:33 2013 +0100
+++ b/lib/slave_config.c	Wed Feb 06 15:58:00 2013 +0100
@@ -482,8 +482,10 @@
 
     ret = ioctl(sc->master->fd, EC_IOCTL_SC_EMERG_POP, &io);
     if (EC_IOCTL_IS_ERROR(ret)) {
-        fprintf(stderr, "Failed to get emergency message: %s\n",
-                strerror(EC_IOCTL_ERRNO(ret)));
+        if (EC_IOCTL_ERRNO(ret) != ENOENT) {
+            fprintf(stderr, "Failed to get emergency message: %s\n",
+                    strerror(EC_IOCTL_ERRNO(ret)));
+        }
         return -EC_IOCTL_ERRNO(ret);
     }