summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs_fchmod.c
diff options
context:
space:
mode:
authorEric Norum <WENorum@lbl.gov>2005-02-08 17:12:54 +0000
committerEric Norum <WENorum@lbl.gov>2005-02-08 17:12:54 +0000
commit624867bc09632b9c98235073f9a1b4f130233c47 (patch)
tree3f2c55aaa075ed371dcc4059d6f673d801240d2a /cpukit/libfs/src/imfs/imfs_fchmod.c
parent2005-02-08 Ralf Corsepius <ralf.corsepius@rtems.org> (diff)
downloadrtems-624867bc09632b9c98235073f9a1b4f130233c47.tar.bz2
Add copy-on-write semantics to rtems_tarfs_load().
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_fchmod.c')
-rw-r--r--cpukit/libfs/src/imfs/imfs_fchmod.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c
index 4d30b98781..55c1cfe42f 100644
--- a/cpukit/libfs/src/imfs/imfs_fchmod.c
+++ b/cpukit/libfs/src/imfs/imfs_fchmod.c
@@ -56,25 +56,6 @@ int IMFS_fchmod(
if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) )
rtems_set_errno_and_return_minus_one( EPERM );
- /*
- * If we make a linear-file writeable, construct a block file
- * from it first.
- */
- if ( (jnode->type == IMFS_LINEAR_FILE) &&
- (mode & (S_IWUSR | S_IWGRP | S_IWOTH)) )
- {
- uint32_t count = jnode->info.linearfile.size;
- const unsigned char *buffer = jnode->info.linearfile.direct;
-
- jnode->type = IMFS_MEMORY_FILE;
- jnode->info.file.size = 0;
- jnode->info.file.indirect = 0;
- jnode->info.file.doubly_indirect = 0;
- jnode->info.file.triply_indirect = 0;
- if (IMFS_memfile_write(jnode, 0, buffer, count) == -1)
- return(-1);
- }
-
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
jnode->st_mode |= mode;