X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..b0d623f7f2ae71ed96e60569f61f9a9a27016e80:/pexpert/gen/bootargs.c diff --git a/pexpert/gen/bootargs.c b/pexpert/gen/bootargs.c index d7d0a3cd4..4c5b5f07d 100644 --- a/pexpert/gen/bootargs.c +++ b/pexpert/gen/bootargs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -31,11 +31,12 @@ extern boolean_t isargsep( char c); extern int argstrcpy(char *from, char *to); extern int getval(char *s, int *val); -int argstrcpy2(char *from,char *to, unsigned maxlen); +static int argstrcpy2(char *from,char *to, unsigned maxlen); #define NUM 0 #define STR 1 +#if !defined(__LP64__) && !defined(__arm__) boolean_t PE_parse_boot_arg( const char *arg_string, @@ -50,6 +51,7 @@ PE_parse_boot_arg( return PE_parse_boot_argn(arg_string, arg_ptr, max_len); } +#endif boolean_t PE_parse_boot_argn( @@ -69,7 +71,7 @@ PE_parse_boot_argn( arg_found = FALSE; - while(isargsep(*args)) args++; + while(*args && isargsep(*args)) args++; while (*args) { @@ -95,7 +97,7 @@ PE_parse_boot_argn( arg_found = TRUE; break; } else { - while (isargsep (*cp)) + while (*cp && isargsep (*cp)) cp++; if (*cp == '=' && c != '=') { args = cp+1; @@ -159,7 +161,7 @@ argstrcpy( return(i); } -int +static int argstrcpy2( char *from, char *to,