Browse Source

Plan 9 from Bell Labs 2008-08-26

David du Colombier 12 years ago
parent
commit
fc1a801bba

+ 9 - 9
dist/replica/_plan9.db

@@ -555,15 +555,15 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 1070519112 0
 386/lib/ape/lib9.a - 664 sys sys 1205611022 8766
-386/lib/ape/libap.a - 664 sys sys 1218770631 822090
-386/lib/ape/libbsd.a - 664 sys sys 1212377620 183900
-386/lib/ape/libdraw.a - 664 sys sys 1212377632 631580
-386/lib/ape/libfmt.a - 664 sys sys 1212377636 156706
+386/lib/ape/libap.a - 664 sys sys 1219693451 823914
+386/lib/ape/libbsd.a - 664 sys sys 1219693452 183900
+386/lib/ape/libdraw.a - 664 sys sys 1219693462 631580
+386/lib/ape/libfmt.a - 664 sys sys 1219693464 156706
 386/lib/ape/libl.a - 664 sys sys 1212377636 9406
-386/lib/ape/libnet.a - 664 sys sys 1212377637 24090
+386/lib/ape/libnet.a - 664 sys sys 1219693464 24090
 386/lib/ape/libregexp.a - 664 sys sys 1212377638 47500
 386/lib/ape/libutf.a - 664 sys sys 1212377640 88500
-386/lib/ape/libv.a - 664 sys sys 1212377641 19334
+386/lib/ape/libv.a - 664 sys sys 1219693465 19334
 386/lib/lib9p.a - 664 sys sys 1209184390 91992
 386/lib/libString.a - 664 sys sys 1209184391 22466
 386/lib/libauth.a - 664 sys sys 1214418439 59742
@@ -5294,7 +5294,7 @@ lib/tftpd - 20000000775 sys sys 1020895767 0
 lib/unicode - 664 sys sys 958440028 223312
 lib/unicode.notice - 664 sys sys 958504386 1398
 lib/units - 664 sys sys 1071415518 9997
-lib/vgadb - 664 sys sys 1218125419 31621
+lib/vgadb - 664 sys sys 1219680966 32309
 lib/video.specs - 664 sys sys 1175869533 2942
 lib/volcanoes - 664 sys sys 944944024 119831
 lib/words - 664 sys sys 1014923442 247097
@@ -6094,7 +6094,7 @@ sys/include/ape/sys/wait.h - 664 sys sys 1210370471 697
 sys/include/ape/termios.h - 664 sys sys 944948760 2745
 sys/include/ape/time.h - 664 sys sys 1212357943 1212
 sys/include/ape/u.h - 664 sys sys 1146097783 430
-sys/include/ape/unistd.h - 664 sys sys 1212357944 4064
+sys/include/ape/unistd.h - 664 sys sys 1219681426 4098
 sys/include/ape/utf.h - 664 sys sys 1070327359 1595
 sys/include/ape/utime.h - 664 sys sys 944948760 259
 sys/include/ar.h - 664 sys sys 1014929061 244
@@ -8813,7 +8813,7 @@ sys/src/ape/lib/ap/plan9/fork.c - 664 sys sys 1014921984 228
 sys/src/ape/lib/ap/plan9/frexp.c - 664 sys sys 1014921985 1138
 sys/src/ape/lib/ap/plan9/fstat.c - 664 sys sys 1014921984 284
 sys/src/ape/lib/ap/plan9/fsync.c - 664 sys sys 1014921985 114
-sys/src/ape/lib/ap/plan9/ftruncate.c - 664 sys sys 1014921985 132
+sys/src/ape/lib/ap/plan9/ftruncate.c - 664 sys sys 1219681668 303
 sys/src/ape/lib/ap/plan9/getcwd.c - 664 sys sys 1014921984 468
 sys/src/ape/lib/ap/plan9/getgid.c - 664 sys sys 1014921984 306
 sys/src/ape/lib/ap/plan9/getgrgid.c - 664 sys sys 1014921984 405

