From: batt Date: Fri, 5 Sep 2008 17:31:32 +0000 (+0000) Subject: Add generic kfile_close. X-Git-Tag: 2.0.0~136 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=785ff1ea531834dbe456d573293237e2017c19a0;p=bertos.git Add generic kfile_close. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1798 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/kfile.c b/bertos/kern/kfile.c index 22da2a70..cab20aa6 100644 --- a/bertos/kern/kfile.c +++ b/bertos/kern/kfile.c @@ -218,4 +218,13 @@ struct KFile * kfile_genericReopen(struct KFile *fd) return fd; } +/** + * Close file \a fd. + * This is a generic implementation that only return 0. + */ +int kfile_genericClose(UNUSED_ARG(struct KFile *, fd)) +{ + return 0; +}; + diff --git a/bertos/kern/kfile.h b/bertos/kern/kfile.h index ade4895d..b959b959 100644 --- a/bertos/kern/kfile.h +++ b/bertos/kern/kfile.h @@ -208,6 +208,8 @@ kfile_off_t kfile_genericSeek(struct KFile *fd, kfile_off_t offset, KSeekMode wh */ struct KFile * kfile_genericReopen(struct KFile *fd); +int kfile_genericClose(struct KFile *fd); + int kfile_putc(int c, struct KFile *fd); ///< Generic putc implementation using kfile_write. int kfile_getc(struct KFile *fd); ///< Generic getc implementation using kfile_read. int kfile_printf(struct KFile *fd, const char *format, ...);