summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-06 17:35:04 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-06 17:35:04 +0000
commitc61e89c0eda126c2c1a4a3983520c35fe30db156 (patch)
tree1285f8cbde5485f93f8653f31ea0454587dd741e /uisimulator
parent684c70bac5f27e8dec49e113563cf6e496da854d (diff)
downloadrockbox-c61e89c0eda126c2c1a4a3983520c35fe30db156.tar.gz
rockbox-c61e89c0eda126c2c1a4a3983520c35fe30db156.zip
Make creat() posix compliant API-wise. Shouldn't affect the core as it's wrapped via a static inline.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25843 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/io.c4
-rw-r--r--uisimulator/sdl/lcd-charcells.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c
index 20f5a368f4..f794d5fbc3 100644
--- a/uisimulator/common/io.c
+++ b/uisimulator/common/io.c
@@ -352,9 +352,9 @@ int sim_close(int fd)
352 return ret; 352 return ret;
353} 353}
354 354
355int sim_creat(const char *name) 355int sim_creat(const char *name, mode_t mode)
356{ 356{
357 return OPEN(get_sim_pathname(name), O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666); 357 return OPEN(get_sim_pathname(name), O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, mode);
358} 358}
359 359
360ssize_t sim_read(int fd, void *buf, size_t count) 360ssize_t sim_read(int fd, void *buf, size_t count)
diff --git a/uisimulator/sdl/lcd-charcells.c b/uisimulator/sdl/lcd-charcells.c
index 5a06af53ab..05513ab266 100644
--- a/uisimulator/sdl/lcd-charcells.c
+++ b/uisimulator/sdl/lcd-charcells.c
@@ -38,7 +38,7 @@
38#endif 38#endif
39 39
40/* extern functions, needed for screendump() */ 40/* extern functions, needed for screendump() */
41extern int sim_creat(const char *name); 41extern int sim_creat(const char *name, mode_t mode);
42 42
43SDL_Surface* lcd_surface; 43SDL_Surface* lcd_surface;
44 44
@@ -162,7 +162,7 @@ void screen_dump(void)
162 IF_CNFN_NUM_(, NULL)); 162 IF_CNFN_NUM_(, NULL));
163 DEBUGF("screen_dump\n"); 163 DEBUGF("screen_dump\n");
164 164
165 fd = sim_creat(filename); 165 fd = sim_creat(filename, 0666);
166 if (fd < 0) 166 if (fd < 0)
167 return; 167 return;
168 168