mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-10 05:13:38 +00:00
Added more descriptive error message for FreeBSD when procfs is not mounted
This commit is contained in:
@@ -447,7 +447,14 @@ void ILibDuktape_ScriptContainer_CheckEmbedded(char **script, int *scriptLen)
|
|||||||
#elif defined(NACL)
|
#elif defined(NACL)
|
||||||
#elif defined(_FREEBSD)
|
#elif defined(_FREEBSD)
|
||||||
int x = readlink("/proc/curproc/file", exePath, sizeof(exePath));
|
int x = readlink("/proc/curproc/file", exePath, sizeof(exePath));
|
||||||
if (x < 0 || x >= sizeof(exePath)) ILIBCRITICALEXIT(246);
|
if (x < 0 || x >= sizeof(exePath))
|
||||||
|
{
|
||||||
|
write(STDOUT_FILENO, "You'll need to mount procfs, which isn't mounted by default on FreeBSD. Add the following line to /etc/fstab\n");
|
||||||
|
write(STDOUT_FILENO, " proc /proc procfs rw 0 0\n\n");
|
||||||
|
write(STDOUT_FILENO, "If you don't reboot after, then you can manually mount with the command:\n");
|
||||||
|
write(STDOUT_FILENO, " mount - t procfs proc / proc\n\n");
|
||||||
|
ILIBCRITICALEXIT(246);
|
||||||
|
}
|
||||||
exePath[x] = 0;
|
exePath[x] = 0;
|
||||||
#else
|
#else
|
||||||
int x = readlink("/proc/self/exe", exePath, sizeof(exePath));
|
int x = readlink("/proc/self/exe", exePath, sizeof(exePath));
|
||||||
|
|||||||
Reference in New Issue
Block a user