UEFIStarter
a simple UEFI framework
Macros | Functions | Variables
lspci.c File Reference

This application lists PCI devices. More...

#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/ShellCEntryLib.h>
#include <UEFIStarter/core.h>
#include <UEFIStarter/pci.h>

Macros

#define ARG_PRINT_CLASSES   _args[0].value.uint64
 helper macro to access the -print-classes argument value
 

Functions

INTN EFIAPI ShellAppMain (UINTN argc, CHAR16 **argv)
 Main function, gets invoked by UEFI shell. More...
 

Variables

static cmdline_argument_t _args []
 list of command-line arguments More...
 
static cmdline_argument_group_t _argsgroup ={ L"Application-specific options" ,sizeof( _args )/sizeof(cmdline_argument_t), _args }
 command-line argument group
 

Detailed Description

This application lists PCI devices.

The built-in static/pci.ids contains just a tiny subset of possible device names. The file can be replaced with the full version of pci.ids.

Author
Richard Nusser
License
GPLv3 (see http://www.gnu.org/licenses/)
See also
https://github.com/rinusser/UEFIStarter

Function Documentation

◆ ShellAppMain()

INTN EFIAPI ShellAppMain ( UINTN  argc,
CHAR16 **  argv 
)

Main function, gets invoked by UEFI shell.

Parameters
argcthe number of command-line arguments passed
argvthe command-line arguments passed
Returns
an EFI status code for the shell

Variable Documentation

◆ _args

cmdline_argument_t _args[]
static
Initial value:
= {
{{uint64:0},ARG_BOOL,NULL,L"-print-classes",L"Prints known PCI device classes"},
}
boolean
Definition: cmdline.h:22

list of command-line arguments