iPXE
Data Structures | Functions | Variables
ibmgmt_cmd.c File Reference

Infiniband device management commands. More...

#include <stdio.h>
#include <errno.h>
#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/infiniband.h>
#include <usr/ibmgmt.h>

Go to the source code of this file.

Data Structures

struct  ibstat_options
 "ibstat" options More...

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static int ibstat_exec (int argc, char **argv)
 The "ibstat" command.

Variables

static struct option_descriptor ibstat_opts [] = {}
 "ibstat" option list
static struct command_descriptor ibstat_cmd
 "ibstat" command descriptor
struct command ibmgmt_commands[] __command
 Infiniband commands.

Detailed Description

Infiniband device management commands.

Definition in file ibmgmt_cmd.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static int ibstat_exec ( int  argc,
char **  argv 
) [static]

The "ibstat" command.

Parameters:
argcArgument count
argvArgument list
Return values:
rcReturn status code

Definition at line 57 of file ibmgmt_cmd.c.

References for_each_ibdev, ibstat(), parse_options(), and rc.

                                                 {
        struct ibstat_options opts;
        struct ib_device *ibdev;
        int rc;

        /* Parse options */
        if ( ( rc = parse_options ( argc, argv, &ibstat_cmd, &opts ) ) != 0 )
                return rc;

        /* Show all Infiniband devices */
        for_each_ibdev ( ibdev )
                ibstat ( ibdev );

        return 0;
}

Variable Documentation

struct option_descriptor ibstat_opts[] = {} [static]

"ibstat" option list

Definition at line 44 of file ibmgmt_cmd.c.

struct command_descriptor ibstat_cmd [static]
Initial value:
        COMMAND_DESC ( struct ibstat_options, ibstat_opts, 0, 0, "" )

"ibstat" command descriptor

Definition at line 47 of file ibmgmt_cmd.c.

struct command ibmgmt_commands [] __command
Initial value:
 {
        {
                .name = "ibstat",
                .exec = ibstat_exec,
        },
}

Infiniband commands.

Definition at line 74 of file ibmgmt_cmd.c.