hjfs: add users command, fix newuser ? documentation
This commit is contained in:
parent
76677bb8f0
commit
b76142bfef
5 changed files with 19 additions and 5 deletions
|
@ -27,6 +27,8 @@ hjfs \- file server maintenance
|
||||||
.I name
|
.I name
|
||||||
.RI [ options ]
|
.RI [ options ]
|
||||||
.PP
|
.PP
|
||||||
|
.B users
|
||||||
|
.PP
|
||||||
.B sync
|
.B sync
|
||||||
.PP
|
.PP
|
||||||
.B debug-chdeind
|
.B debug-chdeind
|
||||||
|
@ -113,10 +115,6 @@ owned by user and group
|
||||||
The options are
|
The options are
|
||||||
.TF =leaderxx
|
.TF =leaderxx
|
||||||
.TP
|
.TP
|
||||||
.B ?
|
|
||||||
Print the entry for
|
|
||||||
.IR name .
|
|
||||||
.TP
|
|
||||||
.B :
|
.B :
|
||||||
Add a group: add the name to
|
Add a group: add the name to
|
||||||
.B /adm/users
|
.B /adm/users
|
||||||
|
@ -157,6 +155,12 @@ command the file server overwrites
|
||||||
.B /adm/users
|
.B /adm/users
|
||||||
to reflect the internal state of the user table.
|
to reflect the internal state of the user table.
|
||||||
.PP
|
.PP
|
||||||
|
.I Users
|
||||||
|
reads the contents of file
|
||||||
|
.B /adm/users
|
||||||
|
to initialize the file server's internal representation of the
|
||||||
|
users structure.
|
||||||
|
.PP
|
||||||
.I Sync
|
.I Sync
|
||||||
writes dirty blocks in memory to the magnetic disk cache.
|
writes dirty blocks in memory to the magnetic disk cache.
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -465,3 +465,4 @@ found:
|
||||||
createuserdir(fs, argv[1], uid);
|
createuserdir(fs, argv[1], uid);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -322,6 +322,13 @@ error:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
cmdusers(int, char**)
|
||||||
|
{
|
||||||
|
readusers(fsmain);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
extern int cmdnewuser(int, char **);
|
extern int cmdnewuser(int, char **);
|
||||||
|
|
||||||
Cmd cmds[] = {
|
Cmd cmds[] = {
|
||||||
|
@ -334,6 +341,7 @@ Cmd cmds[] = {
|
||||||
{"sync", 1, cmdsync},
|
{"sync", 1, cmdsync},
|
||||||
{"halt", 1, cmdhalt},
|
{"halt", 1, cmdhalt},
|
||||||
{"newuser", 0, cmdnewuser},
|
{"newuser", 0, cmdnewuser},
|
||||||
|
{"users", 1, cmdusers},
|
||||||
{"echo", 2, cmdecho},
|
{"echo", 2, cmdecho},
|
||||||
{"df", 1, cmddf},
|
{"df", 1, cmddf},
|
||||||
{"debug-deind", 2, cmddebugdeind},
|
{"debug-deind", 2, cmddebugdeind},
|
||||||
|
|
|
@ -53,3 +53,4 @@ int userssave(Fs *, Chan *);
|
||||||
int ingroup(Fs *, short, short, int);
|
int ingroup(Fs *, short, short, int);
|
||||||
void workerinit(void);
|
void workerinit(void);
|
||||||
void writeusers(Fs *);
|
void writeusers(Fs *);
|
||||||
|
void readusers(Fs *);
|
||||||
|
|
|
@ -214,7 +214,7 @@ error:
|
||||||
dprint("writeusers: %r\n");
|
dprint("writeusers: %r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
readusers(Fs *fs)
|
readusers(Fs *fs)
|
||||||
{
|
{
|
||||||
Chan *ch;
|
Chan *ch;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue