/** * Positions a file's read and write pointer at the specified offset. The * offset is expressed as the number of bytes from the start of the file (i.e., * seeking to offset 0 places the pointer at the first byte in the file). * * @param file The file to reposition. * @param offset The 0-based file offset to seek to. * * @return 0 on success; nonzero on failure. */ int nffs_seek(struct nffs_file *file, uint32_t offset) { int rc; nffs_lock(); rc = nffs_file_seek(file, offset); nffs_unlock(); return rc; }
/** * Positions a file's read and write pointer at the specified offset. The * offset is expressed as the number of bytes from the start of the file (i.e., * seeking to offset 0 places the pointer at the first byte in the file). * * @param file The file to reposition. * @param offset The 0-based file offset to seek to. * * @return 0 on success; nonzero on failure. */ static int nffs_seek(struct fs_file *fs_file, uint32_t offset) { int rc; struct nffs_file *file = (struct nffs_file *)fs_file; nffs_lock(); rc = nffs_file_seek(file, offset); nffs_unlock(); return rc; }