[hackers] [ubase] Inline the *_MAGIC defines to avoid a dependency on kernel_headers || sin

From: <git_AT_suckless.org>
Date: Mon, 14 Apr 2014 16:00:14 +0200

commit 6c19de185a77909c0573da214c07d88730c85918
Author: sin <sin_AT_2f30.org>
Date: Mon Apr 14 14:59:39 2014 +0100

    Inline the *_MAGIC defines to avoid a dependency on kernel_headers

diff --git a/switch_root.c b/switch_root.c
index e151a50..a9a0af8 100644
--- a/switch_root.c
+++ b/switch_root.c
_AT_@ -2,7 +2,6 @@
 #include <dirent.h>
 #include <fcntl.h>
 #include <limits.h>
-#include <linux/magic.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
_AT_@ -12,6 +11,9 @@
 #include <unistd.h>
 #include "util.h"
 
+#define RAMFS_MAGIC 0x858458f6 /* some random number */
+#define TMPFS_MAGIC 0x01021994
+
 static void
 delete_content(const char *dir, dev_t curdevice)
 {
Received on Mon Apr 14 2014 - 16:00:14 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 14 2014 - 16:12:13 CEST