Skip to contentSkip to conversation

Unable to opendir /sys/bus/event_source/devices : No such file or directory

DISCUSSION Toralf Förster 2 participants 3 messages Jun 21, 2013

lore
Share & tools
lore
#0 lore raw

Wasn't aware of this message before - and got it now when running trinity within a 32 bit user-mode-linux.

Is that directory helpful for trinity ?

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
#1 lore raw
Quoted 4 lines · Toralf Förster

Wasn't aware of this message before - and got it now when running trinity within a 32 bit user-mode-linux.

Is that directory helpful for trinity ?

It is used when coming up with possible events for the perf_event_open() syscall.

It's not fatal if the directory doesn't exist.

I should probably remove the error message (or make it only show up at high verbosity levels?).

A patch that removes the message is included below.

syscalls/perf_event_open.c +0 -3
index cf10134..ef8cb4f 100644
@@ -223,9 +223,6 @@ static int init_pmus(void) {
 
 	dir=opendir("/sys/bus/event_source/devices");
 	if (dir==NULL) {
-		fprintf(stderr,"Unable to opendir "
-			"/sys/bus/event_source/devices : %s\n",
-			strerror(errno));
 		return -1;
 	}
 
#2 lore raw
Quoted 2 lines · Vince Weaver

I should probably remove the error message (or make it only show up at high verbosity levels?).

less verbose at least, otherwise it is just irritating

Quoted 1 line

A patch that removes the message is included below.

thx

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3