summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-07-24 19:42:18 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-07-24 19:42:18 +0200
commitffc58b342995c6537f442db710ab213c057f968d (patch)
treebd39af8d1e80669ad54773921e0e80d2d6be12a7
parent42cf4e2371710cbd8e42da20dc5b30677fc64eaa (diff)
cwfs: make sure we do a full dump after toggling noatime
-rw-r--r--sys/src/cmd/cwfs/all.h1
-rw-r--r--sys/src/cmd/cwfs/con.c1
-rw-r--r--sys/src/cmd/cwfs/config.c6
-rw-r--r--sys/src/cmd/cwfs/cw.c3
4 files changed, 6 insertions, 5 deletions
diff --git a/sys/src/cmd/cwfs/all.h b/sys/src/cmd/cwfs/all.h
index 05d5d4c48..a74be73d8 100644
--- a/sys/src/cmd/cwfs/all.h
+++ b/sys/src/cmd/cwfs/all.h
@@ -85,6 +85,7 @@ ulong authdebugflag;
int noattach; /* attach is disabled */
int noauth; /* auth is disable */
int noatime; /* atime is disabled */
+int noatimeset; /* noatime was changed (reset after dump) */
int wstatallow; /* set to circumvent wstat permissions */
int writeallow; /* set to circumvent write permissions */
int duallow; /* single user to allow du */
diff --git a/sys/src/cmd/cwfs/con.c b/sys/src/cmd/cwfs/con.c
index 496915d0e..fb5be9666 100644
--- a/sys/src/cmd/cwfs/con.c
+++ b/sys/src/cmd/cwfs/con.c
@@ -697,6 +697,7 @@ void
cmd_noatime(int, char *[])
{
noatime = !noatime;
+ noatimeset++;
print("atime %s\n", noatime ? "disabled" : "enabled");
}
diff --git a/sys/src/cmd/cwfs/config.c b/sys/src/cmd/cwfs/config.c
index 8609790a8..a9c87bb6c 100644
--- a/sys/src/cmd/cwfs/config.c
+++ b/sys/src/cmd/cwfs/config.c
@@ -21,9 +21,8 @@ static Device* confdev;
static int copyworm = 0, copydev = 0;
static char *src, *dest;
-static int noauthset = 0;
-static int noatimeset = 0;
-static int readonlyset = 0;
+static int noauthset;
+static int readonlyset;
static int resetparams;
Fspar fspar[] = {
@@ -613,7 +612,6 @@ start:
putbuf(p);
f.modconf = f.newconf = 0;
- noauthset = noatimeset = readonlyset = 0;
goto start;
}
putbuf(p);
diff --git a/sys/src/cmd/cwfs/cw.c b/sys/src/cmd/cwfs/cw.c
index 26475f0c1..351f3d09f 100644
--- a/sys/src/cmd/cwfs/cw.c
+++ b/sys/src/cmd/cwfs/cw.c
@@ -1491,7 +1491,8 @@ cfsdump(Filsys *fs)
if(chatty)
fprint(2, "cwroot %lld", (Wideoff)orba);
cons.noage = 1;
- cw->all = cw->allflag | noatime;
+ cw->all = cw->allflag | noatime | noatimeset;
+ noatimeset = 0;
rba = cwrecur(cw, orba, Tsuper, 0, QPROOT);
if(rba == 0)
rba = orba;