History

cleanup

Benjamin Scher Purcell committed 11 years ago

Commit e5f5f511 parent af4d29c2 files · +4 −4Browse files

Unified · Split

2 files
  1. 9p.c +2 −2
  2. 9pfs.c +2 −2
9p.c+2−2
@@ -466,7 +466,7 @@ _9pclunk(FFid *f) · 465 unmodified lines
466466 {
467467 Fcall tclunk, rclunk;
468468
469− if(f == NULL)
469+ if(f == NULL || f == rootfid)
470470 return 0;
471471 tclunk.type = Tclunk;
472472 tclunk.fid = f->fid;
@@ -511,7 +511,7 @@ lookupfid(u32int fid, int act) · 38 unmodified lines
511511 break;
512512 case DEL:
513513 if(*floc == NULL || *floc == rootfid)
514− return NULL;
514+ return FDEL;
515515 f = *floc;
516516 *floc = f->link;
517517 free(f->path);
9pfs.c+2−2
@@ -94,9 +94,9 @@ fsreleasedir(const char *path, struct fuse_file_info *ffi) · 93 unmodified lines
9494 {
9595 FFid *f;
9696
97− if((FFid*)ffi->fh == NULL)
98− return 0;
9997 f = (FFid*)ffi->fh;
98+ if(f == NULL || f == rootfid)
99+ return 0;
100100 if((f->qid.type & QTDIR) == 0)
101101 return -ENOTDIR;
102102 return _9pclunk(f);

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