epics-modules/devlib2

pciread output can't be redirected in epics shell

krmpotic opened this issue · 8 comments

When I try to do:
epics> pciread 32 0x0 32 > /tmp/file

There is nothing in the file, and output is still displayed at ioc shell.

Redirection would be a useful feature for doing bigger register dumps

Looks like #include "epicsStdioRedirect.h" is missing.

Should be corrected with 1713cce. Most of the changes are the ensure that error messages are not redirected by stdout.

Looks like #include "epicsStdioRedirect.h" is missing.

/* epicsStdioRedirect.h */

/* This file is now obselete, and is likely to be
 * deleted in a future release of EPICS Base.
 *
 * Use the epicsStdio.h header file instead.
 */

I tested it and it works with 5d28689.
That was fast!

Depending on your EPICS base version you may still need epicsStdioRedirect. Test with R3.14.12 please.

Redirection does not work with 3.14.12.

A change like this could solve the problem with redirection in 3.14.12 and with epicsStdioRedirect.h being obsolete in 3.15+

+#include <epicsVersion.h>
+#ifndef EPICS_VERSION_INT
+#include <epicsStdioRedirect.h>
+#endif

Hi, is it still valid? Or can I close it?

I am not working on this anymore. Looks OK to close for me.