plan 9 kernel history: overview | file list | diff list

1997/0408/ip/kio.c (diff list | history)

1997/0408/sys/src/9/ip/kio.c:88,941998/0319/sys/src/9/ip/kio.c:88,94 (short | long | prev | next)
Change kseek to use vlong offset.
rsc Fri Mar 4 12:44:25 2005
1997/0327    
} 
 
long 
kseek(int fd, int offset, int whence) 
1998/0319    
kseek(int fd, vlong offset, int whence) 
1997/0327    
{ 
	Chan *c; 
	char buf[DIRLEN]; 
1997/0408/sys/src/9/ip/kio.c:112,1181998/0319/sys/src/9/ip/kio.c:112,119
1997/0327    
	off = 0; 
	switch(whence) { 
	case 0: 
		off = c->offset = offset; 
1998/0319    
		off = offset; 
		c->offset = offset; 
1997/0327    
		break; 
	case 1: 
		lock(c);	/* lock for read/write update */ 
1997/0408/sys/src/9/ip/kio.c:123,1291998/0319/sys/src/9/ip/kio.c:124,130
1997/0327    
	case 2: 
		devtab[c->type]->stat(c, buf); 
		convM2D(buf, &dir); 
		c->offset = dir.length + offset; 
1998/0319    
		c->offset = dir.length2 + offset;	/* BOTCH */ 
1997/0327    
		off = c->offset; 
		break; 
	} 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)