From f1b71c9fe7dbb4886588a036399cf5ebe16b7c47 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 11:44:11 +0200 Subject: removed top level directory --- src/hostname.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/hostname.c (limited to 'src/hostname.c') diff --git a/src/hostname.c b/src/hostname.c new file mode 100644 index 0000000..6a55309 --- /dev/null +++ b/src/hostname.c @@ -0,0 +1,16 @@ +#include +#include "buffer.h" +#include "exit.h" + +char host[256]; + +int main() +{ + host[0] = 0; /* sigh */ + gethostname(host,sizeof(host)); + host[sizeof(host) - 1] = 0; + buffer_puts(buffer_1small,host); + buffer_puts(buffer_1small,"\n"); + buffer_flush(buffer_1small); + _exit(0); +} -- cgit v1.2.3