diff options
author | abial <abial@FreeBSD.org> | 1999-02-12 20:36:13 +0000 |
---|---|---|
committer | abial <abial@FreeBSD.org> | 1999-02-12 20:36:13 +0000 |
commit | 35ae892d35e97cc238430bf3e32169128149f546 (patch) | |
tree | bb7a4b243a657d86bc84571a2b73ab96f25a2afe /release/picobsd | |
parent | a36bb76941a692c75575f75edde8496549fcc44b (diff) | |
download | FreeBSD-src-35ae892d35e97cc238430bf3e32169128149f546.zip FreeBSD-src-35ae892d35e97cc238430bf3e32169128149f546.tar.gz |
Merge from RELENG_3.
Diffstat (limited to 'release/picobsd')
25 files changed, 143 insertions, 85 deletions
diff --git a/release/picobsd/build/clean b/release/picobsd/build/clean index aa2330e..9ba009f 100755 --- a/release/picobsd/build/clean +++ b/release/picobsd/build/clean @@ -1,7 +1,7 @@ #! /bin/sh - # -# $Id: clean,v 1.6 1998/09/29 11:58:54 abial Exp $ +# $Id: clean,v 1.7 1998/10/15 21:39:58 abial Exp $ # set -e @@ -30,7 +30,7 @@ rm -f kernel kernel.kz fs.PICOBSD *.o *core *.db cd .. rm -rf help/tmp_hlp echo "===================== $0 tools started ====================" -for i in `ls -d tinyware/[a-z]*` tools/write_mfs_in_kernel tools/dumpnlist +for i in `ls -d tinyware/[a-z]*` tools/write_mfs_in_kernel do (cd ${i}; \ if [ -f Makefile ]; \ diff --git a/release/picobsd/build/populate b/release/picobsd/build/populate index 06abaae..37099ff 100755 --- a/release/picobsd/build/populate +++ b/release/picobsd/build/populate @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: populate,v 1.7 1999/01/14 23:14:46 abial Exp $ +# $Id: populate,v 1.8 1999/01/19 23:02:05 abial Exp $ # . ../Version @@ -51,10 +51,6 @@ then cd tmp_hlp;\ ar -cru help.a *;\ cp help.a /mnt/help.a) -elif [ "${TYPE}" != "router" ] -then - #cp ../../build/kvm_kernel.db /mnt/var/db/kvm_kernel.db - #rm ../../build/kvm_kernel.db fi echo "-> Making and installing crunch1..." @@ -69,9 +65,4 @@ fi cd ${pwd} -echo "-> Preparing kernel symbols list..." -if [ ! -f ../tools/dumpnlist/dumpnlist ] -then - (cd ../tools/dumpnlist; make) -fi (echo "-> Fixing permissions"; cd /mnt; chown -R root *) diff --git a/release/picobsd/dial/conf/PICOBSD b/release/picobsd/dial/conf/PICOBSD index 4be43f6..574a61f 100644 --- a/release/picobsd/dial/conf/PICOBSD +++ b/release/picobsd/dial/conf/PICOBSD @@ -1,5 +1,5 @@ # -# $Id: PICOBSD,v 1.4 1998/11/14 20:10:15 abial Exp $ +# $Id: PICOBSD,v 1.5 1999/01/14 23:15:39 abial Exp $ # machine "i386" cpu "I386_CPU" @@ -46,7 +46,7 @@ disk wd3 at wdc1 drive 1 options ATAPI #Enable ATAPI support for IDE bus options ATAPI_STATIC #Don't do it as an LKM -device wcd0 #IDE CD-ROM +device acd0 #IDE CD-ROM # syscons is the default console driver, resembling an SCO console diff --git a/release/picobsd/dial/lang/motd.en b/release/picobsd/dial/lang/motd.en index c96e853..b286a41 100644 --- a/release/picobsd/dial/lang/motd.en +++ b/release/picobsd/dial/lang/motd.en @@ -4,7 +4,7 @@ PicoBSD @VER@ (DIALUP) [31m([37m[1mo,o[m[31m)[37m [32m__ [31m\~/[37m Welcome to PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -You can find a short description of the [35mpico[37m +You can find a short description of the [35mpicoBSD[37m system in file /README. You can view it using "ee /README" or "more /README". There is also 'help' command which gives short description of each program. diff --git a/release/picobsd/dial/lang/motd.pl b/release/picobsd/dial/lang/motd.pl index bfecac1..791af1b 100644 --- a/release/picobsd/dial/lang/motd.pl +++ b/release/picobsd/dial/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (DIALUP) [31m([37m[1mo,o[m[31m)[37 [32m__ [31m\~/[37m Witamy w PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -W glownym katalogu w pliku README znajdziesz [35mpico[37m +W glownym katalogu w pliku README znajdziesz [35mpicoBSD[37m krotki opis systemu. Mozesz go obejrzec przy pomocy "more /README" lub "ee /README". Mozesz tez uzyskac krotki opis kazdego polecenia podajac 'help polecenie'. diff --git a/release/picobsd/isp/conf/PICOBSD b/release/picobsd/isp/conf/PICOBSD index 66c0249..36b13f9 100644 --- a/release/picobsd/isp/conf/PICOBSD +++ b/release/picobsd/isp/conf/PICOBSD @@ -1,5 +1,5 @@ # -# $Id: PICOBSD,v 1.8 1999/01/18 10:17:31 abial Exp $ +# $Id: PICOBSD,v 1.9 1999/02/10 02:26:04 des Exp $ # machine "i386" @@ -54,7 +54,7 @@ disk wd3 at wdc1 drive 1 options ATAPI #Enable ATAPI support for IDE bus options ATAPI_STATIC #Don't do it as an LKM -device wcd0 #IDE CD-ROM +device acd0 #IDE CD-ROM # syscons is the default console driver, resembling an SCO console @@ -104,11 +104,7 @@ device rp1 at isa? port 0x180 tty device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 device cy1 at isa? tty irq 11 iomem 0xd6000 iosiz 0x2000 -device ppc0 at isa? port? net irq 7 -controller ppbus0 -device nlpt0 at ppbus? -device plip0 at ppbus? -device ppi0 at ppbus? +device lpt0 at isa? port? tty irq 7 # Order is important here due to intrusive probes, do *not* alphabetize # this list of network interfaces until the probes have been fixed. diff --git a/release/picobsd/isp/crunch1/crunch.conf b/release/picobsd/isp/crunch1/crunch.conf index 2c8e103..390e391 100644 --- a/release/picobsd/isp/crunch1/crunch.conf +++ b/release/picobsd/isp/crunch1/crunch.conf @@ -1,5 +1,5 @@ # -# $Id: crunch.conf,v 1.4 1998/09/15 11:12:18 abial Exp $ +# $Id: crunch.conf,v 1.5 1999/01/19 23:10:34 abial Exp $ # # NOTE: the string "/usr/src" will be automatically replaced with the # correct value set in 'build' script - you should change it there @@ -27,7 +27,7 @@ srcdirs /usr/src/usr.sbin srcdirs /usr/src/libexec progs ash test echo hostname ln login getty -progs inetd telnetd stty w msg kget natd +progs inetd telnetd stty w msg kget natd reboot progs init fsck ifconfig df ps ns vm cat progs cp rm mkdir ls chmod chown progs sysctl route swapon pwd_mkdb dev_mkdb diff --git a/release/picobsd/isp/floppy.tree/etc/fstab b/release/picobsd/isp/floppy.tree/etc/fstab index ca519e8..64d34ca 100644 --- a/release/picobsd/isp/floppy.tree/etc/fstab +++ b/release/picobsd/isp/floppy.tree/etc/fstab @@ -1,4 +1,4 @@ -proc /proc procfs rw 0 0 +#proc /proc procfs rw 0 0 #/dev/fd0c /start_floppy ufs rw 1 1 #/dev/wd0s1 /dos msdos rw 0 0 #/dev/wcd0c /cdrom cd9660 ro,noauto 0 0 diff --git a/release/picobsd/isp/lang/motd.en b/release/picobsd/isp/lang/motd.en index 77a1949..86b4f8a 100644 --- a/release/picobsd/isp/lang/motd.en +++ b/release/picobsd/isp/lang/motd.en @@ -4,7 +4,7 @@ PicoBSD @VER@ (ISP-alpha) [31m([37m[1mo,o[m[31m)[37m [32m__ [31m\~/[37m Welcome to PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -You can find a short description of the [35mpico[37m +You can find a short description of the [35mpicoBSD[37m system in file /README. You can view it using "more /README". diff --git a/release/picobsd/isp/lang/motd.pl b/release/picobsd/isp/lang/motd.pl index 1ceed38..749792d 100644 --- a/release/picobsd/isp/lang/motd.pl +++ b/release/picobsd/isp/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (ISP-alpha) [31m([37m[1mo,o[m[31m)[37 [32m__ [31m\~/[37m Witamy w PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -W glownym katalogu w pliku README znajdziesz [35mpico[37m +W glownym katalogu w pliku README znajdziesz [35mpicoBSD[37m krotki opis systemu. Mozesz go obejrzec przy pomocy "more /README". diff --git a/release/picobsd/net/conf/PICOBSD b/release/picobsd/net/conf/PICOBSD index 1bf94db..8c56b28 100644 --- a/release/picobsd/net/conf/PICOBSD +++ b/release/picobsd/net/conf/PICOBSD @@ -1,5 +1,5 @@ # -# $Id: PICOBSD,v 1.8 1999/01/19 23:12:27 abial Exp $ +# $Id: PICOBSD,v 1.9 1999/02/10 02:26:04 des Exp $ # machine "i386" @@ -52,7 +52,7 @@ disk wd3 at wdc1 drive 1 options ATAPI #Enable ATAPI support for IDE bus options ATAPI_STATIC #Don't do it as an LKM -device wcd0 #IDE CD-ROM +device acd0 #IDE CD-ROM # syscons is the default console driver, resembling an SCO console @@ -68,11 +68,7 @@ device sio1 at isa? port "IO_COM2" tty irq 3 device sio2 at isa? disable port "IO_COM3" tty irq 5 device sio3 at isa? disable port "IO_COM4" tty irq 9 -device ppc0 at isa? port? net irq 7 -controller ppbus0 -device nlpt0 at ppbus? -device plip0 at ppbus? -device ppi0 at ppbus? +device lpt0 at isa? port? tty irq 7 # Order is important here due to intrusive probes, do *not* alphabetize # this list of network interfaces until the probes have been fixed. diff --git a/release/picobsd/net/crunch1/crunch.conf b/release/picobsd/net/crunch1/crunch.conf index 1114f069..f58a107 100644 --- a/release/picobsd/net/crunch1/crunch.conf +++ b/release/picobsd/net/crunch1/crunch.conf @@ -1,5 +1,5 @@ # -# $Id: crunch.conf,v 1.4 1998/09/15 11:12:25 abial Exp $ +# $Id: crunch.conf,v 1.5 1999/01/19 23:12:50 abial Exp $ # # NOTE: the string "/usr/src" will be automatically replaced with the # correct value set in 'build' script - you should change it there @@ -27,7 +27,7 @@ srcdirs /usr/src/usr.sbin srcdirs /usr/src/libexec progs ash test echo hostname ln login getty stty -progs inetd telnetd w msg kget +progs inetd telnetd w msg kget reboot progs init ifconfig df sps ns vm cat progs cp rm mknod chmod chown mkdir ls syslogd progs sysctl route pwd_mkdb dev_mkdb diff --git a/release/picobsd/net/floppy.tree/etc/fstab b/release/picobsd/net/floppy.tree/etc/fstab index ca519e8..64d34ca 100644 --- a/release/picobsd/net/floppy.tree/etc/fstab +++ b/release/picobsd/net/floppy.tree/etc/fstab @@ -1,4 +1,4 @@ -proc /proc procfs rw 0 0 +#proc /proc procfs rw 0 0 #/dev/fd0c /start_floppy ufs rw 1 1 #/dev/wd0s1 /dos msdos rw 0 0 #/dev/wcd0c /cdrom cd9660 ro,noauto 0 0 diff --git a/release/picobsd/net/lang/motd.en b/release/picobsd/net/lang/motd.en index f3f7744..9719418 100644 --- a/release/picobsd/net/lang/motd.en +++ b/release/picobsd/net/lang/motd.en @@ -4,7 +4,7 @@ PicoBSD @VER@ (NET) [31m([37m[1mo,o[m[31m)[37m [32m__ [31m\~/[37m Welcome to PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -You can find a short description of the [35mpico[37m +You can find a short description of the [35mpicoBSD[37m system in file /README. You can view it using "more /README". diff --git a/release/picobsd/net/lang/motd.pl b/release/picobsd/net/lang/motd.pl index 9f8cedf..4b1fcf5 100644 --- a/release/picobsd/net/lang/motd.pl +++ b/release/picobsd/net/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (NET) [31m([37m[1mo,o[m[31m)[37 [32m__ [31m\~/[37m Witamy w PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -W glownym katalogu w pliku README znajdziesz [35mpico[37m +W glownym katalogu w pliku README znajdziesz [35mpicoBSD[37m krotki opis systemu. Mozesz go obejrzec przy pomocy "more /README". diff --git a/release/picobsd/router/conf/PICOBSD b/release/picobsd/router/conf/PICOBSD index 7348c86..f900120 100644 --- a/release/picobsd/router/conf/PICOBSD +++ b/release/picobsd/router/conf/PICOBSD @@ -1,5 +1,5 @@ # -# $Id: PICOBSD,v 1.11 1999/01/18 10:17:35 abial Exp $ +# $Id: PICOBSD,v 1.12 1999/02/10 02:26:04 des Exp $ # machine "i386" @@ -54,7 +54,7 @@ disk fd0 at fdc0 drive 0 #options ATAPI #Enable ATAPI support for IDE bus #options ATAPI_STATIC #Don't do it as an LKM -#device wcd0 #IDE CD-ROM +#device acd0 #IDE CD-ROM # syscons is the default console driver, resembling an SCO console @@ -70,11 +70,7 @@ device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr device sio2 at isa? disable port "IO_COM3" tty irq 5 device sio3 at isa? disable port "IO_COM4" tty irq 9 -#device ppc0 at isa? port? net irq 7 -#controller ppbus0 -#device nlpt0 at ppbus? -#device plip0 at ppbus? -#device ppi0 at ppbus? +#device lpt0 at isa? port? tty irq 7 # Order is important here due to intrusive probes, do *not* alphabetize # this list of network interfaces until the probes have been fixed. diff --git a/release/picobsd/router/crunch1/crunch.conf b/release/picobsd/router/crunch1/crunch.conf index 967f5ae..445716c 100644 --- a/release/picobsd/router/crunch1/crunch.conf +++ b/release/picobsd/router/crunch1/crunch.conf @@ -1,5 +1,5 @@ # -# $Id: crunch.conf,v 1.2 1998/09/14 20:39:34 abial Exp $ +# $Id: crunch.conf,v 1.3 1998/09/15 07:35:43 abial Exp $ # # NOTE: the string "/usr/src" will be automatically replaced with the # correct value set in 'build' script - you should change it there @@ -17,7 +17,7 @@ srcdirs /usr/src/libexec progs hostname cat kget progs oinit ifconfig df sps ns vm msg -progs cp rm ls +progs cp rm ls reboot progs sysctl route progs mount umount progs kill natd diff --git a/release/picobsd/router/floppy.tree/etc/fstab b/release/picobsd/router/floppy.tree/etc/fstab index ca519e8..64d34ca 100644 --- a/release/picobsd/router/floppy.tree/etc/fstab +++ b/release/picobsd/router/floppy.tree/etc/fstab @@ -1,4 +1,4 @@ -proc /proc procfs rw 0 0 +#proc /proc procfs rw 0 0 #/dev/fd0c /start_floppy ufs rw 1 1 #/dev/wd0s1 /dos msdos rw 0 0 #/dev/wcd0c /cdrom cd9660 ro,noauto 0 0 diff --git a/release/picobsd/router/lang/motd.en b/release/picobsd/router/lang/motd.en index f2fd656..d0b0360 100644 --- a/release/picobsd/router/lang/motd.en +++ b/release/picobsd/router/lang/motd.en @@ -4,6 +4,6 @@ PicoBSD @VER@ (ROUTER) [31m([37m[1mo,o[m[31m)[37m [32m__ [31m\~/[37m Welcome to PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -You can find a short description of the [35mpico[37m +You can find a short description of the [35mpicoBSD[37m system in http://www.freebsd.org/~picobsd/. diff --git a/release/picobsd/router/lang/motd.pl b/release/picobsd/router/lang/motd.pl index cfdbba9..5acadf0 100644 --- a/release/picobsd/router/lang/motd.pl +++ b/release/picobsd/router/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (ROUTER) [31m([37m[1mo,o[m[31m)[37 [32m__ [31m\~/[37m Witamy w PicoBSD! [32m-->=[41m===[40m[31m\[37m [32m~~[37m [31md d[37m -Dokumentacja systemu znajduje sie na [35mpico[37m +Dokumentacja systemu znajduje sie na [35mpicoBSD[37m http://www.freebsd.org/~picobsd/. Wiecej informacji znajdziesz u autora (abial@freebsd.org). diff --git a/release/picobsd/tinyware/kget/README b/release/picobsd/tinyware/kget/README index 9490dd7..967356d 100644 --- a/release/picobsd/tinyware/kget/README +++ b/release/picobsd/tinyware/kget/README @@ -28,7 +28,7 @@ In simplest form you can do kget - -to list current in-core parameters, or +to list on stdout changes from original configuration, and kget /kernel.config @@ -38,4 +38,4 @@ it to /kernel.config file - it already contains required keywords. Andrzej Bialecki <abial@freebsd.org> -$Id: README,v 1.3 1998/11/01 20:19:40 abial Exp $ +$Id: README,v 1.4 1999/01/08 21:09:42 abial Exp $ diff --git a/release/picobsd/tinyware/kget/kget.c b/release/picobsd/tinyware/kget/kget.c index b8426e4..a7bd46c 100644 --- a/release/picobsd/tinyware/kget/kget.c +++ b/release/picobsd/tinyware/kget/kget.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kget.c,v 1.1 1999/01/08 21:09:42 abial Exp $ + * $Id: kget.c,v 1.2.2.1 1999/02/12 20:14:47 abial Exp $ */ #include <stdio.h> @@ -31,8 +31,10 @@ #include <sys/types.h> #include <sys/sysctl.h> #include "i386/isa/isa_device.h" +#include "i386/isa/pnp.h" struct isa_device *id; +struct pnp_cinfo *c; char *p; int @@ -40,7 +42,8 @@ main(int argc, char *argv[]) { int len,i; char *buf; - char *mib="machdep.uc_devlist"; + char *mib1="machdep.uc_devlist"; + char *mib2="machdep.uc_pnplist"; char name[9]; FILE *fout; @@ -60,14 +63,15 @@ main(int argc, char *argv[]) /* We use sysctlbyname, because the oid is unknown (OID_AUTO) */ + /* First, print the changes made to ISA devices */ /* get the buffer size */ - i=sysctlbyname(mib,NULL,&len,NULL,NULL); + i=sysctlbyname(mib1,NULL,&len,NULL,NULL); if(i) { perror("buffer sizing"); exit(-1); } buf=(char *)malloc(len*sizeof(char)); - i=sysctlbyname(mib,buf,&len,NULL,NULL); + i=sysctlbyname(mib1,buf,&len,NULL,NULL); if(i) { perror("retrieving data"); exit(-1); @@ -106,6 +110,53 @@ main(int argc, char *argv[]) } i+=sizeof(struct isa_device)+8; } + free(buf); + /* Now, print the changes to PnP override table */ + /* get the buffer size */ + i=sysctlbyname(mib2,NULL,&len,NULL,NULL); + if(i) { + perror("buffer sizing"); + exit(-1); + } + buf=(char *)malloc(len*sizeof(char)); + i=sysctlbyname(mib2,buf,&len,NULL,NULL); + if(i) { + perror("retrieving data"); + exit(-1); + } + i=0; + /* Print the PnP override table. Taken from userconfig.c */ + do { + c = (struct pnp_cinfo *)(buf+i); + if (c->csn >0 && c->csn != 255) { + int pmax, mmax; + char buf1[256]; + + if(c->enable==0) { + fprintf(fout,"pnp %d %d disable\n", + c->csn, c->ldn); + continue; + } + fprintf(fout,"pnp %d %d %s irq0 %d irq1 %d drq0 %d drq1 %d", + c->csn, c->ldn, + c->override ? "os":"bios", + c->irq[0], c->irq[1], c->drq[0], c->drq[1]); + if (c->flags) + fprintf(fout," flags 0x%lx",c->flags); + pmax=0; + while(c->port[pmax]!=0 && pmax<8) { + fprintf(fout," port%d %d",pmax,c->port[pmax]); + pmax++; + } + mmax=0; + while(c->mem[mmax].base!=0 && mmax<8) { + fprintf(fout," mem%d %d",mmax,c->mem[mmax].base); + mmax++; + } + fprintf(fout,"\n"); + } + + } while ((i+=sizeof(struct pnp_cinfo))<len); fprintf(fout,"q\n"); fclose(fout); free(buf); diff --git a/release/picobsd/tinyware/simple_httpd/Makefile b/release/picobsd/tinyware/simple_httpd/Makefile index 10ea6df..1c36b52 100644 --- a/release/picobsd/tinyware/simple_httpd/Makefile +++ b/release/picobsd/tinyware/simple_httpd/Makefile @@ -1,7 +1,8 @@ -# $Id: Makefile,v 1.1 1998/08/31 13:10:25 abial Exp $ +# $Id: Makefile,v 1.2.2.1 1999/02/05 12:21:41 abial Exp $ # PROG=simple_httpd SRCS= simple_httpd.c +CFLAGS+=-g NOMAN=yes .include <bsd.prog.mk> diff --git a/release/picobsd/tinyware/simple_httpd/README b/release/picobsd/tinyware/simple_httpd/README index ef0956e..a73d2bf 100644 --- a/release/picobsd/tinyware/simple_httpd/README +++ b/release/picobsd/tinyware/simple_httpd/README @@ -1,6 +1,23 @@ -Contributed by Marc Nicholas <marc@netstor.com> +This is a small HTTP server. This version is under BSD license. +It's very simple, yet sufficient for serving basic Web contents, +including ability to run CGI scripts. -This is a simple HTTP server. It is free for non-commercial -use only - see the source code for info on commercial licensing. +How to use it? +============== -$Id: README,v 1.1.1.1 1998/08/27 17:38:45 abial Exp $ +Compile, and run: + + simple_httpd <port> + +If you're root, the document directory will be /httphome. If you're +not, then first of all you need to use the <port> option (>1023). +Then, the document root will be ${HOME}/httphome. + +Log messages will be written out to /var/log/jhttpd.log . + +Credits +======= + +This program was contributed by Marc Nicholas <marc@netstor.com> + +$Id: README,v 1.2.2.1 1999/02/05 12:21:41 abial Exp $ diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c index 5b02244..8e7c55b 100644 --- a/release/picobsd/tinyware/simple_httpd/simple_httpd.c +++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c @@ -1,19 +1,31 @@ -/* simpleHTTPd (C) 1998 netSTOR Technologies, Inc. ("netSTOR") - FreeBSD port and additional work by Marc Nicholas <marc@netstor.com> - Based on work by:- - Thierry Leconte & Yury Shimanovsky - My Russian webserver writing friends :-) - - This is an HTTP daemon that will serve up HTML, text files, JPEGs, - GIFs and do simple CGI work. - - You may use this code for non-commercial distribution only. Commercial - distribution requires the express, written permission of netSTOR. No - warranty is implied or given -- use at your own risk! -*/ - -/* - * $Id: simple_httpd.c,v 1.1.1.1 1998/08/27 17:38:45 abial Exp $ +/*- + * SimpleHTTPd v1.0 - a very small, barebones HTTP server + * + * Copyright (c) 1998-1999 Marc Nicholas <marc@netstor.com> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: simple_httpd.c,v 1.2.2.1 1999/02/05 12:21:41 abial Exp $ */ #include <stdio.h> @@ -31,7 +43,6 @@ #include <string.h> #include <signal.h> #include <sys/wait.h> -#define LOGDIR "/var/log" int http_sock, con_sock; int http_port = 80; @@ -130,7 +141,7 @@ traite_req() strcat(logfile,"/"); strcat(logfile,"jhttp.log"); } - else strcpy(logfile, LOGDIR "/jhttpd.log"); + else strcpy(logfile,"/var/log/jhttpd.log"); if ( access(logfile,W_OK)) { @@ -350,9 +361,8 @@ char *adate() struct tm *t; time(&now); t = localtime(&now); - - sprintf(out, "%4d/%02d/%02d %02d:%02d:%02d", - t->tm_year+1900, t->tm_mon+1, t->tm_mday, - t->tm_hour, t->tm_min, t->tm_sec ); + sprintf(out, "%02d:%02d:%02d %02d/%02d/%02d", + t->tm_hour, t->tm_min, t->tm_sec, + t->tm_mday, t->tm_mon+1, t->tm_year ); return out; } |