From 79285280a55c9a420947620ae20d327563f9ce78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Tue, 18 Jun 2024 19:54:12 +0900 Subject: . --- src/uptime.c | 9 ++------- src/uptime.h | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/uptime.c b/src/uptime.c index 49161c9..22b8356 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -21,18 +21,13 @@ void run_uptime_command(const char *command) { pclose(p); } -#ifndef __NetBSD__ void display_days() { run_uptime_command("uptime | awk '{print $3}' && echo \" days\""); } -#endif void display_time() { -#if defined(__NetBSD__) - run_uptime_command("uptime | awk '{print $3}' | sed 's/,//' | " - "sed 's/:/ hours, /' && echo \" mins\""); -#else + /* run_uptime_command("uptime | awk '{print $3}' | sed 's/,//' | " */ + /* "sed 's/:/ hours, /' && echo \" mins\""); */ run_uptime_command("uptime | awk '{print $5}' | sed 's/,//' | " "sed 's/:/ hours, /' && echo \" mins\""); -#endif } diff --git a/src/uptime.h b/src/uptime.h index 74e0afe..12ee668 100644 --- a/src/uptime.h +++ b/src/uptime.h @@ -1,9 +1,7 @@ #ifndef UPTIME_H #define UPTIME_H -#ifndef __NetBSD__ void display_days(); -#endif void display_time(); #endif -- cgit v1.2.3