summaryrefslogtreecommitdiffstats
path: root/src/hci/commands/login_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hci/commands/login_cmd.c')
-rw-r--r--src/hci/commands/login_cmd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/hci/commands/login_cmd.c b/src/hci/commands/login_cmd.c
index c9e19643..6ed76c6f 100644
--- a/src/hci/commands/login_cmd.c
+++ b/src/hci/commands/login_cmd.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <stdio.h>
+#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/login_ui.h>
@@ -36,10 +37,16 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*/
/** "login" options */
-struct login_options {};
+struct login_options {
+ /** No Username */
+ int nouser;
+};
/** "login" option list */
-static struct option_descriptor login_opts[] = {};
+static struct option_descriptor login_opts[] = {
+ OPTION_DESC ( "nouser", 'n', no_argument,
+ struct login_options, nouser, parse_flag ),
+};
/** "login" command descriptor */
static struct command_descriptor login_cmd =
@@ -61,7 +68,7 @@ static int login_exec ( int argc, char **argv ) {
return rc;
/* Show login UI */
- if ( ( rc = login_ui() ) != 0 ) {
+ if ( ( rc = login_ui( opts.nouser ) ) != 0 ) {
printf ( "Could not set credentials: %s\n",
strerror ( rc ) );
return rc;