use limits.h & PATH_MAX

This commit is contained in:
Dave Murphy 2014-12-15 02:25:36 +00:00
parent b42fdc447c
commit 7e8724f158

View File

@ -30,7 +30,7 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <sys/param.h> #include <limits.h>
#include "common.h" #include "common.h"
#include "partition.h" #include "partition.h"
@ -167,7 +167,7 @@ bool fatInit (uint32_t cacheSize, bool setAsDefaultDevice) {
} }
if (setAsDefaultDevice) { if (setAsDefaultDevice) {
char filePath[MAXPATHLEN * 2]; char filePath[PATH_MAX];
strcpy (filePath, _FAT_disc_interfaces[defaultDevice].name); strcpy (filePath, _FAT_disc_interfaces[defaultDevice].name);
strcat (filePath, ":/"); strcat (filePath, ":/");
#ifdef ARGV_MAGIC #ifdef ARGV_MAGIC