diff options
author | kx <kx@radix.pro> | 2022-09-29 01:51:28 +0300 |
---|---|---|
committer | kx <kx@radix.pro> | 2022-09-29 01:51:28 +0300 |
commit | 286e445581368548843659f84b3357015ad21821 (patch) | |
tree | 4adfc749b3c2907f7bb82fcc6d4fbecb439c91d1 | |
parent | ed02760159a4a777ed0e1b617dafddbc9c62f5a1 (diff) | |
download | sila-shell-286e445581368548843659f84b3357015ad21821.tar.xz |
users: check usage() functions
-rw-r--r-- | src/users.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/users.c b/src/users.c index b0f767c..09e37ae 100644 --- a/src/users.c +++ b/src/users.c @@ -200,7 +200,7 @@ int com_passwd( char *arg ) static void useradd_usage( char *fname ) { fprintf( stdout, "\n" ); - fprintf( stdout, "Usage: %s [options] [user name]\n", fname ); + fprintf( stdout, "Usage: %s [options] [username]\n", fname ); fprintf( stdout, "\n" ); fprintf( stdout, "Delete user.\n" ); fprintf( stdout, "\n" ); @@ -209,6 +209,9 @@ static void useradd_usage( char *fname ) fprintf( stdout, " -n,--name User Name.\n" ); fprintf( stdout, " -r,--role User Role (default: %s).\n", ROLE_USER ); fprintf( stdout, "\n" ); + fprintf( stdout, "Parameter:\n" ); + fprintf( stdout, " [username] User name (if not set by -n option).\n" ); + fprintf( stdout, "\n" ); } int com_useradd( char *arg ) @@ -244,7 +247,7 @@ int com_useradd( char *arg ) static void userdel_usage( char *fname ) { fprintf( stdout, "\n" ); - fprintf( stdout, "Usage: %s [options]\n", fname ); + fprintf( stdout, "Usage: %s [options] [username]\n", fname ); fprintf( stdout, "\n" ); fprintf( stdout, "Delete user.\n" ); fprintf( stdout, "\n" ); @@ -252,6 +255,9 @@ static void userdel_usage( char *fname ) fprintf( stdout, " -h,--help Display this information.\n" ); fprintf( stdout, " -n,--name User Name.\n" ); fprintf( stdout, "\n" ); + fprintf( stdout, "Parameter:\n" ); + fprintf( stdout, " [username] User name (if not set by -n option).\n" ); + fprintf( stdout, "\n" ); } int com_userdel( char *arg ) |