Browse Source

And on to other things that spatch missed.

It's not perfect.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 9 years ago
parent
commit
9bf36f8000

+ 1 - 1
sys/src/9/386/etherm10g.c

@@ -143,7 +143,7 @@ typedef struct {
 	uint	cnt;		/* number of segments sent by the card */
 
 	uint32_t	npkt;
-	vlong	nbytes;
+	int64_t	nbytes;
 } Tx;
 
 typedef struct {

+ 1 - 1
sys/src/9/k10/devarch.c

@@ -350,7 +350,7 @@ enum
 };
 
 static long
-archread(Chan *c, void *a, long n, vlong offset)
+archread(Chan *c, void *a, long n, int64_t offset)
 {
 	char *buf, *p;
 	int port;

+ 1 - 1
sys/src/9/k10/trap.c

@@ -259,7 +259,7 @@ static char* excname[32] = {
 void
 intrtime(int vno)
 {
-	uint32_t diff, x;		/* should be uvlong */
+	uint32_t diff, x;		/* should be uint64_t */
 
 	x = perfticks();
 	diff = x - m->perf.intrts;

+ 3 - 3
sys/src/9/port/devaoe.c

@@ -163,7 +163,7 @@ struct Srb {
 	Srb	*next;
 	uint32_t	ticksent;
 	uint32_t	len;
-	vlong	sector;
+	int64_t	sector;
 	short	write;
 	short	nout;
 	char	*error;
@@ -207,8 +207,8 @@ struct Aoedev {
 	int	lasttag;
 	int	nframes;
 	Frame	*frames;
-	vlong	bsize;
-	vlong	realbsize;
+	int64_t	bsize;
+	int64_t	realbsize;
 
 	uint	maxbcnt;
 	uint32_t	lostjumbo;

+ 8 - 8
sys/src/9/port/devcons.c

@@ -1255,7 +1255,7 @@ rand(void)
 static uint64_t uvorder = 0x0001020304050607ULL;
 
 static uint8_t*
-le2vlong(int64_t *to, uint8_t *f)
+le2int64_t(int64_t *to, uint8_t *f)
 {
 	uint8_t *t, *o;
 	int i;
@@ -1268,7 +1268,7 @@ le2vlong(int64_t *to, uint8_t *f)
 }
 
 static uint8_t*
-vlong2le(uint8_t *t, int64_t from)
+int64_t2le(uint8_t *t, int64_t from)
 {
 	uint8_t *f, *o;
 	int i;
@@ -1372,15 +1372,15 @@ readbintime(char *buf, int n)
 		fastticks((uint64_t*)&fasthz);
 	nsec = todget(&ticks);
 	if(n >= 3*sizeof(uint64_t)){
-		vlong2le(b+2*sizeof(uint64_t), fasthz);
+		int64_t2le(b+2*sizeof(uint64_t), fasthz);
 		i += sizeof(uint64_t);
 	}
 	if(n >= 2*sizeof(uint64_t)){
-		vlong2le(b+sizeof(uint64_t), ticks);
+		int64_t2le(b+sizeof(uint64_t), ticks);
 		i += sizeof(uint64_t);
 	}
 	if(n >= 8){
-		vlong2le(b, nsec);
+		int64_t2le(b, nsec);
 		i += sizeof(int64_t);
 	}
 	return i;
@@ -1405,20 +1405,20 @@ writebintime(char *buf, int n)
 	case 'n':
 		if(n < sizeof(int64_t))
 			error(Ebadtimectl);
-		le2vlong(&delta, p);
+		le2int64_t(&delta, p);
 		todset(delta, 0, 0);
 		break;
 	case 'd':
 		if(n < sizeof(int64_t)+sizeof(int32_t))
 			error(Ebadtimectl);
-		p = le2vlong(&delta, p);
+		p = le2int64_t(&delta, p);
 		le2long(&period, p);
 		todset(-1, delta, period);
 		break;
 	case 'f':
 		if(n < sizeof(uint64_t))
 			error(Ebadtimectl);
-		le2vlong(&fasthz, p);
+		le2int64_t(&fasthz, p);
 		todsetfreq(fasthz);
 		break;
 	}

+ 1 - 1
sys/src/9/port/devenv.c

@@ -256,7 +256,7 @@ envread(Chan *c, void *a, int32_t n, int64_t off)
 	}
 
 	offset = off;
-	if(offset > e->len)	/* protects against overflow converting vlong to long */
+	if(offset > e->len)	/* protects against overflow converting int64_t to long */
 		n = 0;
 	else if(offset + n > e->len)
 		n = e->len - offset;

+ 1 - 1
sys/src/9/port/devkexec.c

@@ -275,7 +275,7 @@ kexecread(Chan *c, void *a, int32_t n, int64_t off)
 	}
 
 	offset = off;
-	if(offset > e->len)	/* protects against overflow converting vlong to long */
+	if(offset > e->len)	/* protects against overflow converting int64_t to long */
 		n = 0;
 	else if(offset + n > e->len)
 		n = e->len - offset;

+ 3 - 3
sys/src/9/port/devproc.c

@@ -178,9 +178,9 @@ static char *tpids, *tpidsc, *tpidse;
 static Lock tlock;
 static int topens;
 static int tproduced, tconsumed;
-static void notrace(Proc*, int, vlong);
+static void notrace(Proc*, int, int64_t);
 
-void (*proctrace)(Proc*, int, vlong) = notrace;
+void (*proctrace)(Proc*, int, int64_t) = notrace;
 
 static void
 profclock(Ureg *ur, Timer *)
@@ -303,7 +303,7 @@ procgen(Chan *c, char *name, Dirtab *tab, int, int s, Dir *dp)
 }
 
 static void
-notrace(Proc*, Tevent, vlong)
+notrace(Proc*, Tevent, int64_t)
 {
 }
 static Lock tlck;

+ 1 - 1
sys/src/9/port/devsegment.c

@@ -49,7 +49,7 @@ struct Globalseg
 
 	char	*name;
 	char	*uid;
-	vlong	length;
+	int64_t	length;
 	long	perm;
 
 	Freemsg	*free;

+ 2 - 2
sys/src/9/port/edf.c

@@ -62,9 +62,9 @@ timeconv(Fmt *f)
 	buf[0] = 0;
 	switch(f->r) {
 	case 'U':
-		t = va_arg(f->args, uvlong);
+		t = va_arg(f->args, uint64_t);
 		break;
-	case 't':			/* vlong in nanoseconds */
+	case 't':			/* int64_t in nanoseconds */
 		t = va_arg(f->args, int32_t);
 		break;
 	default:

+ 1 - 1
sys/src/9/port/kexec.c

@@ -47,7 +47,7 @@ l2be(int32_t l)
 
 typedef struct {
 	Exec;
-	uvlong hdr[1];
+	uint64_t hdr[1];
 } Khdr;
 
 enum {

+ 1 - 1
sys/src/9/port/mul64fract.c

@@ -9,7 +9,7 @@
 
 #include "u.h"
 
-/* mul64fract(uvlong*r, uvlong a, uvlong b)
+/* mul64fract(uint64_t*r, uint64_t a, uint64_t b)
  *
  * Multiply two 64 numbers and return the middle 64 bits of the 128 bit result.
  *

+ 1 - 1
sys/src/9/port/sdaoe.c

@@ -61,7 +61,7 @@ struct Ctlr{
 	uchar	smartrs;
 	uchar	feat;
 
-	uvlong	sectors;
+	uint64_t	sectors;
 	char	serial[20+1];
 	char	firmware[8+1];
 	char	model[40+1];

+ 5 - 5
sys/src/9/port/sysfile.c

@@ -326,7 +326,7 @@ void
 sysnsec(Ar0* ar0, va_list)
 {
 	/*
-	 * vlong nsec(void);
+	 * int64_t nsec(void);
 	 */
 	ar0->vl = todget(nil);
 }
@@ -788,7 +788,7 @@ void
 syspread(Ar0* ar0, va_list list)
 {
 	/*
-	 * long pread(int fd, void* buf, long nbytes, vlong offset);
+	 * long pread(int fd, void* buf, long nbytes, int64_t offset);
 	 */
 	ar0->l = read(list, 1);
 }
@@ -861,7 +861,7 @@ void
 syspwrite(Ar0* ar0, va_list list)
 {
 	/*
-	 * long pwrite(int fd, void *buf, long nbytes, vlong offset);
+	 * long pwrite(int fd, void *buf, long nbytes, int64_t offset);
 	 */
 	ar0->l = write(list, 1);
 }
@@ -926,10 +926,10 @@ sysseek(Ar0* ar0, va_list list)
 	int64_t offset, *rv;
 
 	/*
-	 * vlong seek(int fd, vlong n, int type);
+	 * int64_t seek(int fd, int64_t n, int type);
 	 *
 	 * The system call actually has 4 arguments,
-	 *	int _seek(vlong*, int, vlong, int);
+	 *	int _seek(int64_t*, int, int64_t, int);
 	 * and the first argument is where the offset
 	 * is returned. The C library arranges the
 	 * argument/return munging if necessary.

+ 1 - 1
sys/src/9/port/sysproc.c

@@ -272,7 +272,7 @@ l2be(int32_t l)
 
 typedef struct {
 	Exec;
-	uvlong hdr[1];
+	uint64_t hdr[1];
 } Hdr;
 
 /*

+ 2 - 2
sys/src/9/port/syszio.c

@@ -480,7 +480,7 @@ sysziopread(Ar0 *ar0, va_list list)
 	Zio *io;
 
 	/*
-	 * int zpread(int fd, Zio *io[], int nio, usize count, vlong offset);
+	 * int zpread(int fd, Zio *io[], int nio, usize count, int64_t offset);
 	 */
 	fd = va_arg(list, int);
 	io = va_arg(list, Zio*);
@@ -498,7 +498,7 @@ sysziopwrite(Ar0 *ar0, va_list list)
 	Zio *io;
 
 	/*
-	 * int zpwrite(int fd, Zio *io[], int nio, vlong offset);
+	 * int zpwrite(int fd, Zio *io[], int nio, int64_t offset);
 	 */
 	fd = va_arg(list, int);
 	io = va_arg(list, Zio*);

+ 10 - 10
sys/src/9/port/tod.c

@@ -46,15 +46,15 @@ struct {
 	int	init;		/* true if initialized */
 	uint32_t	cnt;
 	Lock;
-	uvlong	multiplier;	/* ns = off + (multiplier*ticks)>>31 */
-	uvlong	divider;	/* ticks = (divider*(ns-off))>>31 */
-	uvlong	umultiplier;	/* µs = (µmultiplier*ticks)>>31 */
-	uvlong	udivider;	/* ticks = (µdivider*µs)>>31 */
-	vlong	hz;		/* frequency of fast clock */
-	vlong	last;		/* last reading of fast clock */
-	vlong	off;		/* offset from epoch to last */
-	vlong	lasttime;	/* last return value from todget */
-	vlong	delta;	/* add 'delta' each slow clock tick from sstart to send */
+	uint64_t	multiplier;	/* ns = off + (multiplier*ticks)>>31 */
+	uint64_t	divider;	/* ticks = (divider*(ns-off))>>31 */
+	uint64_t	umultiplier;	/* µs = (µmultiplier*ticks)>>31 */
+	uint64_t	udivider;	/* ticks = (µdivider*µs)>>31 */
+	int64_t	hz;		/* frequency of fast clock */
+	int64_t	last;		/* last reading of fast clock */
+	int64_t	off;		/* offset from epoch to last */
+	int64_t	lasttime;	/* last return value from todget */
+	int64_t	delta;	/* add 'delta' each slow clock tick from sstart to send */
 	uint32_t	sstart;		/* ... */
 	uint32_t	send;		/* ... */
 } tod;
@@ -138,7 +138,7 @@ todget(int64_t *ticksp)
 
 	/*
 	 * we don't want time to pass twixt the measuring of fastticks
-	 * and grabbing tod.last.  Also none of the vlongs are atomic so
+	 * and grabbing tod.last.  Also none of the int64_ts are atomic so
 	 * we have to look at them inside the lock.
 	 */
 	ilock(&tod);

+ 1 - 1
sys/src/9/root/blow.c

@@ -155,7 +155,7 @@ main(int argc, char* argv[])
 	Tpkt *tpkt;
 	u8int d[N];
 	char buf[512], *p;
-	uvlong r, start, stop;
+	uint64_t r, start, stop;
 	int count, fd, i, length, mhz, n, x, y, z;
 
 	count = 1;

+ 1 - 1
sys/src/9/root/suck.c

@@ -205,7 +205,7 @@ main(int argc, char* argv[])
 	Tpkt *tpkt;
 	u8int d[N];
 	char buf[512], *p;
-	uvlong r, start, stop;
+	uint64_t r, start, stop;
 	int count, dflag, fd, i, hflag, length, mhz, n;
 
 	count = 1;