better errstr

This commit is contained in:
rsc 2006-07-23 03:33:00 +00:00
parent 0d7fd01125
commit a695bc7db9
4 changed files with 169 additions and 8 deletions

View file

@ -87,6 +87,8 @@ threadmain(int argc, char **argv)
fmtinstall('M', dirmodefmt);
fmtinstall('G', fusefmt);
setsid(); /* won't be able to use console, but can't be interrupted */
init9p(argv[0]);
initfuse(argv[1]);
@ -122,13 +124,6 @@ init9p(char *addr)
fsysroot = fsroot(fsys);
}
int
errstr2errno(void)
{
/* TODO: a better job */
return EPERM;
}
/*
* FUSE uses nodeids to refer to active "struct inodes"
* (9P's unopened fids). FUSE uses fhs to refer to active
@ -454,6 +449,7 @@ fusesetattr(FuseMsg *m)
if(fsfopen(nfid, OWRITE|OTRUNC) < 0){
replyfuseerrstr(m);
fsclose(nfid);
return;
}
fsclose(nfid);
goto stat;