From bfab7e0c4fb8cef04e979d36786b0016e45c4ba6 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Fri, 4 Jan 2008 08:41:52 -0200 Subject: [PATCH] Added license information to improved fastinit Signed-off-by: Claudio Matsuoka --- Makefile | 6 +++--- README | 2 +- ffinit.c | 39 ++++++++++++++++++++++++++------------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 6357dbe5..487f0f4c 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ LIBS = .c.o: $(CC) -c $(CFLAGS) -o $*.o $< -all: finit finit-mdv +all: finit-mdv finit: finit.o $(LD) $(LDFLAGS) -o $@ $+ $(LIBS) @@ -16,8 +16,8 @@ finit: finit.o finit-mdv: finit-mdv.o $(LD) $(LDFLAGS) -o $@ $+ $(LIBS) -finit-mdv.o: ffinit.c - $(CC) -c $(CFLAGS) -DDIST_MDV -o $@ $+ +finit-mdv.o: ffinit.c Makefile + $(CC) -c $(CFLAGS) -DDIST_MDV -o $@ ffinit.c clean: rm -f *.o core *~ diff --git a/README b/README index 445f4047..f6afe4fd 100644 --- a/README +++ b/README @@ -6,7 +6,7 @@ finit.c is a reimplementation of the Asus Eeepc fastinit program based on its library calls. It tries to be an accurate re-creation and keeps the original bugs and lack of optimization. -ffinit.c is a fixed/optimized version with quirks for alternative linux +ffinit.c is a fixed/optimized version with quirks for alternative Linux distributions running on the Eeepc. diff --git a/ffinit.c b/ffinit.c index 057476b2..86d58186 100644 --- a/ffinit.c +++ b/ffinit.c @@ -1,7 +1,26 @@ - /* - * Improved fast init - */ +Improved fast init + +Copyright (c) 2008 Claudio Matsuoka + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ #include #include @@ -20,6 +39,8 @@ #include #include +#define VERSION "0.0" + #define DEBUG #ifdef DEBUG @@ -42,7 +63,7 @@ #define AGPDRV "intel-agp" #define SERVICES "/etc/rc" #define REMOUNT_ROOTFS_RW -#define START_UDEV +#define MAKE_DEVICES #else /* original Eeepc distribution */ #define RANDOMSEED "/var/lib/urandom/random-seed" #define SYSROOT "/mnt" @@ -64,7 +85,6 @@ sigaction(sig, &sa, NULL); \ } while (0) -//#define touch(x) close(open((x), O_CREAT|O_WRONLY|O_TRUNC, 0644)) #define touch(x) mknod((x), S_IFREG|0644, 0) #define chardev(x,m,maj,min) mknod((x), S_IFCHR|(m), makedev((maj),(min))) @@ -105,7 +125,7 @@ int main() char *x; sigset_t nmask, nmask2; - debug("start"); + puts("finit " VERSION); chdir("/"); umask(022); @@ -121,10 +141,8 @@ int main() SETSIG(sa, SIGUSR1, shutdown, 0); SETSIG(sa, SIGUSR2, shutdown, 0); SETSIG(sa, SIGTERM, signal_handler, 0); - //SETSIG(sa, SIGKILL, signal_handler, 0); SETSIG(sa, SIGALRM, signal_handler, 0); SETSIG(sa, SIGHUP, signal_handler, 0); - //SETSIG(sa, SIGSTOP, signal_handler, SA_RESTART); SETSIG(sa, SIGCONT, signal_handler, SA_RESTART); SETSIG(sa, SIGCHLD, chld_handler, SA_RESTART); @@ -187,11 +205,6 @@ int main() umask(0022); #endif -#ifdef START_UDEV - // FIXME: udev is too slow, don't use it here - system("/etc/init.d/udev start"); -#endif - /* * Time adjustments */