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
10531053 if(file == nil){
10541054 if(ops && ops->read && (f->ename = ops->read(fp->qid, c->data, (ulong*)(&f->count), fp->dri)) == nil)
10551055 break;
1056− nineperror(server, Eperm);
1056+ nineperror(server, f->ename);
10571057 break;
10581058 }
10591059 f->count = devdirread(fp, file, c->data, f->count);
@@ -1062,7 +1062,7 @@ ninepdefault(Ninepserver *server) · 2 unmodified lines
10621062 f->data = c->data;
10631063 if(ops && ops->read && (f->ename = ops->read(fp->qid, c->data, (ulong*)(&f->count), f->offset)) == nil)
10641064 break;
1065− nineperror(server, Eperm);
1065+ nineperror(server, f->ename);
10661066 break;
10671067 case Twrite:
10681068 if(!fp->open){
@@ -1074,7 +1074,7 @@ ninepdefault(Ninepserver *server) · 5 unmodified lines
10741074 f->qid = fp->qid;
10751075 if(ops && ops->write && (f->ename = ops->write(fp->qid, f->data, (ulong*)(&f->count), f->offset)) == nil)
10761076 break;
1077− nineperror(server, Eperm);
1077+ nineperror(server, f->ename);
10781078 break;
10791079 case Tclunk:
10801080 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