Adds support to the posix user-space lib to address RTDM-devices also with a 
(here meaningless) "/dev/" name prefix. Intended to increase user convenience 
slightly.

---
 src/skins/posix/rtdm.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Index: xenomai/src/skins/posix/rtdm.c
===================================================================
--- xenomai.orig/src/skins/posix/rtdm.c
+++ xenomai/src/skins/posix/rtdm.c
@@ -41,10 +41,15 @@ static inline int set_errno(int ret)
 int __wrap_open(const char *path, int oflag, ...)
 {
        int ret, oldtype;
+       char *rtdm_path = path;
 
        pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
 
-       ret = XENOMAI_SKINCALL2(__rtdm_muxid, __rtdm_open, path, oflag);
+       /* skip path prefix for RTDM invocation */
+       if (strncmp(path, "/dev/", 5) == 0)
+               rtdm_path += 5;
+
+       ret = XENOMAI_SKINCALL2(__rtdm_muxid, __rtdm_open, rtdm_path, oflag);
 
        pthread_setcanceltype(oldtype, NULL);
 

--

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to