}
/**
- * \fn int Proc_Execve(char *File, char **ArgV, char **EnvP)
* \brief Replace the current user image with another
* \param File File to load as the next image
* \param ArgV Arguments to pass to user
argenvBytes += strlen(ArgV[argc])+1;
for( envc = 0; EnvP && EnvP[envc]; envc++ )
argenvBytes += strlen(EnvP[envc])+1;
+ LOG("argc = %i, envc = %i", envc);
argenvBytes = (argenvBytes + sizeof(void*)-1) & ~(sizeof(void*)-1);
argenvBytes += (argc+1)*sizeof(void*) + (envc+1)*sizeof(void*);
{
argvSaved[i] = strBuf;
strcpy(argvSaved[i], ArgV[i]);
+ LOG("argv[%i] = '%s'", i, strBuf);
strBuf += strlen(ArgV[i])+1;
}
argvSaved[i] = NULL;
for( i = 0; i < envc; i++ )
{
envpSaved[i] = strBuf;
+ LOG("envp[%i] = '%s'", i, strBuf);
strcpy(envpSaved[i], EnvP[i]);
strBuf += strlen(EnvP[i])+1;
}
}
}
- Log_Debug("Binary", "PID %i - Mapped '%s' to 0x%x", Threads_GetPID(), Path, base);
+ Log_Debug("Binary", "PID %i - Mapped '%s' to %p", Threads_GetPID(), Path, base);
VFS_Close(fd);
LEAVE('p', base);