Compare commits

..

No commits in common. "bd4c587409af6cfc4b5d6207458aa4b5ecceaf7d" and "f7cf395f715aa579aa9c042c91c75cca5e5043a9" have entirely different histories.

2 changed files with 6 additions and 14 deletions

View File

@ -1,4 +1,3 @@
#include <errno.h>
#include <luna.h>
#include <stdio.h>
#include <stdlib.h>
@ -105,17 +104,6 @@ void command_execute(command* cmd)
}
if (child == 0)
{
if (cmd->buffer[0] != '/' && access(cmd->buffer, F_OK) < 0) // FIXME: Race condition.
{
if (errno == ENOENT)
{ // Try in /bin
char* buf = malloc(cmd->size + 6);
strlcpy(buf, "/bin/", 6);
strncat(buf, cmd->buffer, cmd->size);
execv(buf, NULL);
}
}
else
execv(cmd->buffer, NULL);
perror(cmd->buffer);
exit(127);

View File

@ -104,7 +104,11 @@ VFS::Node* VFS::resolve_path(const char* filename, Node* root)
return 0;
}
Node* child = current_node->find_func(current_node, buffer);
if (!child) { return 0; }
if (!child)
{
kwarnln("Current node did not find our target node");
return 0;
}
if (child->flags & VFS_MOUNTPOINT)
{
if (!child->link)