diff options
author | Robert Swiecki <robert@swiecki.net> | 2018-03-02 03:20:39 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2018-03-02 03:20:39 +0100 |
commit | fe6f15cc14e1efcb54334a95ecfdbd7d6296a023 (patch) | |
tree | 7489bb9aa1f808a43cc457bd5eded8840b370a12 /libhfcommon | |
parent | 04dcac30bf872c0d3523fb5dd74eb629cacaf490 (diff) | |
download | honggfuzz-fe6f15cc14e1efcb54334a95ecfdbd7d6296a023.tar.gz |
linux/perf: prettify reading of intel_pt/intel_bts sys files
Diffstat (limited to 'libhfcommon')
-rw-r--r-- | libhfcommon/files.c | 2 | ||||
-rw-r--r-- | libhfcommon/files.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libhfcommon/files.c b/libhfcommon/files.c index f5b04e05..75e1f255 100644 --- a/libhfcommon/files.c +++ b/libhfcommon/files.c @@ -45,7 +45,7 @@ #include "libhfcommon/log.h" #include "libhfcommon/util.h" -ssize_t files_readFileToBufMax(char* fileName, uint8_t* buf, size_t fileMaxSz) { +ssize_t files_readFileToBufMax(const char* fileName, uint8_t* buf, size_t fileMaxSz) { int fd = TEMP_FAILURE_RETRY(open(fileName, O_RDONLY | O_CLOEXEC)); if (fd == -1) { PLOG_W("Couldn't open '%s' for R/O", fileName); diff --git a/libhfcommon/files.h b/libhfcommon/files.h index 6b126d13..1ebdebaf 100644 --- a/libhfcommon/files.h +++ b/libhfcommon/files.h @@ -30,7 +30,7 @@ #include <stdint.h> #include <unistd.h> -extern ssize_t files_readFileToBufMax(char* fileName, uint8_t* buf, size_t fileMaxSz); +extern ssize_t files_readFileToBufMax(const char* fileName, uint8_t* buf, size_t fileMaxSz); extern bool files_writeBufToFile( const char* fileName, const uint8_t* buf, size_t fileSz, int flags); |