Merge branch '32-bit-loff_t'
authorCharles Manning <cdhmanning@gmail.com>
Thu, 14 Jun 2012 01:22:40 +0000 (13:22 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 14 Jun 2012 01:22:40 +0000 (13:22 +1200)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/basic-test/yaffscfg2k.c
direct/yaffsfs.c
yaffs_attribs.c
yaffs_guts.c
yaffs_tagscompat.c
yaffs_verify.c

index b857479940e83e4eb9b0b65c107898543082e9bf..bbaacb9e553c3c433fcd56ce25c04eb9397903a7 100644 (file)
@@ -97,6 +97,7 @@ int yaffs_start_up(void)
        m18_1Dev.param.end_block = 31; // Last block
        m18_1Dev.param.use_nand_ecc = 0; // use YAFFS's ECC
        m18_1Dev.param.n_caches = 10; // Use caches
+       m18_1Dev.param.disable_soft_del = 1;
        m18_1Dev.driver_context = (void *) 1;   // Used to identify the device in fstat.
        m18_1Dev.param.write_chunk_fn = ynorif1_WriteChunkToNAND;
        m18_1Dev.param.read_chunk_fn = ynorif1_ReadChunkFromNAND;
index b418ecaaacf724c1943f9841031af81f973fa0a6..d208e25df0b4fdf002bae73547caddcbc7892107 100644 (file)
@@ -394,19 +394,19 @@ static int yaffs_toupper(YCHAR a)
                return a;
 }
 
-int yaffsfs_Match(YCHAR a, YCHAR b)
+static int yaffsfs_Match(YCHAR a, YCHAR b)
 {
        return (yaffs_toupper(a) == yaffs_toupper(b));
 }
 #else
-int yaffsfs_Match(YCHAR a, YCHAR b)
+static int yaffsfs_Match(YCHAR a, YCHAR b)
 {
        /* case sensitive */
        return (a == b);
 }
 #endif
 
-int yaffsfs_IsPathDivider(YCHAR ch)
+static int yaffsfs_IsPathDivider(YCHAR ch)
 {
        const YCHAR *str = YAFFS_PATH_DIVIDERS;
 
@@ -419,7 +419,7 @@ int yaffsfs_IsPathDivider(YCHAR ch)
        return 0;
 }
 
-int yaffsfs_CheckNameLength(const char *name)
+static int yaffsfs_CheckNameLength(const char *name)
 {
        int retVal = 0;
 
@@ -1000,7 +1000,7 @@ int yaffs_open(const YCHAR *path, int oflag, int mode)
                                  YAFFS_SHARE_READ | YAFFS_SHARE_WRITE);
 }
 
-int yaffs_Dofsync(int handle, int datasync)
+static int yaffs_Dofsync(int handle, int datasync)
 {
        int retVal = -1;
        struct yaffs_obj *obj;
@@ -1063,7 +1063,7 @@ int yaffs_close(int handle)
        return retVal;
 }
 
-int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte,
+static int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte,
                    int isPread, Y_LOFF_T offset)
 {
        struct yaffsfs_FileDes *fd = NULL;
@@ -1185,7 +1185,7 @@ int yaffs_pread(int handle, void *buf, unsigned int nbyte, Y_LOFF_T offset)
        return yaffsfs_do_read(handle, buf, nbyte, 1, offset);
 }
 
-int yaffsfs_do_write(int handle, const void *vbuf, unsigned int nbyte,
+static int yaffsfs_do_write(int handle, const void *vbuf, unsigned int nbyte,
                     int isPwrite, Y_LOFF_T offset)
 {
        struct yaffsfs_FileDes *fd = NULL;
@@ -1416,7 +1416,7 @@ Y_LOFF_T yaffs_lseek(int handle, Y_LOFF_T offset, int whence)
        return pos;
 }
 
-int yaffsfs_DoUnlink(const YCHAR *path, int isDirectory)
+static int yaffsfs_DoUnlink(const YCHAR *path, int isDirectory)
 {
        struct yaffs_obj *dir = NULL;
        struct yaffs_obj *obj = NULL;
@@ -3137,9 +3137,9 @@ int yaffs_link(const YCHAR *oldpath, const YCHAR *linkpath)
 
 int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev)
 {
-       pathname = pathname;
-       mode = mode;
-       dev = dev;
+       (void) pathname;
+       (void) mode;
+       (void) dev;
 
        yaffsfs_SetError(-EINVAL);
        return -1;
@@ -3189,7 +3189,7 @@ int yaffs_set_error(int error)
 int yaffs_dump_dev(const YCHAR *path)
 {
 #if 1
-       path = path;
+       (void) path;
 #else
        YCHAR *rest;
 
index fe914e558b64cba94ef599e8b463cde40bf8117b..3d778f2266248d47658eacc0882ef13ef720a668 100644 (file)
@@ -52,7 +52,7 @@ void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev)
        obj->yst_gid = gid;
 }
 
-loff_t yaffs_get_file_size(struct yaffs_obj *obj)
+static loff_t yaffs_get_file_size(struct yaffs_obj *obj)
 {
        YCHAR *alias = NULL;
        obj = yaffs_get_equivalent_obj(obj);
index f3bc41905ab50099af47123b4b3c40867f6669ec..1602c4bde572e538482953ee10bff65d1624b5d9 100644 (file)
@@ -185,31 +185,6 @@ void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 *buffer)
 
 }
 