+ 9 - 9
dist/replica/plan9.db

@@ -555,15 +555,15 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 1070519112 0
 386/lib/ape/lib9.a - 664 sys sys 1205611022 8766
-386/lib/ape/libap.a - 664 sys sys 1218770631 822090
-386/lib/ape/libbsd.a - 664 sys sys 1212377620 183900
-386/lib/ape/libdraw.a - 664 sys sys 1212377632 631580
-386/lib/ape/libfmt.a - 664 sys sys 1212377636 156706
+386/lib/ape/libap.a - 664 sys sys 1219693451 823914
+386/lib/ape/libbsd.a - 664 sys sys 1219693452 183900
+386/lib/ape/libdraw.a - 664 sys sys 1219693462 631580
+386/lib/ape/libfmt.a - 664 sys sys 1219693464 156706
 386/lib/ape/libl.a - 664 sys sys 1212377636 9406
-386/lib/ape/libnet.a - 664 sys sys 1212377637 24090
+386/lib/ape/libnet.a - 664 sys sys 1219693464 24090
 386/lib/ape/libregexp.a - 664 sys sys 1212377638 47500
 386/lib/ape/libutf.a - 664 sys sys 1212377640 88500
-386/lib/ape/libv.a - 664 sys sys 1212377641 19334
+386/lib/ape/libv.a - 664 sys sys 1219693465 19334
 386/lib/lib9p.a - 664 sys sys 1209184390 91992
 386/lib/libString.a - 664 sys sys 1209184391 22466
 386/lib/libauth.a - 664 sys sys 1214418439 59742
@@ -5294,7 +5294,7 @@ lib/tftpd - 20000000775 sys sys 1020895767 0
 lib/unicode - 664 sys sys 958440028 223312
 lib/unicode.notice - 664 sys sys 958504386 1398
 lib/units - 664 sys sys 1071415518 9997
-lib/vgadb - 664 sys sys 1218125419 31621
+lib/vgadb - 664 sys sys 1219680966 32309
 lib/video.specs - 664 sys sys 1175869533 2942
 lib/volcanoes - 664 sys sys 944944024 119831
 lib/words - 664 sys sys 1014923442 247097
@@ -6094,7 +6094,7 @@ sys/include/ape/sys/wait.h - 664 sys sys 1210370471 697
 sys/include/ape/termios.h - 664 sys sys 944948760 2745
 sys/include/ape/time.h - 664 sys sys 1212357943 1212
 sys/include/ape/u.h - 664 sys sys 1146097783 430
-sys/include/ape/unistd.h - 664 sys sys 1212357944 4064
+sys/include/ape/unistd.h - 664 sys sys 1219681426 4098
 sys/include/ape/utf.h - 664 sys sys 1070327359 1595
 sys/include/ape/utime.h - 664 sys sys 944948760 259
 sys/include/ar.h - 664 sys sys 1014929061 244
@@ -8813,7 +8813,7 @@ sys/src/ape/lib/ap/plan9/fork.c - 664 sys sys 1014921984 228
 sys/src/ape/lib/ap/plan9/frexp.c - 664 sys sys 1014921985 1138
 sys/src/ape/lib/ap/plan9/fstat.c - 664 sys sys 1014921984 284
 sys/src/ape/lib/ap/plan9/fsync.c - 664 sys sys 1014921985 114
-sys/src/ape/lib/ap/plan9/ftruncate.c - 664 sys sys 1014921985 132
+sys/src/ape/lib/ap/plan9/ftruncate.c - 664 sys sys 1219681668 303
 sys/src/ape/lib/ap/plan9/getcwd.c - 664 sys sys 1014921984 468
 sys/src/ape/lib/ap/plan9/getgid.c - 664 sys sys 1014921984 306
 sys/src/ape/lib/ap/plan9/getgrgid.c - 664 sys sys 1014921984 405

