Signed-off-by: Alexandros C. Couloumbis <alex at ozo.com> --- linux-2.6.29-rc3/fs/yaffs2/yaffs_fs.c.orig 2009-02-03 20:10:33.000000000 +0200 +++ linux-2.6.29-rc3/fs/yaffs2/yaffs_fs.c 2009-02-03 19:36:18.000000000 +0200 @@ -1234,8 +1234,14 @@ yaffs_Object *parent = yaffs_InodeToObject(dir);
int error = -ENOSPC; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) uid_t uid = current->fsuid; gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; +#else /* 2.6.29 and higher */ + uid_t uid = current->cred->fsuid; + gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->cred->fsgid; +#endif /* 2.6.29 check */ if((dir->i_mode & S_ISGID) && S_ISDIR(mode)) mode |= S_ISGID; @@ -1414,8 +1420,14 @@ { yaffs_Object *obj; yaffs_Device *dev; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) uid_t uid = current->fsuid; gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; +#else /* 2.6.29 and higher */ + uid_t uid = current->cred->fsuid; + gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->cred->fsgid; +#endif /* 2.6.29 check */ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_symlink\n")); --- linux-2.6.29-rc3/fs/yaffs2/yaffs_fs.c.orig 2009-02-03 21:23:46.000000000 +0200 +++ linux-2.6.29-rc3/fs/yaffs2/yaffs_fs.c 2009-02-03 22:16:06.000000000 +0200 @@ -2064,7 +2064,13 @@ /* Set up the memory size parameters.... */ +#ifdef __MIPSEL__ || __LINUX_ARM_ARCH__ + { uint64_t res = mtd->size; + do_div (res, (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK)); + nBlocks = res; } +#else nBlocks = mtd->size / (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK); +#endif dev->startBlock = 0; dev->endBlock = nBlocks - 1; dev->nChunksPerBlock = YAFFS_CHUNKS_PER_BLOCK; @@ -2090,7 +2096,13 @@ dev->totalBytesPerChunk = mtd->oobblock; dev->nChunksPerBlock = mtd->erasesize / mtd->oobblock; #endif +#ifdef __MIPSEL__ || __LINUX_ARM_ARCH__ + { uint64_t res = mtd->size; + do_div (res, mtd->erasesize); + nBlocks = res; } +#else nBlocks = mtd->size / mtd->erasesize; +#endif dev->startBlock = 0; dev->endBlock = nBlocks - 1; _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel