yaffs2 源码错误 too few arguments to function 'yaffs_flush_file' 2014.08.22
来源:互联网 发布:check windows version 编辑:程序博客网 时间:2024/06/05 17:23
yaffs2 源码错误
错误:
2014-08-06Charles Mannin版本的 yaffs 有误!
yaffs_flush_file的定义:
source file :yaffs_guts.c
int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync, int discard_cache){if (!in->dirty)return YAFFS_OK;yaffs_flush_file_cache(in, discard_cache);if (data_sync)return YAFFS_OK;if (update_time)yaffs_load_current_time(in, 0, 0);return (yaffs_update_oh(in, NULL, 0, 0, 0, NULL) >= 0) ?YAFFS_OK : YAFFS_FAIL;}
yafss_vfs.c
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))static int yaffs_file_flush(struct file *file, fl_owner_t id)#elsestatic int yaffs_file_flush(struct file *file)#endif{struct yaffs_obj *obj = yaffs_dentry_to_obj(file->f_dentry);struct yaffs_dev *dev = obj->my_dev;yaffs_trace(YAFFS_TRACE_OS,"yaffs_file_flush object %d (%s)",obj->obj_id,obj->dirty ? "dirty" : "clean");yaffs_gross_lock(dev);yaffs_flush_file(obj, 1, 0);yaffs_gross_unlock(dev);return 0;}看过yaffs_flush_file的定义之后,发现这里应该输入四个参数,但是这里只有三个参数传入,编译器报错
同样的
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))static int yaffs_sync_object(struct file *file, loff_t start, loff_t end, int datasync)#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))static int yaffs_sync_object(struct file *file, int datasync)#elsestatic int yaffs_sync_object(struct file *file, struct dentry *dentry, int datasync)#endif{struct yaffs_obj *obj;struct yaffs_dev *dev;#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))struct dentry *dentry = file->f_path.dentry;#endifobj = yaffs_dentry_to_obj(dentry);dev = obj->my_dev;yaffs_trace(YAFFS_TRACE_OS | YAFFS_TRACE_SYNC,"yaffs_sync_object");yaffs_gross_lock(dev);yaffs_flush_file(obj, 1, datasync);yaffs_gross_unlock(dev);return 0;}
yaffs_sync_object里面的yaffs_flush_file也只有三个参数传入和定义不符合
void yaffs_flush_whole_cache(struct yaffs_dev *dev, int discard){struct yaffs_obj *obj;int n_caches = dev->param.n_caches;int i;/* Find a dirty object in the cache and flush it... * until there are no further dirty objects. */do {obj = NULL;for (i = 0; i < n_caches && !obj; i++) {if (dev->cache[i].object && dev->cache[i].dirty)obj = dev->cache[i].object;}if (obj)yaffs_flush_file_cache(obj, discard);} while (obj);}
0 0
- yaffs2 源码错误 too few arguments to function 'yaffs_flush_file' 2014.08.22
- uvc_v4l2_ioctl.h 提示出错 too few arguments to function ‘v4l_printk_ioctl’
- fuse_trash.c:119: error: too few arguments to function 'hdfsDelete'
- bug:error:too few arguments to function ‘fopen’
- error : too few arguments in function call
- nginx-sticky-module-1.1//ngx_http_sticky_misc.c:281:2: error: too few arguments to function
- 手动编译memcached时遇到memcache.c error: too few arguments to function ‘zend_list_insert’的解决方法
- cudnn.hpp:127:41: error: too few arguments to function ‘cudnnStatus_t cudnnSetPooling2dDescriptor
- caffe cudnnSetConvolution2dDescriptor error: too few arguments in function call
- 编译错误“Too many arguments to function call....”
- Too many arguments to function call错误解决方案
- 消息机制Too many arguments to function call错误
- 错误:Too many arguments to function call,expected 0,have *
- caffe 与cudnn版本不匹配 ./include/caffe/util/cudnn.hpp:127:41: error: too few arguments to function
- too few arguments to block call expected 3 have 1
- too many arguments to function call
- Too many arguments to function call
- Too many arguments to function call...
- 条款32:确定你的public继承塑模出is-a关系
- POJ-3171-Cleaning Shifts
- c++中判断指针类型对象
- spoj 220. Relevant Phrases of Annihilation
- 123
- yaffs2 源码错误 too few arguments to function 'yaffs_flush_file' 2014.08.22
- Let’s Make a Map/Bubble Map
- 12345
- Spring Framework 中文说明文档
- 常用网站
- Layers
- Leetcode Maximal Rectangle
- Visual FoxPro权威指南写作原稿及光盘下载
- Leetcode Best Time to Buy and Sell Stock