mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
different naming convention
This commit is contained in:
parent
3cb8df0c39
commit
91124c1bcf
1 changed files with 18 additions and 4 deletions
|
@ -130,14 +130,14 @@ notifyf(void *a, char *s)
|
|||
void
|
||||
threadmain(int argc, char *argv[])
|
||||
{
|
||||
char *defsrv;
|
||||
int p[2];
|
||||
char *defsrv, *q;
|
||||
int p[2], l;
|
||||
int stdio = 0;
|
||||
char *host = nil;
|
||||
long ncache = 1000;
|
||||
int readOnly = 1;
|
||||
|
||||
defsrv = "vacfs";
|
||||
defsrv = nil;
|
||||
ARGBEGIN{
|
||||
case 'd':
|
||||
fmtinstall('F', fcallfmt);
|
||||
|
@ -176,7 +176,21 @@ threadmain(int argc, char *argv[])
|
|||
mfd[1] = p[0];
|
||||
proccreate(srv, 0, 32 * 1024);
|
||||
|
||||
if (post9pservice(p[1], defsrv) != 0)
|
||||
if(defsrv == nil){
|
||||
q = strrchr(argv[0], '/');
|
||||
if(q)
|
||||
q++;
|
||||
else
|
||||
q = argv[0];
|
||||
defsrv = vtmalloc(6+strlen(q)+1);
|
||||
strcpy(defsrv, "vacfs.");
|
||||
strcat(defsrv, q);
|
||||
l = strlen(defsrv);
|
||||
if(strcmp(defsrv+l-4, ".vac") == 0)
|
||||
defsrv[l-4] = 0;
|
||||
}
|
||||
|
||||
if(post9pservice(p[1], defsrv) != 0)
|
||||
sysfatal("post9pservice");
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue