Mercurial > ecos-v3_0-branch
diff packages/io/fileio/current/src/file.cxx @ 2838:16018605bc97
* src/file.cxx: add a chmod() call, implemented by calling
cyg_fs_setinfo with parameter FS_INFO_CHMOD
| author | asl |
|---|---|
| date | Mon, 02 Mar 2009 20:55:53 +0000 |
| parents | 74dbf4c3f2e1 |
| children |
line wrap: on
line diff
--- a/packages/io/fileio/current/src/file.cxx +++ b/packages/io/fileio/current/src/file.cxx @@ -41,6 +41,7 @@ // // Author(s): nickg // Contributors: nickg +// Contributors: rutger at cs dot vu dot nl: chmod() // Date: 2000-05-25 // Purpose: Fileio file operations // Description: These are the functions that operate on files as a whole, @@ -901,5 +902,19 @@ extern int access(const char *path, int FILEIO_RETURN(ret); } +//========================================================================== +// chmod + +__externC int chmod(const char *path, mode_t mode) +{ + int ret; + + FILEIO_ENTRY(); + + ret = cyg_fs_setinfo(path, FS_INFO_CHMOD, &mode, sizeof(mode)); + + FILEIO_RETURN(ret); +} + // ------------------------------------------------------------------------- // EOF file.cxx
