Update kernel

This commit is contained in:
EnderIce2
2024-01-19 06:47:42 +02:00
parent fd15592608
commit 96daa43d38
282 changed files with 25486 additions and 15700 deletions

View File

@ -22,26 +22,26 @@
void targp_parse(const char *cmd, char **argv, int *argc)
{
const char delim[] = " ";
const char delim[] = " ";
char *token = strtok((char *)cmd, delim);
while (token != NULL)
{
char *quote = strchr(token, '"');
if (quote != NULL)
{
memmove(quote, quote + 1, strlen(quote));
char *endQuote = strchr(quote, '"');
if (endQuote != NULL)
*endQuote = '\0';
}
char *token = strtok((char *)cmd, delim);
while (token != NULL)
{
char *quote = strchr(token, '"');
if (quote != NULL)
{
memmove(quote, quote + 1, strlen(quote));
char *endQuote = strchr(quote, '"');
if (endQuote != NULL)
*endQuote = '\0';
}
char *arg = (char *)kmalloc(strlen(token) + 1);
strcpy(arg, token);
char *arg = (char *)kmalloc(strlen(token) + 1);
strcpy(arg, token);
argv[(*argc)++] = arg;
argv[(*argc)++] = arg;
token = strtok(NULL, delim);
}
argv[(*argc)] = NULL;
token = strtok(NULL, delim);
}
argv[(*argc)] = NULL;
}