summaryrefslogtreecommitdiff
path: root/handle_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'handle_devices.c')
-rw-r--r--handle_devices.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/handle_devices.c b/handle_devices.c
index 439ad27..7c854d0 100644
--- a/handle_devices.c
+++ b/handle_devices.c
@@ -37,7 +37,8 @@ void print_one_event(unsigned long long event_num)
int fptr = open(path_to_event, O_RDWR);
int initial_read = read(fptr, &event, event_size);
if (initial_read == -1) {
- fprintf(stderr, "PROBLEM READING FILE!\n");
+ fprintf(stderr, "PROBLEM READING FILE!\n \
+ Either your input number does not correlate to a device file or you do not have permission set up properly to read input files. (Most common)");
exit(-1);
}
char buffer[BUFSIZE+1] = {0};
@@ -76,7 +77,8 @@ void print_multiple_events(int num_events, unsigned long long event_nums[])
//make sure there was no error
int initial_read = read(event_fptrs[0], &event[0], event_size);
if (initial_read == -1) {
- fprintf(stderr, "PROBLEM READING FILE!\n");
+ fprintf(stderr, "PROBLEM READING FILE!\n \
+ Either your input number does not correlate to a device file or you do not have permission set up properly to read input files. (Most common)");
exit(-1);
}
//shared memory for all processes to get usec
@@ -101,7 +103,8 @@ void print_multiple_events(int num_events, unsigned long long event_nums[])
char buffer[BUFSIZE+1];
int initial_read = read(event_fptrs[0], &event[0], event_size);
if (initial_read == -1) {
- fprintf(stderr, "PROBLEM READING FILE!\n");
+ fprintf(stderr, "PROBLEM READING FILE!\n \
+ Either your input number does not correlate to a device file or you do not have permission set up properly to read input files. (Most common)");
exit(-1);
}
int string_size = 0;
@@ -126,7 +129,8 @@ void print_multiple_events(int num_events, unsigned long long event_nums[])
char buffer[BUFSIZE+1];
int initial_read = read(event_fptrs[i+1], &event[i+1], event_size);
if (initial_read == -1) {
- fprintf(stderr, "PROBLEM READING FILE!\n");
+ fprintf(stderr, "PROBLEM READING FILE!\n \
+ Either your input number does not correlate to a device file or you do not have permission set up properly to read input files. (Most common)");
exit(-1);
}
int string_size = 0;