From 35ae892d35e97cc238430bf3e32169128149f546 Mon Sep 17 00:00:00 2001 From: abial Date: Fri, 12 Feb 1999 20:36:13 +0000 Subject: [PATCH] Merge from RELENG_3. --- release/picobsd/build/clean | 4 +- release/picobsd/build/populate | 11 +--- release/picobsd/dial/conf/PICOBSD | 4 +- release/picobsd/dial/lang/motd.en | 2 +- release/picobsd/dial/lang/motd.pl | 2 +- release/picobsd/isp/conf/PICOBSD | 10 +--- release/picobsd/isp/crunch1/crunch.conf | 4 +- release/picobsd/isp/floppy.tree/etc/fstab | 2 +- release/picobsd/isp/lang/motd.en | 2 +- release/picobsd/isp/lang/motd.pl | 2 +- release/picobsd/net/conf/PICOBSD | 10 +--- release/picobsd/net/crunch1/crunch.conf | 4 +- release/picobsd/net/floppy.tree/etc/fstab | 2 +- release/picobsd/net/lang/motd.en | 2 +- release/picobsd/net/lang/motd.pl | 2 +- release/picobsd/router/conf/PICOBSD | 10 +--- release/picobsd/router/crunch1/crunch.conf | 4 +- release/picobsd/router/floppy.tree/etc/fstab | 2 +- release/picobsd/router/lang/motd.en | 2 +- release/picobsd/router/lang/motd.pl | 2 +- release/picobsd/tinyware/kget/README | 4 +- release/picobsd/tinyware/kget/kget.c | 59 +++++++++++++++++-- .../picobsd/tinyware/simple_httpd/Makefile | 3 +- release/picobsd/tinyware/simple_httpd/README | 25 ++++++-- .../tinyware/simple_httpd/simple_httpd.c | 54 ++++++++++------- 25 files changed, 143 insertions(+), 85 deletions(-) diff --git a/release/picobsd/build/clean b/release/picobsd/build/clean index aa2330eb217f..9ba009fcbf3c 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 06abaae29bb1..37099ff6e56d 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 4be43f626c36..574a61f4cfc7 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 c96e8536647a..b286a414f5ee 100644 --- a/release/picobsd/dial/lang/motd.en +++ b/release/picobsd/dial/lang/motd.en @@ -4,7 +4,7 @@ PicoBSD @VER@ (DIALUP) (o,o) __ \~/ Welcome to PicoBSD! -->====\ ~~ d d -You can find a short description of the pico +You can find a short description of the picoBSD 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 bfecac1f5022..791af1bd1b5e 100644 --- a/release/picobsd/dial/lang/motd.pl +++ b/release/picobsd/dial/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (DIALUP) (o,o)[37 __ \~/ Witamy w PicoBSD! -->====\ ~~ d d -W glownym katalogu w pliku README znajdziesz pico +W glownym katalogu w pliku README znajdziesz picoBSD 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 66c02497a7e9..36b13f931565 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 2c8e1035d1b8..390e39172e2a 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 ca519e82c8b6..64d34ca9b1ae 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 77a1949f998e..86b4f8a0708a 100644 --- a/release/picobsd/isp/lang/motd.en +++ b/release/picobsd/isp/lang/motd.en @@ -4,7 +4,7 @@ PicoBSD @VER@ (ISP-alpha) (o,o) __ \~/ Welcome to PicoBSD! -->====\ ~~ d d -You can find a short description of the pico +You can find a short description of the picoBSD 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 1ceed3813fb2..749792d823e4 100644 --- a/release/picobsd/isp/lang/motd.pl +++ b/release/picobsd/isp/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (ISP-alpha) (o,o)[37 __ \~/ Witamy w PicoBSD! -->====\ ~~ d d -W glownym katalogu w pliku README znajdziesz pico +W glownym katalogu w pliku README znajdziesz picoBSD 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 1bf94dbed3e1..8c56b28540b0 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 1114f069002d..f58a107b75da 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 ca519e82c8b6..64d34ca9b1ae 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 f3f774471f11..97194182eedf 100644 --- a/release/picobsd/net/lang/motd.en +++ b/release/picobsd/net/lang/motd.en @@ -4,7 +4,7 @@ PicoBSD @VER@ (NET) (o,o) __ \~/ Welcome to PicoBSD! -->====\ ~~ d d -You can find a short description of the pico +You can find a short description of the picoBSD 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 9f8cedfe797c..4b1fcf551518 100644 --- a/release/picobsd/net/lang/motd.pl +++ b/release/picobsd/net/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (NET) (o,o)[37 __ \~/ Witamy w PicoBSD! -->====\ ~~ d d -W glownym katalogu w pliku README znajdziesz pico +W glownym katalogu w pliku README znajdziesz picoBSD 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 7348c86a345c..f9001200b407 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 967f5ae8142c..445716c89eaf 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 ca519e82c8b6..64d34ca9b1ae 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 f2fd6562711e..d0b03603c746 100644 --- a/release/picobsd/router/lang/motd.en +++ b/release/picobsd/router/lang/motd.en @@ -4,6 +4,6 @@ PicoBSD @VER@ (ROUTER) (o,o) __ \~/ Welcome to PicoBSD! -->====\ ~~ d d -You can find a short description of the pico +You can find a short description of the picoBSD system in http://www.freebsd.org/~picobsd/. diff --git a/release/picobsd/router/lang/motd.pl b/release/picobsd/router/lang/motd.pl index cfdbba9e18aa..5acadf0d2aa1 100644 --- a/release/picobsd/router/lang/motd.pl +++ b/release/picobsd/router/lang/motd.pl @@ -4,7 +4,7 @@ PicoBSD @VER@ (ROUTER) (o,o)[37 __ \~/ Witamy w PicoBSD! -->====\ ~~ d d -Dokumentacja systemu znajduje sie na pico +Dokumentacja systemu znajduje sie na picoBSD 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 9490dd747969..967356dc542b 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 -$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 b8426e4fdc86..a7bd46ca3ed6 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 @@ -31,8 +31,10 @@ #include #include #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)) diff --git a/release/picobsd/tinyware/simple_httpd/README b/release/picobsd/tinyware/simple_httpd/README index ef0956ead952..a73d2bf99f89 100644 --- a/release/picobsd/tinyware/simple_httpd/README +++ b/release/picobsd/tinyware/simple_httpd/README @@ -1,6 +1,23 @@ -Contributed by Marc Nicholas +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 + +If you're root, the document directory will be /httphome. If you're +not, then first of all you need to use the 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 + +$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 5b02244e4de9..8e7c55ba3284 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 - 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 + * 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 @@ -31,7 +43,6 @@ #include #include #include -#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; }