From f99148d6f5a6f7b779675060ac2bf7a8570a3726 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 17 May 2018 16:05:39 +0200 Subject: rfkill: don't use lib/path It seems like crazy overkill for this trivial purpose. Signed-off-by: Karel Zak --- sys-utils/rfkill.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys-utils/rfkill.c') 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)) -- cgit v1.2.3-55-g7522