/*
-* Header file for using yaffs in an application via
-* a direct interface.
-*/
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2007 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <charles@aleph1.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+/*
+ * Header file for using yaffs in an application via
+ * a direct interface.
+ */
#ifndef __YAFFSFS_H__
off_t d_off; /* offset to this dirent */
unsigned short d_reclen; /* length of this d_name */
char d_name [NAME_MAX+1]; /* file name (null-terminated) */
+ unsigned d_dont_use; /* debug pointer, not for public consumption */
};
typedef struct yaffs_dirent yaffs_dirent;
typedef struct __opaque yaffs_DIR;
+
struct yaffs_stat{
int st_dev; /* device */
int st_ino; /* inode */
off_t st_size; /* total size, in bytes */
unsigned long st_blksize; /* blocksize for filesystem I/O */
unsigned long st_blocks; /* number of blocks allocated */
- unsigned long st_atime; /* time of last access */
- unsigned long st_mtime; /* time of last modification */
- unsigned long st_ctime; /* time of last change */
+ unsigned long yst_atime; /* time of last access */
+ unsigned long yst_mtime; /* time of last modification */
+ unsigned long yst_ctime; /* time of last change */
};
int yaffs_open(const char *path, int oflag, int mode) ;
int yaffs_write(int fd, const void *buf, unsigned int nbyte) ;
int yaffs_close(int fd) ;
off_t yaffs_lseek(int fd, off_t offset, int whence) ;
-int yaffs_truncate(int fd, unsigned int newSize);
+int yaffs_truncate(int fd, off_t newSize);
int yaffs_unlink(const char *path) ;
int yaffs_rename(const char *oldPath, const char *newPath) ;
int yaffs_link(const char *oldpath, const char *newpath);
int yaffs_mknod(const char *pathname, mode_t mode, dev_t dev);
-off_t yaffs_freespace(const char *path);
+loff_t yaffs_freespace(const char *path);
void yaffs_initialise(yaffsfs_DeviceConfiguration *configList);