login_cmd.c File Reference

#include <string.h>
#include <stdio.h>
#include <gpxe/command.h>
#include <gpxe/login_ui.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static int login_exec (int argc, char **argv)

Variables

struct command login_command __command


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

static int login_exec ( int  argc,
char **  argv 
) [static]

Definition at line 8 of file login_cmd.c.

References login_ui(), printf(), and strerror().

00008                                                 {
00009         int rc;
00010 
00011         if ( argc > 1 ) {
00012                 printf ( "Usage: %s\n"
00013                          "Prompt for login credentials\n", argv[0] );
00014                 return 1;
00015         }
00016 
00017         if ( ( rc = login_ui() ) != 0 ) {
00018                 printf ( "Could not set credentials: %s\n",
00019                          strerror ( rc ) );
00020                 return 1;
00021         }
00022 
00023         return 0;
00024 }


Variable Documentation

struct command login_command __command

Initial value:

 {
        .name = "login",
        .exec = login_exec,
}

Definition at line 26 of file login_cmd.c.


Generated on Tue Apr 6 20:01:46 2010 for gPXE by  doxygen 1.5.7.1