ref: 7c9ff080f7f0b6b1a6554adb40310a5b4e6f9fd2
parent: 8c0ec0a94d14b0bc6c38873286b58b6235bb9c16
author: joe9 <[email protected]>
date: Mon Jul 12 23:14:46 EDT 2021
use u64 for c->qid.path
--- a/os/pc/devarch.c
+++ b/os/pc/devarch.c
@@ -182,7 +182,7 @@
port = offset;
end = port+n;
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qdir:
return devdirread(c, a, n, archdir, narchdir, devgen);
@@ -239,7 +239,7 @@
port = offset;
end = port+n;
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qiob:
checkport(port, end);
for(cp = a; port < end; port++)
--- a/os/pc/devlm78.c
+++ b/os/pc/devlm78.c
@@ -271,7 +271,7 @@
off = offset;
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qdir:
return devdirread(c, a, n, lm78dir, nelem(lm78dir), devgen);
@@ -296,7 +296,7 @@
off = offset;
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
default:
error(Eperm);
--- a/os/pc/devpnp.c
+++ b/os/pc/devpnp.c
@@ -436,7 +436,7 @@
return pcigen(c, s+Qpcictl, p->tbdf, dp);
case Qpcictl:
case Qpciraw:
- tbdf = MKBUS(BusPCI, 0, 0, 0)|BUSBDF((ulong)c->qid.path);
+ tbdf = MKBUS(BusPCI, 0, 0, 0)|BUSBDF((u64)c->qid.path);
p = pcimatchtbdf(tbdf);
if(p == nil)
return -1;
@@ -528,7 +528,7 @@
sprint(up->genbuf, "%s\n", serial(cp->id1, cp->id2));
return readstr(offset, a, n, up->genbuf);
case Qpcictl:
- tbdf = MKBUS(BusPCI, 0, 0, 0)|BUSBDF((ulong)c->qid.path);
+ tbdf = MKBUS(BusPCI, 0, 0, 0)|BUSBDF((u64)c->qid.path);
p = pcimatchtbdf(tbdf);
if(p == nil)
error(Egreg);
@@ -544,7 +544,7 @@
*w = '\0';
return readstr(offset, a, n, buf);
case Qpciraw:
- tbdf = MKBUS(BusPCI, 0, 0, 0)|BUSBDF((ulong)c->qid.path);
+ tbdf = MKBUS(BusPCI, 0, 0, 0)|BUSBDF((u64)c->qid.path);
p = pcimatchtbdf(tbdf);
if(p == nil)
error(Egreg);
--- a/os/pc/devrtc.c
+++ b/os/pc/devrtc.c
@@ -83,7 +83,7 @@
rtcopen(Chan* c, u32 omode)
{
omode = openmode(omode);
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qrtc:
if(strcmp(up->env->user, eve)!=0 && omode!=OREAD)
error(Eperm);
@@ -183,7 +183,7 @@
if(c->qid.type & QTDIR)
return devdirread(c, buf, n, rtcdir, nelem(rtcdir), devgen);
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qrtc:
t = rtctime();
n = readnum(offset, buf, n, t, 12);
@@ -235,7 +235,7 @@
error(Ebadarg);
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qrtc:
/*
* read the time
--- a/os/pc/devtv.c
+++ b/os/pc/devtv.c
@@ -421,7 +421,7 @@
USED(offset);
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qdir:
return devdirread(c, a, n, tvtab, nelem(tvtab), devgen);
case Qdata:
@@ -455,7 +455,7 @@
USED(offset);
a = vp;
- switch((ulong)c->qid.path){
+ switch((u64)c->qid.path){
case Qctl:
if (n > sizeof(buf)-1)
n = sizeof(buf)-1;
--- a/os/pc/devvga.c
+++ b/os/pc/devvga.c
@@ -251,7 +251,7 @@
static char *openctl = "openctl\n";
scr = &vgascreen[0];
- if ((ulong)c->qid.path == Qvgaovlctl) {
+ if ((u64)c->qid.path == Qvgaovlctl) {
if (scr->dev && scr->dev->ovlctl)
scr->dev->ovlctl(scr, c, openctl, strlen(openctl));
else
@@ -267,7 +267,7 @@
static char *closectl = "closectl\n";
scr = &vgascreen[0];
- if((ulong)c->qid.path == Qvgaovlctl)
+ if((u64)c->qid.path == Qvgaovlctl)
if(scr->dev && scr->dev->ovlctl){
if(waserror()){
print("ovlctl error: %s\n", up->env->errstr);
@@ -301,7 +301,7 @@
u32 offset = off;
char chbuf[30];
- switch((u32)c->qid.path){
+ switch((u64)c->qid.path){
case Qdir:
return devdirread(c, a, n, vgadir, nvgadir, devgen);
@@ -555,7 +555,7 @@
Cmdbuf *cb;
VGAscr *scr;
- switch((u32)c->qid.path){
+ switch((u64)c->qid.path){
case Qdir:
error(Eperm);