Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1027/17

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


64-bit safety.
 [rsc] --rw-rw-r-- M 320859 glenda sys 2494 Oct 27 10:38 sys/src/cmd/tapefs/cpiofs.c
	/n/sourcesdump/2005/1027/plan9/sys/src/cmd/tapefs/cpiofs.c:112,118 - 
	/n/sourcesdump/2005/1028/plan9/sys/src/cmd/tapefs/cpiofs.c:112,118
	  doread(Ram *r, long off, long cnt)
	  {
	  
	- 	seek(tapefile, (long)r->data+off, 0);
	+ 	seek(tapefile, (vlong)r->data+off, 0);
	  	if (cnt>sizeof(dblock.tbuf))
	  		error("read too big");
	  	read(tapefile, dblock.tbuf, cnt);
 [rsc] --rw-rw-r-- M 320859 glenda sys 1940 Oct 27 10:38 sys/src/cmd/tapefs/tapfs.c
	/n/sourcesdump/2005/1027/plan9/sys/src/cmd/tapefs/tapfs.c:96,102 - 
	/n/sourcesdump/2005/1028/plan9/sys/src/cmd/tapefs/tapfs.c:96,102
	  {
	  	if (cnt>sizeof(buffer))
	  		print("count too big\n");
	- 	seek(tapefile, 512*(int)r->data+off, 0);
	+ 	seek(tapefile, 512*(vlong)r->data+off, 0);
	  	read(tapefile, buffer, cnt);
	  	return buffer;
	  }
 [rsc] --rw-rw-r-- M 320859 glenda sys 2014 Oct 27 10:38 sys/src/cmd/tapefs/tpfs.c
	/n/sourcesdump/2005/1027/plan9/sys/src/cmd/tapefs/tpfs.c:89,95 - 
	/n/sourcesdump/2005/1028/plan9/sys/src/cmd/tapefs/tpfs.c:89,95
	  {
	  	if (cnt>sizeof(buffer))
	  		print("count too big\n");
	- 	seek(tapefile, 512*(int)r->data+off, 0);
	+ 	seek(tapefile, 512*(vlong)r->data+off, 0);
	  	read(tapefile, buffer, cnt);
	  	return buffer;
	  }


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.