summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-18 19:54:12 +0900
committer諏訪子 <suwako@076.moe>2024-06-18 19:54:12 +0900
commit79285280a55c9a420947620ae20d327563f9ce78 (patch)
treeb24bc237b45cb60ba4b9ce64ea951a37fc9cbcee /src
parentf28ae18cbc5a062557cf52d3ce2e08f815fe83d9 (diff)
.
Diffstat (limited to 'src')
-rw-r--r--src/uptime.c9
-rw-r--r--src/uptime.h2
2 files changed, 2 insertions, 9 deletions
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