ref: ffc58b342995c6537f442db710ab213c057f968d
parent: 42cf4e2371710cbd8e42da20dc5b30677fc64eaa
author: cinap_lenrek <[email protected]>
date: Tue Jul 24 15:42:18 EDT 2012
cwfs: make sure we do a full dump after toggling noatime
--- a/sys/src/cmd/cwfs/all.h
+++ b/sys/src/cmd/cwfs/all.h
@@ -85,6 +85,7 @@
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 */
--- a/sys/src/cmd/cwfs/con.c
+++ b/sys/src/cmd/cwfs/con.c
@@ -697,6 +697,7 @@
cmd_noatime(int, char *[])
{
noatime = !noatime;
+ noatimeset++;
print("atime %s\n", noatime ? "disabled" : "enabled");
}
--- a/sys/src/cmd/cwfs/config.c
+++ b/sys/src/cmd/cwfs/config.c
@@ -21,9 +21,8 @@
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 @@
putbuf(p);
f.modconf = f.newconf = 0;
- noauthset = noatimeset = readonlyset = 0;
goto start;
}
putbuf(p);
--- a/sys/src/cmd/cwfs/cw.c
+++ b/sys/src/cmd/cwfs/cw.c
@@ -1491,7 +1491,8 @@
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;