projects
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b7ef76
)
fat: fix setting wrong short file name having no extenstion
author
Donggeun Kim
<dg77.kim@samsung.com>
Fri, 24 Dec 2010 04:45:02 +0000
(13:45 +0900)
committer
Donggeun Kim
<dg77.kim@samsung.com>
Fri, 24 Dec 2010 04:45:02 +0000
(13:45 +0900)
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
fs/fat/fat_write.c
patch
|
blob
|
history
diff --git
a/fs/fat/fat_write.c
b/fs/fat/fat_write.c
index
ca1b1fb
..
bc6358c
100644
(file)
--- a/
fs/fat/fat_write.c
+++ b/
fs/fat/fat_write.c
@@
-85,7
+85,7
@@
static void set_name (dir_entry *dirent, const char *filename)
period = strchr(s_name, '.');
if (period == NULL) {
- period_location = len
- 1
;
+ period_location = len;
ext_num = 0;
} else {
period_location = period - s_name;
@@
-108,7
+108,7
@@
static void set_name (dir_entry *dirent, const char *filename)
if (ext_num < 3) {
memcpy(dirent->ext, s_name + period_location + 1, ext_num);
for (i = ext_num; i < 3; i++)
- dirent->
name
[i] = ' ';
+ dirent->
ext
[i] = ' ';
} else
memcpy(dirent->ext, s_name + period_location + 1, 3);