summaryrefslogtreecommitdiff
path: root/firmware/common/file.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-10-25 12:36:57 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-10-25 12:36:57 +0000
commit01cdb6a21f0a7737bc51c4997d66bd152db694a8 (patch)
treecc98be9a47e120f62c3b946d2589f00831b7d178 /firmware/common/file.c
parent0952848368e403f81541e222f941ec46b0e583a4 (diff)
downloadrockbox-01cdb6a21f0a7737bc51c4997d66bd152db694a8.tar.gz
rockbox-01cdb6a21f0a7737bc51c4997d66bd152db694a8.zip
Fix screendump on iPod Nano 2G by increasing the usb thread stack size and reducing the stack usage of FAT and storage functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28356 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/file.c')
-rw-r--r--firmware/common/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 53a1a35b31..da85846a34 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -65,7 +65,8 @@ static int open_internal(const char* pathname, int flags, bool use_cache)
65 DIR_UNCACHED* dir; 65 DIR_UNCACHED* dir;
66 struct dirent_uncached* entry; 66 struct dirent_uncached* entry;
67 int fd; 67 int fd;
68 char pathnamecopy[MAX_PATH]; 68 int pathnamesize = strlen(pathname) + 1;
69 char pathnamecopy[pathnamesize];
69 char* name; 70 char* name;
70 struct filedesc* file = NULL; 71 struct filedesc* file = NULL;
71 int rc; 72 int rc;
@@ -133,7 +134,7 @@ static int open_internal(const char* pathname, int flags, bool use_cache)
133 } 134 }
134#endif 135#endif
135 136
136 strlcpy(pathnamecopy, pathname, sizeof(pathnamecopy)); 137 strlcpy(pathnamecopy, pathname, pathnamesize);
137 138
138 /* locate filename */ 139 /* locate filename */
139 name=strrchr(pathnamecopy+1,'/'); 140 name=strrchr(pathnamecopy+1,'/');