+- split patches.suse/early_userspace-instead-of-linuxrc
authorOlaf Hering <olh@suse.de>
Thu, 22 Jan 2004 19:03:17 +0000 (19:03 +0000)
committerOlaf Hering <olh@suse.de>
Thu, 22 Jan 2004 19:03:17 +0000 (19:03 +0000)
+  core and debug patch.

suse-commit: 336c2007f074ee9a7235cb9e3c1bb5b9db724456

usr/sbin/hotplug.c [deleted file]

diff --git a/usr/sbin/hotplug.c b/usr/sbin/hotplug.c
deleted file mode 100644 (file)
index e55c870..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#define BUFSIZE 12345
-int
-main(int argc, char **argv, char **envp)
-{
-       int fd, i;
-       char **ep = envp;
-       char *buf, *p;
-       buf = malloc(42);
-       if (!buf)
-               exit(1);
-       p = getenv("SEQNUM");
-       snprintf(buf, 42, "/events/dbg.%08u.%s", getpid(), p ? p : "");
-       if ((fd = open(buf, O_CREAT | O_WRONLY | O_TRUNC, 0644)) < 0) {
-               //perror(buf);
-               exit(1);
-       }
-       free(buf);
-       p = malloc(BUFSIZE);
-       buf = p;
-       for (i = 0; i < argc; ++i) {
-               buf += snprintf(buf, p + BUFSIZE - buf, " %s", argv[i]);
-               if (buf > p + BUFSIZE)
-                       goto full;
-       }
-       buf += snprintf(buf, p + BUFSIZE - buf, "\n");
-       if (buf > p + BUFSIZE)
-               goto full;
-       while (*ep) {
-               buf += snprintf(buf, p + BUFSIZE - buf, "%s\n", *ep++);
-               if (buf > p + BUFSIZE)
-                       break;
-       }
-      full:
-       buf = p;
-       write(fd, buf, strlen(buf));
-       close(fd);
-       free(buf);
-       return 0;
-}