forked from len0rd/rockbox
Removed unused 'mode' parameter from mkdir() for consistency with creat().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12183 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ae6abfb094
commit
6b0fdae0f6
13 changed files with 21 additions and 24 deletions
|
|
@ -90,12 +90,12 @@
|
||||||
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
|
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
|
||||||
|
|
||||||
/* increase this every time the api struct changes */
|
/* increase this every time the api struct changes */
|
||||||
#define CODEC_API_VERSION 11
|
#define CODEC_API_VERSION 12
|
||||||
|
|
||||||
/* update this to latest version if a change to the api struct breaks
|
/* update this to latest version if a change to the api struct breaks
|
||||||
backwards compatibility (and please take the opportunity to sort in any
|
backwards compatibility (and please take the opportunity to sort in any
|
||||||
new function which are "waiting" at the end of the function table) */
|
new function which are "waiting" at the end of the function table) */
|
||||||
#define CODEC_MIN_API_VERSION 11
|
#define CODEC_MIN_API_VERSION 12
|
||||||
|
|
||||||
/* codec return codes */
|
/* codec return codes */
|
||||||
enum codec_status {
|
enum codec_status {
|
||||||
|
|
@ -192,7 +192,7 @@ struct codec_api {
|
||||||
DIR* (*PREFIX(opendir))(const char* name);
|
DIR* (*PREFIX(opendir))(const char* name);
|
||||||
int (*PREFIX(closedir))(DIR* dir);
|
int (*PREFIX(closedir))(DIR* dir);
|
||||||
struct dirent* (*PREFIX(readdir))(DIR* dir);
|
struct dirent* (*PREFIX(readdir))(DIR* dir);
|
||||||
int (*PREFIX(mkdir))(const char *name, int mode);
|
int (*PREFIX(mkdir))(const char *name);
|
||||||
|
|
||||||
/* kernel/ system */
|
/* kernel/ system */
|
||||||
void (*PREFIX(sleep))(int ticks);
|
void (*PREFIX(sleep))(int ticks);
|
||||||
|
|
|
||||||
|
|
@ -573,7 +573,7 @@ static bool create_dir(void)
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
rc = mkdir(dirname, 0);
|
rc = mkdir(dirname);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
gui_syncsplash(HZ, true, (unsigned char *)"%s %s",
|
gui_syncsplash(HZ, true, (unsigned char *)"%s %s",
|
||||||
str(LANG_CREATE_DIR), str(LANG_FAILED));
|
str(LANG_CREATE_DIR), str(LANG_FAILED));
|
||||||
|
|
@ -733,7 +733,7 @@ static bool clipboard_pastedirectory(char *src, int srclen, char *target, int ta
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
/* Make a directory to copy things to */
|
/* Make a directory to copy things to */
|
||||||
result = mkdir(target, 0) == 0;
|
result = mkdir(target) == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ static int initialize_catalog(void)
|
||||||
|
|
||||||
if (!playlist_dir_exists)
|
if (!playlist_dir_exists)
|
||||||
{
|
{
|
||||||
if (mkdir(playlist_dir, 0) < 0) {
|
if (mkdir(playlist_dir) < 0) {
|
||||||
gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY),
|
gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY),
|
||||||
playlist_dir);
|
playlist_dir);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -110,12 +110,12 @@
|
||||||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||||
|
|
||||||
/* increase this every time the api struct changes */
|
/* increase this every time the api struct changes */
|
||||||
#define PLUGIN_API_VERSION 42
|
#define PLUGIN_API_VERSION 43
|
||||||
|
|
||||||
/* update this to latest version if a change to the api struct breaks
|
/* update this to latest version if a change to the api struct breaks
|
||||||
backwards compatibility (and please take the opportunity to sort in any
|
backwards compatibility (and please take the opportunity to sort in any
|
||||||
new function which are "waiting" at the end of the function table) */
|
new function which are "waiting" at the end of the function table) */
|
||||||
#define PLUGIN_MIN_API_VERSION 42
|
#define PLUGIN_MIN_API_VERSION 43
|
||||||
|
|
||||||
/* plugin return codes */
|
/* plugin return codes */
|
||||||
enum plugin_status {
|
enum plugin_status {
|
||||||
|
|
@ -320,7 +320,7 @@ struct plugin_api {
|
||||||
DIR* (*PREFIX(opendir))(const char* name);
|
DIR* (*PREFIX(opendir))(const char* name);
|
||||||
int (*PREFIX(closedir))(DIR* dir);
|
int (*PREFIX(closedir))(DIR* dir);
|
||||||
struct dirent* (*PREFIX(readdir))(DIR* dir);
|
struct dirent* (*PREFIX(readdir))(DIR* dir);
|
||||||
int (*PREFIX(mkdir))(const char *name, int mode);
|
int (*PREFIX(mkdir))(const char *name);
|
||||||
int (*PREFIX(rmdir))(const char *name);
|
int (*PREFIX(rmdir))(const char *name);
|
||||||
/* dir, cached */
|
/* dir, cached */
|
||||||
#ifdef HAVE_DIRCACHE
|
#ifdef HAVE_DIRCACHE
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ char *my_strtok( char * s, const char * delim );
|
||||||
#undef filesize
|
#undef filesize
|
||||||
#define opendir(a) rb->sim_opendir((a))
|
#define opendir(a) rb->sim_opendir((a))
|
||||||
#define closedir(a) rb->sim_closedir((a))
|
#define closedir(a) rb->sim_closedir((a))
|
||||||
#define mkdir(a,b) rb->sim_mkdir((a),(b))
|
#define mkdir(a) rb->sim_mkdir((a))
|
||||||
#define open(a,b) rb->sim_open((a),(b))
|
#define open(a,b) rb->sim_open((a),(b))
|
||||||
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
|
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
|
||||||
#define filesize(a) rb->sim_filesize((a))
|
#define filesize(a) rb->sim_filesize((a))
|
||||||
|
|
@ -56,7 +56,7 @@ char *my_strtok( char * s, const char * delim );
|
||||||
#define opendir(a) rb->opendir((a))
|
#define opendir(a) rb->opendir((a))
|
||||||
#define closedir(a) rb->closedir((a))
|
#define closedir(a) rb->closedir((a))
|
||||||
#define filesize(a) rb->filesize((a))
|
#define filesize(a) rb->filesize((a))
|
||||||
#define mkdir(a) rb->mkdir((a),0777)
|
#define mkdir(a) rb->mkdir((a))
|
||||||
#define open(a,b) my_open((a),(b))
|
#define open(a,b) my_open((a),(b))
|
||||||
#define close(a) my_close((a))
|
#define close(a) my_close((a))
|
||||||
#define lseek(a,b,c) rb->lseek((a),(b),(c))
|
#define lseek(a,b,c) rb->lseek((a),(b),(c))
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ void loader_init(char *s)
|
||||||
// sys_checkdir(savedir, 1); /* needs to be writable */
|
// sys_checkdir(savedir, 1); /* needs to be writable */
|
||||||
/* dir=opendir(savedir); // should be handled when the program opens
|
/* dir=opendir(savedir); // should be handled when the program opens
|
||||||
if(!dir)
|
if(!dir)
|
||||||
mkdir(savedir,0);
|
mkdir(savedir);
|
||||||
else
|
else
|
||||||
closedir(dir);*/
|
closedir(dir);*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ void setoptions (void)
|
||||||
|
|
||||||
dir=opendir(savedir);
|
dir=opendir(savedir);
|
||||||
if(!dir)
|
if(!dir)
|
||||||
mkdir(savedir,0);
|
mkdir(savedir);
|
||||||
else
|
else
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ void setvidmode(int mode);
|
||||||
#undef closedir
|
#undef closedir
|
||||||
#define closedir(a) rb->sim_closedir((a))
|
#define closedir(a) rb->sim_closedir((a))
|
||||||
#undef mkdir
|
#undef mkdir
|
||||||
#define mkdir(a,b) rb->sim_mkdir((a),(b))
|
#define mkdir(a) rb->sim_mkdir((a))
|
||||||
#undef open
|
#undef open
|
||||||
#define open(a,b) rb->sim_open((a),(b))
|
#define open(a,b) rb->sim_open((a),(b))
|
||||||
#undef close
|
#undef close
|
||||||
|
|
@ -75,7 +75,7 @@ void setvidmode(int mode);
|
||||||
#else /* !SIMULATOR */
|
#else /* !SIMULATOR */
|
||||||
#define opendir(a) rb->opendir((a))
|
#define opendir(a) rb->opendir((a))
|
||||||
#define closedir(a) rb->closedir((a))
|
#define closedir(a) rb->closedir((a))
|
||||||
#define mkdir(a,b) rb->mkdir((a),(b))
|
#define mkdir(a) rb->mkdir((a))
|
||||||
#define open(a,b) rb->open((a),(b))
|
#define open(a,b) rb->open((a),(b))
|
||||||
#define lseek(a,b,c) rb->lseek((a),(b),(c))
|
#define lseek(a,b,c) rb->lseek((a),(b),(c))
|
||||||
#define close(a) rb->close((a))
|
#define close(a) rb->close((a))
|
||||||
|
|
|
||||||
|
|
@ -1169,7 +1169,7 @@ static bool save_preset_list(void)
|
||||||
bool bad_file_name = true;
|
bool bad_file_name = true;
|
||||||
|
|
||||||
if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */
|
if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */
|
||||||
mkdir(FMPRESET_PATH, 0);
|
mkdir(FMPRESET_PATH);
|
||||||
|
|
||||||
create_numbered_filename(filepreset, FMPRESET_PATH, "preset",
|
create_numbered_filename(filepreset, FMPRESET_PATH, "preset",
|
||||||
".fmr", 2 IF_CNFN_NUM_(, NULL));
|
".fmr", 2 IF_CNFN_NUM_(, NULL));
|
||||||
|
|
|
||||||
|
|
@ -526,7 +526,7 @@ int rec_create_directory(void)
|
||||||
/* Try to create the base directory if needed */
|
/* Try to create the base directory if needed */
|
||||||
if(global_settings.rec_directory == 0)
|
if(global_settings.rec_directory == 0)
|
||||||
{
|
{
|
||||||
rc = mkdir(rec_base_directory, 0);
|
rc = mkdir(rec_base_directory);
|
||||||
if(rc < 0 && errno != EEXIST)
|
if(rc < 0 && errno != EEXIST)
|
||||||
{
|
{
|
||||||
gui_syncsplash(HZ * 2, true,
|
gui_syncsplash(HZ * 2, true,
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ struct dirent* readdir(DIR* dir)
|
||||||
return theent;
|
return theent;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mkdir(const char *name, int mode)
|
int mkdir(const char *name)
|
||||||
{
|
{
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
char namecopy[MAX_PATH];
|
char namecopy[MAX_PATH];
|
||||||
|
|
@ -230,8 +230,6 @@ int mkdir(const char *name, int mode)
|
||||||
struct fat_dir newdir;
|
struct fat_dir newdir;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
(void)mode;
|
|
||||||
|
|
||||||
if ( name[0] != '/' ) {
|
if ( name[0] != '/' ) {
|
||||||
DEBUGF("mkdir: Only absolute paths supported right now\n");
|
DEBUGF("mkdir: Only absolute paths supported right now\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
#define opendir(x) sim_opendir(x)
|
#define opendir(x) sim_opendir(x)
|
||||||
#define readdir(x) sim_readdir(x)
|
#define readdir(x) sim_readdir(x)
|
||||||
#define closedir(x) sim_closedir(x)
|
#define closedir(x) sim_closedir(x)
|
||||||
#define mkdir(x, y) sim_mkdir(x, y)
|
#define mkdir(x) sim_mkdir(x)
|
||||||
#define rmdir(x) sim_rmdir(x)
|
#define rmdir(x) sim_rmdir(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ typedef struct {
|
||||||
|
|
||||||
extern DIR* opendir(const char* name);
|
extern DIR* opendir(const char* name);
|
||||||
extern int closedir(DIR* dir);
|
extern int closedir(DIR* dir);
|
||||||
extern int mkdir(const char* name, int mode);
|
extern int mkdir(const char* name);
|
||||||
extern int rmdir(const char* name);
|
extern int rmdir(const char* name);
|
||||||
|
|
||||||
extern struct dirent* readdir(DIR* dir);
|
extern struct dirent* readdir(DIR* dir);
|
||||||
|
|
|
||||||
|
|
@ -211,9 +211,8 @@ int sim_creat(const char *name)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int sim_mkdir(const char *name, mode_t mode)
|
int sim_mkdir(const char *name)
|
||||||
{
|
{
|
||||||
(void)mode;
|
|
||||||
#ifdef __PCTOOL__
|
#ifdef __PCTOOL__
|
||||||
# ifdef WIN32
|
# ifdef WIN32
|
||||||
return mkdir(name);
|
return mkdir(name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue