Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1104/6

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Use offset 0 in #v/vgabios.
 [rsc] --rw-rw-r-- M 323293 glenda sys 6329 Nov  4 08:20 sys/src/cmd/aux/vga/io.c
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/aux/vga/io.c:11,16 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/aux/vga/io.c:11,17
	  static int iowfd = -1;
	  static int iolfd = -1;
	  static int biosfd = -1;
	+ static ulong biosoffset = 0;
	  
	  enum {
	  	Nctlchar	= 256,
	/n/sourcesdump/2005/1104/plan9/sys/src/cmd/aux/vga/io.c:202,215 - 
	/n/sourcesdump/2005/1105/plan9/sys/src/cmd/aux/vga/io.c:203,220
	  {
	  	char file[64];
	  
	- 	if(biosfd == -1)
	+ 	if(biosfd == -1){
	  		biosfd = open("#v/vgabios", OREAD);
	- 	if(biosfd == -1) {
	+ 		biosoffset = 0;
	+ 	}
	+ 	if(biosfd == -1){
	  		snprint(file, sizeof file, "#p/%d/mem", getpid());
	  		biosfd = devopen(file, OREAD);
	+ 		biosoffset = 0x80000000;
	  	}
	- 
	- 	seek(biosfd, 0x80000000|offset, 0);
	+ 	if(biosfd == -1)
	+ 		return -1;
	+ 	seek(biosfd, biosoffset+offset, 0);
	  	return read(biosfd, buf, len);
	  }
	  


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.