Compare commits
No commits in common. "bd4c587409af6cfc4b5d6207458aa4b5ecceaf7d" and "f7cf395f715aa579aa9c042c91c75cca5e5043a9" have entirely different histories.
bd4c587409
...
f7cf395f71
@ -1,4 +1,3 @@
|
|||||||
#include <errno.h>
|
|
||||||
#include <luna.h>
|
#include <luna.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -105,17 +104,6 @@ void command_execute(command* cmd)
|
|||||||
}
|
}
|
||||||
if (child == 0)
|
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);
|
execv(cmd->buffer, NULL);
|
||||||
perror(cmd->buffer);
|
perror(cmd->buffer);
|
||||||
exit(127);
|
exit(127);
|
||||||
|
@ -104,7 +104,11 @@ VFS::Node* VFS::resolve_path(const char* filename, Node* root)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Node* child = current_node->find_func(current_node, buffer);
|
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->flags & VFS_MOUNTPOINT)
|
||||||
{
|
{
|
||||||
if (!child->link)
|
if (!child->link)
|
||||||
|
Loading…
Reference in New Issue
Block a user