diff options
author | Karel Zak | 2018-05-17 16:05:39 +0200 |
---|---|---|
committer | Karel Zak | 2018-06-21 13:07:46 +0200 |
commit | f99148d6f5a6f7b779675060ac2bf7a8570a3726 (patch) | |
tree | 91bb8a7757abb9807014309b5789e6f892c33e03 /sys-utils/rfkill.c | |
parent | chmem: use new ul_path_* API (diff) | |
download | kernel-qcow2-util-linux-f99148d6f5a6f7b779675060ac2bf7a8570a3726.tar.gz kernel-qcow2-util-linux-f99148d6f5a6f7b779675060ac2bf7a8570a3726.tar.xz kernel-qcow2-util-linux-f99148d6f5a6f7b779675060ac2bf7a8570a3726.zip |
rfkill: don't use lib/path
It seems like crazy overkill for this trivial purpose.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/rfkill.c')
-rw-r--r-- | sys-utils/rfkill.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c index d87815a25..a93e8ba83 100644 --- a/sys-utils/rfkill.c +++ b/sys-utils/rfkill.c @@ -37,7 +37,6 @@ #include "timeutils.h" #include "widechar.h" #include "xalloc.h" -#include "path.h" /* @@ -274,9 +273,12 @@ failed: static const char *get_sys_attr(uint32_t idx, const char *attr) { static char name[128]; - FILE *f = path_fopen("r", 0, _PATH_SYS_RFKILL "/rfkill%u/%s", idx, attr); + char path[PATH_MAX]; + FILE *f; char *p; + snprintf(path, sizeof(path), _PATH_SYS_RFKILL "/rfkill%u/%s", idx, attr); + f = fopen(path, "r"); if (!f) goto done; if (!fgets(name, sizeof(name), f)) |