fs: add unlink interface
"unlink" interface is added to file operations. This is a preparatory change as unlink support for FAT file system will be added in next patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
committed by
Alexander Graf
parent
5bc84a1303
commit
e2519daf5c
12
include/fs.h
12
include/fs.h
@@ -155,6 +155,16 @@ struct fs_dirent *fs_readdir(struct fs_dir_stream *dirs);
|
||||
*/
|
||||
void fs_closedir(struct fs_dir_stream *dirs);
|
||||
|
||||
/*
|
||||
* fs_unlink - delete a file or directory
|
||||
*
|
||||
* If a given name is a directory, it will be deleted only if it's empty
|
||||
*
|
||||
* @filename: Name of file or directory to delete
|
||||
* @return 0 on success, -1 on error conditions
|
||||
*/
|
||||
int fs_unlink(const char *filename);
|
||||
|
||||
/*
|
||||
* fs_mkdir - Create a directory
|
||||
*
|
||||
@@ -177,6 +187,8 @@ int file_exists(const char *dev_type, const char *dev_part, const char *file,
|
||||
int fstype);
|
||||
int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
|
||||
int fstype);
|
||||
int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
|
||||
int fstype);
|
||||
int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
|
||||
int fstype);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user