forked from len0rd/rockbox
create_dos_name() return value was meaningless.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6333 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a07c73532c
commit
e4e1f2c0dd
1 changed files with 3 additions and 6 deletions
|
@ -237,7 +237,7 @@ static int update_fsinfo(IF_MV_NONVOID(struct bpb* fat_bpb));
|
||||||
static int flush_fat(IF_MV_NONVOID(struct bpb* fat_bpb));
|
static int flush_fat(IF_MV_NONVOID(struct bpb* fat_bpb));
|
||||||
static int bpb_is_sane(IF_MV_NONVOID(struct bpb* fat_bpb));
|
static int bpb_is_sane(IF_MV_NONVOID(struct bpb* fat_bpb));
|
||||||
static void *cache_fat_sector(IF_MV2(struct bpb* fat_bpb,) long secnum, bool dirty);
|
static void *cache_fat_sector(IF_MV2(struct bpb* fat_bpb,) long secnum, bool dirty);
|
||||||
static int create_dos_name(const unsigned char *name, unsigned char *newname);
|
static void create_dos_name(const unsigned char *name, unsigned char *newname);
|
||||||
static void randomize_dos_name(unsigned char *name);
|
static void randomize_dos_name(unsigned char *name);
|
||||||
static unsigned long find_free_cluster(IF_MV2(struct bpb* fat_bpb,) unsigned long start);
|
static unsigned long find_free_cluster(IF_MV2(struct bpb* fat_bpb,) unsigned long start);
|
||||||
static int transfer(IF_MV2(struct bpb* fat_bpb,) unsigned long start, long count, char* buf, bool write );
|
static int transfer(IF_MV2(struct bpb* fat_bpb,) unsigned long start, long count, char* buf, bool write );
|
||||||
|
@ -1262,9 +1262,7 @@ static int add_dir_entry(struct fat_dir* dir,
|
||||||
|
|
||||||
entries_needed = 1;
|
entries_needed = 1;
|
||||||
} else {
|
} else {
|
||||||
rc = create_dos_name(name, shortname);
|
create_dos_name(name, shortname);
|
||||||
if (rc < 0)
|
|
||||||
return rc * 10 - 0;
|
|
||||||
|
|
||||||
/* one dir entry needed for every 13 bytes of filename,
|
/* one dir entry needed for every 13 bytes of filename,
|
||||||
plus one entry for the short name */
|
plus one entry for the short name */
|
||||||
|
@ -1421,7 +1419,7 @@ unsigned char char2dos(unsigned char c)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int create_dos_name(const unsigned char *name, unsigned char *newname)
|
static void create_dos_name(const unsigned char *name, unsigned char *newname)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
unsigned char *ext;
|
unsigned char *ext;
|
||||||
|
@ -1456,7 +1454,6 @@ static int create_dos_name(const unsigned char *name, unsigned char *newname)
|
||||||
newname[i++] = c;
|
newname[i++] = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void randomize_dos_name(unsigned char *name)
|
static void randomize_dos_name(unsigned char *name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue