summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/codecs.h6
-rw-r--r--apps/onplay.c4
-rw-r--r--apps/playlist_catalog.c2
-rw-r--r--apps/plugin.h6
-rw-r--r--apps/plugins/doom/rockmacros.h4
-rw-r--r--apps/plugins/rockboy/loader.c2
-rw-r--r--apps/plugins/rockboy/rockboy.c2
-rw-r--r--apps/plugins/rockboy/rockmacros.h4
-rw-r--r--apps/recorder/radio.c2
-rw-r--r--apps/recorder/recording.c2
-rw-r--r--firmware/common/dir.c4
-rw-r--r--firmware/include/dir.h4
-rw-r--r--uisimulator/common/io.c3
13 files changed, 21 insertions, 24 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index 730bacb6df..e474c7a6bb 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -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);
diff --git a/apps/onplay.c b/apps/onplay.c
index b69999dd2c..c2e0576b42 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -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;
}
}
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index 54326d3ff9..d0602991e4 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -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;
diff --git a/apps/plugin.h b/apps/plugin.h
index ad09a71049..00c4326663 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -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
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h
index ff179cfc65..86de4cbe13 100644
--- a/apps/plugins/doom/rockmacros.h
+++ b/apps/plugins/doom/rockmacros.h
@@ -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))
diff --git a/apps/plugins/rockboy/loader.c b/apps/plugins/rockboy/loader.c
index 1dd712f1e5..d6efa2e8ee 100644
--- a/apps/plugins/rockboy/loader.c
+++ b/apps/plugins/rockboy/loader.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);*/
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index d7dd4d8898..beefb210b0 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -79,7 +79,7 @@ void setoptions (void)
dir=opendir(savedir);
if(!dir)
- mkdir(savedir,0);
+ mkdir(savedir);
else
closedir(dir);
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index 3d780a79ac..3bfcf94728 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -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))
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 22ae7b0696..dc533cf017 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -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));
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 266a035632..3ec1446972 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -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,
diff --git a/firmware/common/dir.c b/firmware/common/dir.c
index 00e3ade37d..bc44a53b70 100644
--- a/firmware/common/dir.c
+++ b/firmware/common/dir.c
@@ -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;
diff --git a/firmware/include/dir.h b/firmware/include/dir.h
index c10640199f..c354082bec 100644
--- a/firmware/include/dir.h
+++ b/firmware/include/dir.h
@@ -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);
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c
index ca597e0805..a91b70922c 100644
--- a/uisimulator/common/io.c
+++ b/uisimulator/common/io.c
@@ -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);