|
|
@ -30,7 +30,7 @@ int main() |
|
|
|
char *cmdline = NULL, *pwd = NULL; |
|
|
|
char *args[ARGS_MAX_QUANTITY]; |
|
|
|
int status = 1; |
|
|
|
pwd = (char *)calloc(PATH_MAX, sizeof(char)); |
|
|
|
pwd = (char *)calloc(PATH_MAX_SIZE, sizeof(char)); |
|
|
|
for (int i = 0; i < CMDLINE_HISTORY_MAX_QUANTITY; i++) |
|
|
|
{ |
|
|
|
history[i] = (char *)calloc(CMDLINE_MAX_SIZE, sizeof(char)); |
|
|
@ -48,7 +48,7 @@ int main() |
|
|
|
/* execute the shell's read, parse and execution loop */ |
|
|
|
do |
|
|
|
{ |
|
|
|
if (!getcwd(pwd, PATH_MAX)) |
|
|
|
if (!getcwd(pwd, PATH_MAX_SIZE)) |
|
|
|
{ |
|
|
|
printf("yeeshell: The current path cannot be obtained!\n"); |
|
|
|
exit(0); |
|
|
|