From: John L. <mov...@us...> - 2003-09-03 20:30:33
|
Update of /cvsroot/oprofile/oprofile/libop In directory sc8-pr-cvs1:/tmp/cvs-serv27264/libop Modified Files: op_events.h op_events.c Log Message: propogate event error back up Index: op_events.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libop/op_events.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -p -d -r1.19 -r1.20 --- op_events.h 8 Aug 2003 01:42:10 -0000 1.19 +++ op_events.h 3 Sep 2003 20:30:28 -0000 1.20 @@ -61,7 +61,7 @@ struct op_event { /** Return the known events list. Idempotent */ struct list_head * op_events(op_cpu cpu_type); -/** Find a given event */ +/** Find a given event, returns NULL on error */ struct op_event * op_find_event(op_cpu cpu_type, u8 nr); /** Find a given event by name */ Index: op_events.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/libop/op_events.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -p -d -r1.43 -r1.44 --- op_events.c 28 Aug 2003 19:00:16 -0000 1.43 +++ op_events.c 3 Sep 2003 20:30:28 -0000 1.44 @@ -486,11 +486,7 @@ struct op_event * op_find_event(op_cpu c event = find_event(nr); - if (event) - return event; - - fprintf(stderr, "oprofile: could not find event %d\n", nr); - exit(EXIT_FAILURE); + return event; } |