+ 9 - 0
dist/replica/plan9.log

@@ -20178,3 +20178,12 @@
 1218918605 0 c sys/include/auth.h - 664 sys sys 1218917189 3439
 1219377603 0 c 386/bin/topng - 775 sys sys 1219375827 57344
 1219509005 0 c 386/bin/topng - 775 sys sys 1183605363 137219
+1219681805 0 c lib/vgadb - 664 sys sys 1219680966 32309
+1219681805 1 c sys/include/ape/unistd.h - 664 sys sys 1219681426 4098
+1219681805 2 c sys/src/ape/lib/ap/plan9/ftruncate.c - 664 sys sys 1219681668 303
+1219694404 0 c 386/lib/ape/libap.a - 664 sys sys 1219693451 823914
+1219694404 1 c 386/lib/ape/libbsd.a - 664 sys sys 1219693452 183900
+1219694404 2 c 386/lib/ape/libdraw.a - 664 sys sys 1219693462 631580
+1219694404 3 c 386/lib/ape/libfmt.a - 664 sys sys 1219693464 156706
+1219694404 4 c 386/lib/ape/libnet.a - 664 sys sys 1219693464 24090
+1219694404 5 c 386/lib/ape/libv.a - 664 sys sys 1219693465 19334

+ 41 - 0
lib/vgadb

@@ -1321,6 +1321,47 @@ a1097c=1360x1024		#	78.125 kHz / 72.005 Hz, 4:3 resolution
 	vrs=1025 vre=1028 vt=1066
 	hsync=+ vsync=+
 
+#
+# Dell E198WFP LCD monitor (1440x900 native)
+#
+e198wfp
+	videobw=140
+
+e198wfp=1024x768	# 70Hz
+	clock=75
+	shb=1024 ehb=1328 ht=1328
+	vrs=771 vre=777 vt=806
+	hsync=- vsync=-
+
+e198wfp=1440x900	# 60 Hz
+	clock=106.5
+	shb=1520 ehb=1672 ht=1904
+	vrs=903 vre=909 vt=934
+	hsync=- vsync=+
+
+#
+# HannsG JC199D LCD monitor (1280x1024 native)
+#
+jc199d
+	videobw=140
+
+jc199d=800x600		#	60 Hz
+	defaultclock=40
+	shb=800 ehb=1056 ht=1056
+	vrs=601 vre=605 vt=628
+	hsync=+ vsync=+
+
+jc199d=1024x768		#	60 Hz
+	defaultclock=65
+	shb=1024 ehb=1344 ht=1344
+	vrs=771 vre=777 vt=806
+	hsync=- vsync=-
+
+jc199d=1280x1024		#	60 Hz
+	defaultclock=108
+	shb=1328 ehb=1440 ht=1688
+	vrs=1025 vre=1028 vt=1066
+	hsync=+ vsync=+
 
 #
 # QVGA		320x240		Quarter Video Graphics Array

+ 1 - 0
sys/include/ape/unistd.h

@@ -140,6 +140,7 @@ extern int close(int);
 extern ssize_t read(int, void *, size_t);
 extern ssize_t write(int, const void *, size_t);
 #ifdef __TYPES_H
+extern int ftruncate(int, off_t);
 extern off_t lseek(int, off_t, int);
 #endif
 

+ 15 - 2
sys/src/ape/lib/ap/plan9/ftruncate.c

@@ -1,10 +1,23 @@
+#include "lib.h"
 #include <sys/types.h>
 #include <unistd.h>
 #include <errno.h>
+#include "dir.h"
 
 int
 ftruncate(int fd, off_t length)
 {
-	errno = EINVAL;
-	return -1;
+	Dir d;
+
+	if(length < 0){
+		errno = EINVAL;
+		return -1;
+	}
+	_nulldir(&d);
+	d.length = length;
+	if(_dirfwstat(fd, &d) < 0){
+		_syserrno();
+		return -1;
+	}
+	return 0;
 }