Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1119/13

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


64-bit fixes.
 [jmk] --rw-rw-r-- M 107020 glenda sys 17151 Nov 19 20:54 sys/src/cmd/9660srv/9660srv.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/9660srv/9660srv.c:159,165 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/9660srv/9660srv.c:159,165
	  	if(getdrec(root, rd) >= 0){
	  		n = rd->reclen-(34+rd->namelen);
	  		s = (uchar*)rd->name + rd->namelen;
	- 		if((ulong)s & 1){
	+ 		if((uintptr)s & 1){
	  			s++;
	  			n--;
	  		}
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/9660srv/9660srv.c:620,626 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/9660srv/9660srv.c:620,626
	  
	  	sysl = dp->reclen-(34+dp->namelen);
	  	s = (uchar*)dp->name + dp->namelen;
	- 	if(((ulong)s) & 1) {
	+ 	if(((uintptr)s) & 1) {
	  		s++;
	  		sysl--;
	  	}
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/9660srv/9660srv.c:649,655 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/9660srv/9660srv.c:649,655
	  		memset(d->gid, 0, ONAMELEN);
	  		memmove(d->gid, s+1, nl);
	  		s += 1 + *s;
	- 		if(((ulong)s) & 1)
	+ 		if(((uintptr)s) & 1)
	  			s++;
	  		d->mode = l32(s);
	  		if(d->mode & DMDIR)
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/9660srv/9660srv.c:707,713 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/9660srv/9660srv.c:707,713
	  			s += fs->suspoff;
	  			sysl -= fs->suspoff;
	  			for(; sysl >= 4 && have != (Hname|Hmode); sysl -= l, s += l){
	- 				if(s[0] == 0 && ((ulong)s & 1)){
	+ 				if(s[0] == 0 && ((uintptr)s & 1)){
	  					/* MacOS pads individual entries, contrary to spec */
	  					s++;
	  					sysl--;


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].