#include <stddef.h>
#include <stdarg.h>
#include <ipxe/timer.h>
Go to the source code of this file.
◆ execl
| #define execl |
( |
| command, |
|
|
| arg, |
|
|
| ... ) |
Value: ( { \
char * const argv[] = { (arg), ## __VA_ARGS__ }; \
} )
struct arbelprm_rc_send_wqe rc
int execv(const char *command, char *const argv[])
Execute command.
Execute command.
- Parameters
-
| command | Command name |
| arg | ... Argument list (starting with argv[0]) |
- Return values
-
This is a front end to execv().
Definition at line 21 of file unistd.h.
21#define execl( command, arg, ... ) ( { \
22 char * const argv[] = { (arg), ## __VA_ARGS__ }; \
23 int rc = execv ( (command), argv ); \
24 rc; \
25 } )
◆ FILE_LICENCE()
| FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL | | ) |
|
◆ FILE_SECBOOT()
| FILE_SECBOOT |
( |
PERMITTED | | ) |
|
◆ execv()
| int execv |
( |
const char * | command, |
|
|
char *const | argv[] ) |
|
extern |
Execute command.
- Parameters
-
| command | Command name |
| argv | Argument list |
- Return values
-
Execute the named command. Unlike a traditional POSIX execv(), this function returns the exit status of the command.
Definition at line 61 of file exec.c.
61 {
63 int argc;
65
66
67 for ( argc = 0 ; argv[argc] ; argc++ ) {}
68
69
73 }
74
75
76 if ( argc == 0 ) {
80 }
81
82
83
84
85
86
88
89
92 rc =
cmd->exec ( argc, (
char ** ) argv );
94 }
95 }
96
99
101
106 }
107
109}
#define NULL
NULL pointer (VOID *)
struct bofm_section_header done
int errno
Global "last error" number.
static void reset_getopt(void)
Reset getopt() internal state.
#define DBG(...)
Print a debugging message.
#define EINVAL
Invalid argument.
#define ENOEXEC
Exec format error.
int strcmp(const char *first, const char *second)
Compare strings.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
int printf(const char *fmt,...)
Write a formatted string to the console.
References cmd, COMMANDS, DBG, done, EINVAL, ENOEXEC, errno, for_each_table_entry, NULL, printf(), rc, reset_getopt(), and strcmp().
Referenced by system(), and time_exec().
◆ usleep()