turbostat: Factor out common function to open file and exit on failure
authorJosh Triplett <josh@joshtriplett.org>
Wed, 21 Aug 2013 00:20:17 +0000 (17:20 -0700)
committerLen Brown <len.brown@intel.com>
Sun, 19 Jan 2014 03:34:09 +0000 (22:34 -0500)
commit57a42a34d126f2fe5d1f2f120c5f7a31ec65cd31
treed646c40a4e06e7737b12bcddbe4ac9796f748bbf
parent95aebc44e73b05d4e95774b983a63909de638808
turbostat: Factor out common function to open file and exit on failure

Several different functions in turbostat contain the same pattern of
opening a file and exiting on failure.  Factor out a common fopen_or_die
function for that.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c