INT32 FsCreateFile(struct inode *inode, UINT8 *path, UINT8 mode, FILE_ID_T *fid) { INT32 err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); if ((fid == NULL) || (path == NULL) || (STRLEN(path) == 0)) return(FFS_ERROR); sm_P(&(fs_struct[p_fs->drv].v_sem)); err = ffsCreateFile(inode, path, mode, fid); sm_V(&(fs_struct[p_fs->drv].v_sem)); return(err); }
/* FsCreateFile : create a file */ INT32 FsCreateFile(struct inode *inode, UINT8 *path, UINT8 mode, FILE_ID_T *fid) { INT32 err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); /* check the validity of pointer parameters */ if ((fid == NULL) || (path == NULL) || (STRLEN(path) == 0)) return(FFS_ERROR); /* acquire the lock for file system critical section */ sm_P(&(fs_struct[p_fs->drv].v_sem)); err = ffsCreateFile(inode, path, mode, fid); /* release the lock for file system critical section */ sm_V(&(fs_struct[p_fs->drv].v_sem)); return(err); } /* end of FsCreateFile */
/* FsCreateFile : create a file */ int FsCreateFile(struct inode *inode, char *path, u8 mode, FILE_ID_T *fid) { int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); /* check the validity of pointer parameters */ if ((fid == NULL) || (path == NULL) || (*path == '\0')) return FFS_ERROR; /* acquire the lock for file system critical section */ sm_P(&p_fs->v_sem); err = ffsCreateFile(inode, path, mode, fid); /* release the lock for file system critical section */ sm_V(&p_fs->v_sem); return err; } /* end of FsCreateFile */