summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
Commit message (Collapse)AuthorAgeFilesLines
* fs: add basic sanity check before accessing the files arrayBaruch Siach2010-07-281-0/+34
| | | | | | | | | This patch adds some basic file descriptor sanity checks to the file access routines. Check whether the given file descriptor is in the files array range, and whether the file entry is valid. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: replace broken dev_protect with protect_file functionSascha Hauer2009-10-021-0/+15
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: write: fix writing on devicesSascha Hauer2009-07-301-3/+9
| | | | | | | | We can't truncate device files. Make sure that if we want to write beyond the device that the bytes that still fit into the device get written. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-211-5/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Get rid of DEVICE_TYPE_FS usageSascha Hauer2009-07-211-10/+17
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce cdevSascha Hauer2009-07-211-11/+16
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: fix compiler warningSascha Hauer2008-08-261-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* implement memmap for mem driverSascha Hauer2008-08-141-1/+8
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lseek: return -1 for errors and check for that return valueSascha Hauer2008-08-011-4/+6
| | | | | | We cannot check for < 0 in lseek, otherwise we get problems with files > 0x7fffffff Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [fs]: set errno correctly for ioctl()Sascha Hauer2008-06-251-3/+4
|
* - introduce ioctl callSascha Hauer2008-06-061-4/+30
| | | | - pass open/close/lseek through to drivers
* add missing null pointer check in unlink()Sascha Hauer2008-03-011-0/+5
|
* [general] Fixed crash in fs.h, when called with fsdrv.create == NULLCarsten Schlote2008-02-191-2/+5
| | | | | | | | | | When a nor0 devices has no partitions assigned, then a call to open() to create a file will jump with a NULL fct ptr. Much more cheching code is missing and pointers to function are jumped without any NULL ptr check. This must be fixed as well later. Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
* [sparse] declare functions static, use NULL as NULL pointerMarc Kleine-Budde2007-11-291-5/+5
| | | | | | | | | | | this fixes: fs/fs.c:210:6: warning: symbol 'files' was not declared. Should it be static? fs/fs.c:212:6: warning: symbol 'get_file' was not declared. Should it be static? fs/fs.c:227:6: warning: symbol 'put_file' was not declared. Should it be static? fs/fs.c:248:5: warning: symbol 'dir_is_empty' was not declared. Should it be static? fs/fs.c:613:41: warning: Using plain integer as NULL pointer Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* - Implement tree structure for devicessascha2007-10-191-9/+30
| | | | | | | - Use device tree structure to implement partitions - Let devinfo print a nice tree - Introduce 'fixed' partitions which are not removable - Fix mount: It was not possible to mount on a relative path.
* use S_ISDIR macro in open()sascha2007-10-161-1/+1
|
* export symbolsSascha Hauer2007-10-071-0/+2
|
* change files and dirs to rwxrwxrwxSascha Hauer2007-10-041-1/+2
|
* export functionsSascha Hauer2007-10-041-0/+26
|
* pass file size from read_fileSascha Hauer2007-09-271-1/+5
|
* handle NULL Pointers in readdir/closedir properlySascha Hauer2007-09-251-0/+8
|
* - change function declarations for better standard conformity:Sascha Hauer2007-09-241-4/+4
| | | | | | | int open(const char *pathname, int flags); -> int open(const char *pathname, int flags, ...); int mkdir(const char *pathname); -> int mkdir(const char *pathname, mode_t mode);
* implement flash protectionSascha Hauer2007-07-161-0/+21
|
* implement memmap().Sascha Hauer2007-07-151-0/+19
| | | | | | With this function we can get a pointer to directly memory mapped devices like nor flash or RAM. Useful for bootm where we save one memcopy when the image is mappable
* svn_rev_706Sascha Hauer2007-07-051-0/+22
| | | | add file headers
* svn_rev_653Sascha Hauer2007-07-051-1/+53
| | | | restructure tree, add reginfo command
* svn_rev_633Sascha Hauer2007-07-051-18/+23
| | | | add some comments, minor cleanups
* svn_rev_605Sascha Hauer2007-07-051-1/+29
| | | | make read_file global
* svn_rev_452Sascha Hauer2007-07-051-1/+18
| | | | add erase function
* svn_rev_420Sascha Hauer2007-07-051-6/+6
| | | | | | | | | | | - do more POSIX: - use DIR instead of struct dirent - use (struct dirent)->d_name instead of (struct dirent)->name - switch to a new layout for U_BOOT_CMD: - use C99 initializers to be able to add more fields to the command struct - add aliases for commands (needed mainly for help -> ? and test -> [ - This is not done for all commands yet, but the compiler will tell you ;)
* svn_rev_406Sascha Hauer2007-07-051-41/+105
| | | | let normalise path allocate the string instead of changing the original one
* svn_rev_379Sascha Hauer2007-07-051-0/+1
|
* svn_rev_371Sascha Hauer2007-07-051-1/+1
| | | | fix mem hole
* svn_rev_369Sascha Hauer2007-07-051-1/+0
| | | | include asm-generic in errno.h instead of all other files
* svn_rev_364Sascha Hauer2007-07-051-38/+33
| | | | | | - fix free corruption in open - simplify mount() - fix mem hole
* svn_rev_338Sascha Hauer2007-07-051-70/+173
| | | | add rmdir and unlink, make creat more like posix, add common function for prerequites checking
* svn_rev_301Sascha Hauer2007-07-051-2/+2
|
* svn_rev_287Sascha Hauer2007-07-051-77/+70
| | | | add lseek implementation, remove special handling of /dev/ (is now implemented as devfs)
* svn_rev_281Sascha Hauer2007-07-051-0/+6
| | | | read support for ramfs
* svn_rev_272Sascha Hauer2007-07-051-18/+52
| | | | more FS work
* svn_rev_270Sascha Hauer2007-07-051-23/+78
| | | | WIP FS support
* svn_rev_268Sascha Hauer2007-07-051-87/+237
| | | | WIP
* svn_rev_263Sascha Hauer2007-07-051-0/+4
|
* svn_rev_261Sascha Hauer2007-07-051-52/+186
| | | | WIP Filesystem support
* svn_rev_234Sascha Hauer2007-07-051-0/+163
beginning filesystem support