This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

JFFS2 does not honor O_TRUNC


Here is a patch that fixes another issue with JFFS2.
This error would prevent any existing files opened with
O_TRUNC from being truncated.


--- packages-orig/fs/jffs2/current/ChangeLog    Wed Mar  3 00:02:21 2004
+++ packages/fs/jffs2/current/ChangeLog Wed Mar  3 00:17:19 2004
@@ -1,3 +1,8 @@
+2004-03-03  Thomas Koeller  <thomas.koeller@baslerweb.com>
+
+       * src/fs-ecos.c:
+       Make JFFS2 honor O_TRUNC flag when opening files /w read access.
+
 2004-02-17  David Woodhouse  <dwmw2@redhat.com>

        * src/fs-ecos.c:
diff -ru packages-orig/fs/jffs2/current/src/fs-ecos.c 
packages/fs/jffs2/current/src/fs-ecos.c
--- packages-orig/fs/jffs2/current/src/fs-ecos.c        Wed Mar  3 00:02:21 
2004
+++ packages/fs/jffs2/current/src/fs-ecos.c     Wed Mar  3 00:13:52 2004
@@ -726,7 +726,7 @@
                return EISDIR;
        }

-#ifndef CYGOPT_FS_JFFS2_WRITE
+#ifdef CYGOPT_FS_JFFS2_WRITE
        if (mode & O_TRUNC) {
                struct jffs2_inode_info *f = JFFS2_INODE_INFO(node);
                struct jffs2_sb_info *c = JFFS2_SB_INFO(node->i_sb);

-- 
Thomas Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany

Tel +49 (4102) 463-162
Fax +49 (4102) 463-239

mailto:thomas.koeller@baslerweb.com
http://www.baslerweb.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]