-/*
- * Determine if we have a managed buffer.
- */
-int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 *buffer)
-{
-       int i;
-
-       for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
-               if (dev->temp_buffer[i].buffer == buffer)
-                       return 1;
-       }
-
-       for (i = 0; i < dev->param.n_caches; i++) {
-               if (dev->cache[i].data == buffer)
-                       return 1;
-       }
-
-       if (buffer == dev->checkpt_buffer)
-               return 1;
-
-       yaffs_trace(YAFFS_TRACE_ALWAYS,
-         "yaffs: unmaged buffer detected.");
-       return 0;
-}
-
 /*
  * Functions for robustisizing TODO
  *
@@ -219,18 +194,18 @@ static void yaffs_handle_chunk_wr_ok(struct yaffs_dev *dev, int nand_chunk,
                                     const u8 *data,
                                     const struct yaffs_ext_tags *tags)
 {
-       dev = dev;
-       nand_chunk = nand_chunk;
-       data = data;
-       tags = tags;
+       (void) dev;
+       (void) nand_chunk;
+       (void) data;
+       (void) tags;
 }
 
 static void yaffs_handle_chunk_update(struct yaffs_dev *dev, int nand_chunk,
                                      const struct yaffs_ext_tags *tags)
 {
-       dev = dev;
-       nand_chunk = nand_chunk;
-       tags = tags;
+       (void) dev;
+       (void) nand_chunk;
+       (void) tags;
 }
 
 void yaffs_handle_chunk_error(struct yaffs_dev *dev,
@@ -742,7 +717,7 @@ static void yaffs_deinit_tnodes_and_objs(struct yaffs_dev *dev)
        dev->n_tnodes = 0;
 }
 
-void yaffs_load_tnode_0(struct yaffs_dev *dev, struct yaffs_tnode *tn,
+static void yaffs_load_tnode_0(struct yaffs_dev *dev, struct yaffs_tnode *tn,
                        unsigned pos, unsigned val)
 {
        u32 *map = (u32 *) tn;
@@ -819,7 +794,7 @@ struct yaffs_tnode *yaffs_find_tnode_0(struct yaffs_dev *dev,
        int required_depth;
        int level = file_struct->top_level;
 
-       dev = dev;
+       (void) dev;
 
        /* Check sane level and chunk Id */
        if (level < 0 || level > YAFFS_TNODES_MAX_LEVEL)
@@ -1929,7 +1904,7 @@ struct yaffs_obj *yaffs_find_by_number(struct yaffs_dev *dev, u32 number)
        return NULL;
 }
 
-struct yaffs_obj *yaffs_new_obj(struct yaffs_dev *dev, int number,
+static struct yaffs_obj *yaffs_new_obj(struct yaffs_dev *dev, int number,
                                enum yaffs_obj_type type)
 {
        struct yaffs_obj *the_obj = NULL;
@@ -3226,7 +3201,7 @@ static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR *name,
                }
        } else {
 #else
-       dev = dev;
+       (void) dev;
        {
 #endif
                strncpy(name, oh_name, buff_size - 1);
@@ -3863,7 +3838,7 @@ static int yaffs_unlink_file_if_needed(struct yaffs_obj *in)
        return ret_val;
 }
 
-int yaffs_del_file(struct yaffs_obj *in)
+static int yaffs_del_file(struct yaffs_obj *in)
 {
        int ret_val = YAFFS_OK;
        int deleted;    /* Need to cache value on stack if in is freed */
index 9ac5896da37713d51875c8f9bd23b6d4e434fa88..32ba11fa9d5ce8e2ed0aab3fc8988fef0b2908f5 100644 (file)
@@ -22,7 +22,7 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk);
 
 /********** Tags ECC calculations  *********/
 
-void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
+static void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
 {
        yaffs_ecc_calc(data, spare->ecc1);
        yaffs_ecc_calc(&data[256], spare->ecc2);
index db48e56de96f2dd7f46f1052248b9af65f132f0f..e8f2f0a6c2be72ca23141975aab13991bfe1176a 100644 (file)
 
 int yaffs_skip_verification(struct yaffs_dev *dev)
 {
-       dev = dev;
+       (void) dev;
        return !(yaffs_trace_mask &
                 (YAFFS_TRACE_VERIFY | YAFFS_TRACE_VERIFY_FULL));
 }
 
 static int yaffs_skip_full_verification(struct yaffs_dev *dev)
 {
-       dev = dev;
+       (void) dev;
        return !(yaffs_trace_mask & (YAFFS_TRACE_VERIFY_FULL));
 }
 
 static int yaffs_skip_nand_verification(struct yaffs_dev *dev)
 {
-       dev = dev;
+       (void) dev;
        return !(yaffs_trace_mask & (YAFFS_TRACE_VERIFY_NAND));
 }
 
@@ -524,6 +524,6 @@ void yaffs_verify_free_chunks(struct yaffs_dev *dev)
 
 int yaffs_verify_file_sane(struct yaffs_obj *in)
 {
-       in = in;
+       (void) in;
        return YAFFS_OK;
 }