mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 01:49:17 +01:00
use limits.h & PATH_MAX
This commit is contained in:
parent
b42fdc447c
commit
7e8724f158
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user