summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/mkdir.c2
-rw-r--r--fs/fs.c8
-rw-r--r--include/fs.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/commands/mkdir.c b/commands/mkdir.c
index d0cbcb5d02..4889ec4cf0 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -35,7 +35,7 @@ static int do_mkdir (cmd_tbl_t *cmdtp, int argc, char *argv[])
}
while (i < argc) {
- if (mkdir(argv[i])) {
+ if (mkdir(argv[i], 0)) {
printf("could not create %s: %s\n", argv[i], errno_str());
return 1;
}
diff --git a/fs/fs.c b/fs/fs.c
index 23a1aa0ad6..75c73e125b 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -346,7 +346,7 @@ out:
return errno;
}
-int open(const char *pathname, int flags)
+int open(const char *pathname, int flags, ...)
{
struct device_d *dev;
struct fs_driver_d *fsdrv;
@@ -511,7 +511,7 @@ int erase(int fd, size_t count, unsigned long offset)
if (fsdrv->erase)
errno = fsdrv->erase(dev, f, count, offset);
else
- errno = -EINVAL;
+ errno = -ENOSYS;
return errno;
}
@@ -532,7 +532,7 @@ int protect(int fd, size_t count, unsigned long offset, int prot)
if (fsdrv->protect)
errno = fsdrv->protect(dev, f, count, offset, prot);
else
- errno = -EINVAL;
+ errno = -ENOSYS;
return errno;
}
@@ -763,7 +763,7 @@ out:
return errno;
}
-int mkdir (const char *pathname)
+int mkdir (const char *pathname, mode_t mode)
{
struct fs_driver_d *fsdrv;
struct device_d *dev;
diff --git a/include/fs.h b/include/fs.h
index f2a9f49859..bc2ed6ccbe 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -86,7 +86,7 @@ struct fs_device_d {
/*
* standard posix file functions
*/
-int open(const char *pathname, int flags);
+int open(const char *pathname, int flags, ...);
int creat(const char *pathname, mode_t mode);
int unlink(const char *pathname);
int close(int fd);
@@ -99,7 +99,7 @@ ssize_t write(int fd, const void *buf, size_t count);
#define SEEK_END 3
off_t lseek(int fildes, off_t offset, int whence);
-int mkdir (const char *pathname);
+int mkdir (const char *pathname, mode_t mode);
int rmdir (const char *pathname);
const char *getcwd(void);