History

libninep bugfix: report relevant error

Jesus Galan Lopez (yiyus) committed 15 years ago

Commit ccf14cd1 parent 70ab3601 file · +3 −3Browse files

Unified · Split

libninep/ninepserver.c+3−3
@@ -1053,7 +1053,7 @@ ninepdefault(Ninepserver *server) · 1052 unmodified lines
1053 if(file == nil){1053 if(file == nil){
1054 if(ops && ops->read && (f->ename = ops->read(fp->qid, c->data, (ulong*)(&f->count), fp->dri)) == nil)1054 if(ops && ops->read && (f->ename = ops->read(fp->qid, c->data, (ulong*)(&f->count), fp->dri)) == nil)
1055 break;1055 break;
1056 nineperror(server, Eperm);1056 nineperror(server, f->ename);
1057 break;1057 break;
1058 }1058 }
1059 f->count = devdirread(fp, file, c->data, f->count);1059 f->count = devdirread(fp, file, c->data, f->count);
@@ -1062,7 +1062,7 @@ ninepdefault(Ninepserver *server) · 2 unmodified lines
1062 f->data = c->data; 1062 f->data = c->data;
1063 if(ops && ops->read && (f->ename = ops->read(fp->qid, c->data, (ulong*)(&f->count), f->offset)) == nil)1063 if(ops && ops->read && (f->ename = ops->read(fp->qid, c->data, (ulong*)(&f->count), f->offset)) == nil)
1064 break;1064 break;
1065 nineperror(server, Eperm);1065 nineperror(server, f->ename);
1066 break;1066 break;
1067 case Twrite:1067 case Twrite:
1068 if(!fp->open){1068 if(!fp->open){
@@ -1074,7 +1074,7 @@ ninepdefault(Ninepserver *server) · 5 unmodified lines
1074 f->qid = fp->qid;1074 f->qid = fp->qid;
1075 if(ops && ops->write && (f->ename = ops->write(fp->qid, f->data, (ulong*)(&f->count), f->offset)) == nil)1075 if(ops && ops->write && (f->ename = ops->write(fp->qid, f->data, (ulong*)(&f->count), f->offset)) == nil)
1076 break;1076 break;
1077 nineperror(server, Eperm);1077 nineperror(server, f->ename);
1078 break;1078 break;
1079 case Tclunk:1079 case Tclunk:
1080 mode = fp->mode;1080 mode = fp->mode;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t