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 */
|
||||
|
||||
/* 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
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
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 */
|
||||
enum codec_status {
|
||||
|
|
@ -192,7 +192,7 @@ struct codec_api {
|
|||
DIR* (*PREFIX(opendir))(const char* name);
|
||||
int (*PREFIX(closedir))(DIR* dir);
|
||||
struct dirent* (*PREFIX(readdir))(DIR* dir);
|
||||
int (*PREFIX(mkdir))(const char *name, int mode);
|
||||
int (*PREFIX(mkdir))(const char *name);
|
||||
|
||||
/* kernel/ system */
|
||||
void (*PREFIX(sleep))(int ticks);
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ static bool create_dir(void)
|
|||
if (rc < 0)
|
||||
return false;
|
||||
|
||||
rc = mkdir(dirname, 0);
|
||||
rc = mkdir(dirname);
|
||||
if (rc < 0) {
|
||||
gui_syncsplash(HZ, true, (unsigned char *)"%s %s",
|
||||
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;
|
||||
} else {
|
||||
/* 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 (mkdir(playlist_dir, 0) < 0) {
|
||||
if (mkdir(playlist_dir) < 0) {
|
||||
gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY),
|
||||
playlist_dir);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@
|
|||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||
|
||||
/* 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
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
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 */
|
||||
enum plugin_status {
|
||||
|
|
@ -320,7 +320,7 @@ struct plugin_api {
|
|||
DIR* (*PREFIX(opendir))(const char* name);
|
||||
int (*PREFIX(closedir))(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);
|
||||
/* dir, cached */
|
||||
#ifdef HAVE_DIRCACHE
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ char *my_strtok( char * s, const char * delim );
|
|||
#undef filesize
|
||||
#define opendir(a) rb->sim_opendir((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 lseek(a,b,c) rb->sim_lseek((a),(b),(c))
|
||||
#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 closedir(a) rb->closedir((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 close(a) my_close((a))
|
||||
#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 */
|
||||
/* dir=opendir(savedir); // should be handled when the program opens
|
||||
if(!dir)
|
||||
mkdir(savedir,0);
|
||||
mkdir(savedir);
|
||||
else
|
||||
closedir(dir);*/
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ void setoptions (void)
|
|||
|
||||
dir=opendir(savedir);
|
||||
if(!dir)
|
||||
mkdir(savedir,0);
|
||||
mkdir(savedir);
|
||||
else
|
||||
closedir(dir);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void setvidmode(int mode);
|
|||
#undef closedir
|
||||
#define closedir(a) rb->sim_closedir((a))
|
||||
#undef mkdir
|
||||
#define mkdir(a,b) rb->sim_mkdir((a),(b))
|
||||
#define mkdir(a) rb->sim_mkdir((a))
|
||||
#undef open
|
||||
#define open(a,b) rb->sim_open((a),(b))
|
||||
#undef close
|
||||
|
|
@ -75,7 +75,7 @@ void setvidmode(int mode);
|
|||
#else /* !SIMULATOR */
|
||||
#define opendir(a) rb->opendir((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 lseek(a,b,c) rb->lseek((a),(b),(c))
|
||||
#define close(a) rb->close((a))
|
||||
|
|
|
|||
|
|
@ -1169,7 +1169,7 @@ static bool save_preset_list(void)
|
|||
bool bad_file_name = true;
|
||||
|
||||
if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */
|
||||
mkdir(FMPRESET_PATH, 0);
|
||||
mkdir(FMPRESET_PATH);
|
||||
|
||||
create_numbered_filename(filepreset, FMPRESET_PATH, "preset",
|
||||
".fmr", 2 IF_CNFN_NUM_(, NULL));
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ int rec_create_directory(void)
|
|||
/* Try to create the base directory if needed */
|
||||
if(global_settings.rec_directory == 0)
|
||||
{
|
||||
rc = mkdir(rec_base_directory, 0);
|
||||
rc = mkdir(rec_base_directory);
|
||||
if(rc < 0 && errno != EEXIST)
|
||||
{
|
||||
gui_syncsplash(HZ * 2, true,
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ struct dirent* readdir(DIR* dir)
|
|||
return theent;
|
||||
}
|
||||
|
||||
int mkdir(const char *name, int mode)
|
||||
int mkdir(const char *name)
|
||||
{
|
||||
DIR *dir;
|
||||
char namecopy[MAX_PATH];
|
||||
|
|
@ -230,8 +230,6 @@ int mkdir(const char *name, int mode)
|
|||
struct fat_dir newdir;
|
||||
int rc;
|
||||
|
||||
(void)mode;
|
||||
|
||||
if ( name[0] != '/' ) {
|
||||
DEBUGF("mkdir: Only absolute paths supported right now\n");
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#define opendir(x) sim_opendir(x)
|
||||
#define readdir(x) sim_readdir(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)
|
||||
#endif
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ typedef struct {
|
|||
|
||||
extern DIR* opendir(const char* name);
|
||||
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 struct dirent* readdir(DIR* dir);
|
||||
|
|
|
|||
|
|
@ -211,9 +211,8 @@ int sim_creat(const char *name)
|
|||
#endif
|
||||
}
|
||||
|
||||
int sim_mkdir(const char *name, mode_t mode)
|
||||
int sim_mkdir(const char *name)
|
||||
{
|
||||
(void)mode;
|
||||
#ifdef __PCTOOL__
|
||||
# ifdef WIN32
|
||||
return mkdir(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue