mirror of https://github.com/ipxe/ipxe.git
Ignore comment lines.
Avoid returning errors for comments and empty lines.pull/1/head
parent
48e0fc3447
commit
5162f30028
|
@ -133,7 +133,7 @@ static int split_args ( char *args, char * argv[] ) {
|
||||||
int system ( const char *command ) {
|
int system ( const char *command ) {
|
||||||
char *args;
|
char *args;
|
||||||
int argc;
|
int argc;
|
||||||
int rc;
|
int rc = 0;
|
||||||
|
|
||||||
/* Obtain temporary modifiable copy of command line */
|
/* Obtain temporary modifiable copy of command line */
|
||||||
args = strdup ( command );
|
args = strdup ( command );
|
||||||
|
@ -144,11 +144,13 @@ int system ( const char *command ) {
|
||||||
argc = split_args ( args, NULL );
|
argc = split_args ( args, NULL );
|
||||||
|
|
||||||
/* Create argv array and execute command */
|
/* Create argv array and execute command */
|
||||||
{
|
if ( argc ) {
|
||||||
char * argv[argc + 1];
|
char * argv[argc + 1];
|
||||||
|
|
||||||
split_args ( args, argv );
|
split_args ( args, argv );
|
||||||
argv[argc] = NULL;
|
argv[argc] = NULL;
|
||||||
|
|
||||||
|
if ( argv[0][0] != '#' )
|
||||||
rc = execv ( argv[0], argv );
|
rc = execv ( argv[0], argv );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue