From 1f95e98dddc420321a8942d9f3195d966c7cc6c0 Mon Sep 17 00:00:00 2001 From: Jacob Moody Date: Thu, 30 Jun 2022 00:56:10 +0000 Subject: [PATCH] skelfs: dont mount if not asked to --- sys/src/cmd/skelfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/skelfs.c b/sys/src/cmd/skelfs.c index 137e19397..f2a9e5396 100644 --- a/sys/src/cmd/skelfs.c +++ b/sys/src/cmd/skelfs.c @@ -214,6 +214,7 @@ void main(int argc, char **argv) { char *s, *mode; + char *mtpt; int stdio; s = nil; @@ -241,7 +242,13 @@ main(int argc, char **argv) usage(); if(stdio == 0){ - postmountsrv(&fs, s, argc ? argv[0] : "/mnt/skel", MREPL); + if(s != nil && argc == 0) + mtpt = nil; + else if(argc) + mtpt = argv[0]; + else + mtpt = "/mnt/skel"; + postmountsrv(&fs, s, mtpt, MREPL); exits(nil); } fs.infd = 0;