fsync.c
来自「嵌入式linux下基于SRAM的内存文件系统」· C语言 代码 · 共 35 行
C
35 行
/* * FILE NAME fs/pramfs/fsync.c * * BRIEF DESCRIPTION * * fsync operation for directory and regular files. * * Author: Steve Longerbeam <stevel@mvista.com, or source@mvista.com> * * Copyright 2003 Sony Corporation * Copyright 2003 Matsushita Electric Industrial Co., Ltd. * 2003-2004 (c) MontaVista Software, Inc. This file is licensed under * the terms of the GNU General Public License version 2. This program * is licensed "as is" without any warranty of any kind, whether express * or implied. */#include <linux/fs.h>#include <linux/pram_fs.h>/* * File may be NULL when we are called. Perhaps we shouldn't * even pass file to fsync ? */int pram_sync_file(struct file * file, struct dentry *dentry, int datasync){#ifdef CONFIG_PRAMFS_VNVRAM struct pram_sb_info * sbi = pram_get_sb_info(dentry->d_inode->i_sb); struct vnvram_info * vnvram = sbi->vnvram; if (vnvram) return vnvram_sync_range_pram(vnvram->virt_addr, vnvram->size);#endif return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?