summaryrefslogtreecommitdiffstats
path: root/fs
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>
* devfs: only check for ioctl function when neededSascha Hauer2010-07-051-8/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add partition mtd supportSascha Hauer2010-07-052-0/+34
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cramfs: probe(): fix cdev lookupPeter Korsgaard2009-12-161-1/+1
| | | | | | | | Strip /dev/ part of backing store before passing cdev_by_name, as cramfs_probe() will otherwise always fail. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch 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>
* devfs: fix return value for lseek in partitionsSascha Hauer2009-09-251-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: add open counterSascha Hauer2009-09-111-7/+29
| | | | | | | Add an open counter for device files so that we cannot accidently remove an opened device. This happened with bb devices. 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>
* reactivate cramfsSascha Hauer2009-07-211-80/+91
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-212-18/+33
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make sure ramfs/devfs are initialised when neededSascha Hauer2009-07-212-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Get rid of DEVICE_TYPE_FS usageSascha Hauer2009-07-214-16/+20
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: add missing remove functionSascha Hauer2009-07-211-0/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ramfs: add missing remove functionSascha Hauer2009-07-211-0/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce cdevSascha Hauer2009-07-212-58/+199
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* remove warningfredo2008-12-181-1/+1
| | | | | Signed-off-by: Frederic RODO <fred.rodo@gmail.com>
* 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-012-6/+8
| | | | | | 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-064-10/+74
| | | | - pass open/close/lseek through to drivers
* This is Kconfig cleanup patch (not all configurations will use CFI, SPI, ↵Menon, Nishanth2008-05-122-2/+12
| | | | | | | RAMFS and DEVFS). * Enable CFI and SPI drivers menuconfig option to be able to disable them in menuconfig. * Introduce capability to disable ramfs and devfs.
* 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
|
* Use Linux kernel list for drivers and devices instead of handmadeSascha Hauer2007-10-111-8/+12
| | | | list.
* export symbolsSascha Hauer2007-10-071-0/+2
|
* change files and dirs to rwxrwxrwxSascha Hauer2007-10-042-2/+3
|
* export functionsSascha Hauer2007-10-041-0/+26
|
* change files and directories to 0777Sascha Hauer2007-10-031-7/+7
|
* remove debug printf, replace with debugSascha Hauer2007-10-031-23/+19
|
* declare lots of functions staticSascha Hauer2007-09-283-27/+27
|
* pass file size from read_fileSascha Hauer2007-09-271-1/+5
|
* fix bug in ramfs when creating files whose parents do not existSascha Hauer2007-09-271-2/+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);
* remove unused includesSascha Hauer2007-09-211-2/+0
|
* remove uncompilable filesystemsSascha Hauer2007-09-2131-9701/+0
|
* implement flash protectionSascha Hauer2007-07-162-0/+29
|
* implement memmap().Sascha Hauer2007-07-152-0/+27
| | | | | | 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
* implement truncate for devfsSascha Hauer2007-07-051-0/+8
|
* svn_rev_706Sascha Hauer2007-07-053-0/+66
| | | | 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_566Sascha Hauer2007-07-051-2/+2
| | | | fs support is not optional
* svn_rev_544Sascha Hauer2007-07-051-2/+2
| | | | make fs menuconfig