Add missing definition for yaffs_strcmp
[yaffs2.git] / yaffs_nameval.c
index 487b03e19fd9a6f0fb06800f7dde867602ccdc16..b04ade5ba36cff55ecd09bc21ae23a8388ca7aac 100644 (file)
@@ -37,7 +37,7 @@ static int nval_find(const char *xb, int xb_size, const YCHAR *name,
 
        memcpy(&size, xb, sizeof(int));
        while (size > 0 && (size < xb_size) && (pos + size < xb_size)) {
-               if (!strncmp((YCHAR *) (xb + pos + sizeof(int)), name, size)) {
+               if (!yaffs_strncmp((YCHAR *) (xb + pos + sizeof(int)), name, size)) {
                        if (exist_size)
                                *exist_size = size;
                        return pos;
@@ -89,7 +89,7 @@ int nval_set(char *xb, int xb_size, const YCHAR *name, const char *buf,
                int bsize, int flags)
 {
        int pos;
-       int namelen = strnlen(name, xb_size);
+       int namelen = yaffs_strnlen(name, xb_size);
        int reclen;
        int size_exist = 0;
        int space;
@@ -119,7 +119,7 @@ int nval_set(char *xb, int xb_size, const YCHAR *name, const char *buf,
 
        memcpy(xb + pos, &reclen, sizeof(int));
        pos += sizeof(int);
-       strncpy((YCHAR *) (xb + pos), name, reclen);
+       yaffs_strncpy((YCHAR *) (xb + pos), name, reclen);
        pos += (namelen + 1);
        memcpy(xb + pos, buf, bsize);
        return 0;
@@ -178,7 +178,7 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize)
                !filled) {
                pos += sizeof(int);
                size -= sizeof(int);
-               name_len = strnlen((YCHAR *) (xb + pos), size);
+               name_len = yaffs_strnlen((YCHAR *) (xb + pos), size);
                if (ncopied + name_len + 1 < bsize) {
                        memcpy(buf, xb + pos, name_len * sizeof(YCHAR));
                        buf += name_len;