Skip to content

Commit

Permalink
Added Macros for device file names
Browse files Browse the repository at this point in the history
  • Loading branch information
kolrami committed Apr 8, 2014
1 parent d29dc3e commit 0ce0550
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/arch/arch_microblaze_linux.c
Expand Up @@ -31,7 +31,8 @@
#include <sys/ioctl.h>
#include "pthread.h"

#define PROC_CONTROL_DEV "/dev/reconos/proc-control"
#define PROC_CONTROL_DEV "/dev/reconos-proc-control"
#define OSIF_DEV "/dev/reconos-osif-%d"


/* == OSIF related functions ============================================ */
Expand All @@ -43,7 +44,7 @@ int reconos_osif_open(int num) {
if (num < 0)
return -1;

snprintf(dev, 25, "/dev/reconos/osif-%d", num);
snprintf(dev, 25, OSIF_DEV, num);
fd = open(dev, O_RDWR);
if (fd < 0)
panic("[reconos_core] error while opening osif %d\n", num);
Expand Down
5 changes: 3 additions & 2 deletions lib/arch/arch_zynq_linux.c
Expand Up @@ -31,7 +31,8 @@
#include <sys/ioctl.h>
#include "pthread.h"

#define PROC_CONTROL_DEV "/dev/reconos/proc-control"
#define PROC_CONTROL_DEV "/dev/reconos-proc-control"
#define OSIF_DEV "/dev/reconos-osif-%d"


/* == OSIF related functions ============================================ */
Expand All @@ -43,7 +44,7 @@ int reconos_osif_open(int num) {
if (num < 0)
return -1;

snprintf(dev, 25, "/dev/reconos/osif-%d", num);
snprintf(dev, 25, OSIF_DEV, num);
fd = open(dev, O_RDWR);
if (fd < 0)
panic("[reconos_core] error while opening osif %d\n", num);
Expand Down

0 comments on commit 0ce0550

Please sign in to comment.