mirror of
https://github.com/fail0verflow/hbc.git
synced 2024-11-25 11:06:56 +01:00
use PATH_MAX instead of MAXPATHLEN
This commit is contained in:
parent
4ad9428dfa
commit
20e887db90
@ -166,7 +166,7 @@ void app_entry_set_sort(app_sort sort) {
|
||||
static app_entry *app_entry_load_single (const char *dirname) {
|
||||
app_entry *entry;
|
||||
app_entry_type type;
|
||||
char tmp[MAXPATHLEN + 32];
|
||||
char tmp[PATH_MAX + 32];
|
||||
struct stat st;
|
||||
|
||||
type = AET_BOOT_ELF;
|
||||
|
@ -703,8 +703,8 @@ static void * ld_load_func (void *arg) {
|
||||
// public loading function
|
||||
|
||||
void loader_load(loader_result *result, view *sub_view, app_entry *entry) {
|
||||
char caption[MAXPATHLEN + 32];
|
||||
char filename[MAXPATHLEN];
|
||||
char caption[PATH_MAX + 32];
|
||||
char filename[PATH_MAX];
|
||||
|
||||
ld_load_arg ta;
|
||||
s32 res;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define _LOADER_H_
|
||||
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <gctypes.h>
|
||||
|
||||
@ -25,7 +26,7 @@ typedef struct {
|
||||
char args[ARGS_MAX_LEN];
|
||||
u32 args_len;
|
||||
|
||||
char dirname[MAXPATHLEN];
|
||||
char dirname[PATH_MAX];
|
||||
u32 bytes;
|
||||
} loader_result;
|
||||
|
||||
|
@ -295,7 +295,7 @@ void main_real(void) {
|
||||
u64 frame;
|
||||
bool exit_about;
|
||||
|
||||
char charbuf[MAXPATHLEN];
|
||||
char charbuf[PATH_MAX];
|
||||
|
||||
load_text();
|
||||
|
||||
|
@ -35,7 +35,7 @@ s32 dir_exists(char *dirname) {
|
||||
}
|
||||
|
||||
static s32 mkdir_hier(char *dirname) {
|
||||
char dir[MAXPATHLEN];
|
||||
char dir[PATH_MAX];
|
||||
size_t i;
|
||||
s32 res;
|
||||
|
||||
@ -84,7 +84,7 @@ static s32 rmdir_hier_iter(const char *dirname) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
char newpath[MAXPATHLEN];
|
||||
char newpath[PATH_MAX];
|
||||
|
||||
while ((de = readdir(d))) {
|
||||
if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
|
||||
@ -118,7 +118,7 @@ exit:
|
||||
}
|
||||
|
||||
static s32 rmdir_hier(const char *dirname) {
|
||||
char buf[MAXPATHLEN];
|
||||
char buf[PATH_MAX];
|
||||
|
||||
sprintf(buf, "%s/%s", app_path, dirname);
|
||||
|
||||
@ -348,7 +348,7 @@ static bool manage_extract_zip(u8 *data, u32 data_len,
|
||||
|
||||
unz_file_info fi;
|
||||
char filename[256];
|
||||
char sd_filename[MAXPATHLEN];
|
||||
char sd_filename[PATH_MAX];
|
||||
char *p;
|
||||
int fd;
|
||||
|
||||
@ -481,7 +481,7 @@ bool manage_run(view *sub_view, const char *dirname,
|
||||
u8 *data, u32 data_len, u32 bytes) {
|
||||
s32 res;
|
||||
u32 progress = 0;
|
||||
char caption[MAXPATHLEN];
|
||||
char caption[PATH_MAX];
|
||||
|
||||
view *v;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user