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
|
||||
.RI [ options ]
|
||||
.PP
|
||||
.B users
|
||||
.PP
|
||||
.B sync
|
||||
.PP
|
||||
.B debug-chdeind
|
||||
|
@ -113,10 +115,6 @@ owned by user and group
|
|||
The options are
|
||||
.TF =leaderxx
|
||||
.TP
|
||||
.B ?
|
||||
Print the entry for
|
||||
.IR name .
|
||||
.TP
|
||||
.B :
|
||||
Add a group: add the name to
|
||||
.B /adm/users
|
||||
|
@ -157,6 +155,12 @@ command the file server overwrites
|
|||
.B /adm/users
|
||||
to reflect the internal state of the user table.
|
||||
.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
|
||||
writes dirty blocks in memory to the magnetic disk cache.
|
||||
.PP
|
||||
|
|
|
@ -465,3 +465,4 @@ found:
|
|||
createuserdir(fs, argv[1], uid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -322,6 +322,13 @@ error:
|
|||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
cmdusers(int, char**)
|
||||
{
|
||||
readusers(fsmain);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern int cmdnewuser(int, char **);
|
||||
|
||||
Cmd cmds[] = {
|
||||
|
@ -334,6 +341,7 @@ Cmd cmds[] = {
|
|||
{"sync", 1, cmdsync},
|
||||
{"halt", 1, cmdhalt},
|
||||
{"newuser", 0, cmdnewuser},
|
||||
{"users", 1, cmdusers},
|
||||
{"echo", 2, cmdecho},
|
||||
{"df", 1, cmddf},
|
||||
{"debug-deind", 2, cmddebugdeind},
|
||||
|
|
|
@ -53,3 +53,4 @@ int userssave(Fs *, Chan *);
|
|||
int ingroup(Fs *, short, short, int);
|
||||
void workerinit(void);
|
||||
void writeusers(Fs *);
|
||||
void readusers(Fs *);
|
||||
|
|
|
@ -214,7 +214,7 @@ error:
|
|||
dprint("writeusers: %r\n");
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
readusers(Fs *fs)
|
||||
{
|
||||
Chan *ch;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue