summaryrefslogtreecommitdiffstats
path: root/include/fs.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/link'Sascha Hauer2012-09-051-0/+12
|\
| * fs: introduce get_mounted_path to get the path where a file is mountedJean-Christophe PLAGNIOL-VILLARD2012-09-051-0/+2
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * fs: implement statJean-Christophe PLAGNIOL-VILLARD2012-09-051-4/+2
| | | | | | | | | | | | stat() stats the file pointed to by path and fills in buf. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * fs: add symlink supportJean-Christophe PLAGNIOL-VILLARD2012-09-051-0/+3
| | | | | | | | | | | | Limit it's support to existing file only Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * fs: rename stat to lstat as we implement lstatJean-Christophe PLAGNIOL-VILLARD2012-09-051-1/+5
| | | | | | | | | | | | | | For compatibility put a inline on lstat for stat until we have the symlink support. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * fs: add readlink supportJean-Christophe PLAGNIOL-VILLARD2012-09-051-0/+5
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | fs/mount: add autodetection type supportJean-Christophe PLAGNIOL-VILLARD2012-09-041-0/+5
|/ | | | | | if NULL is pass as type mount will try to autodetect the filesystem type Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* fs: fix standard zero, full devicesSascha Hauer2012-07-041-0/+1
| | | | | | | | | | | | | | | | The standard devices are currently broken since they have the size ~0. As now files use loff_t as file size which is a signed type the read implementation gets confused and now returns -1. The current implementation also has the (somewhat theorical) problem that we do not have real streaming devices, so /dev/zero went out of zeroes after reading 4GB (or now LLONG_MAX). This patch introduces a new cdev flag DEVFS_IS_CHARACTER_DEV and a new file size flag FILE_SIZE_STREAM which makes it possible to create real stream devices instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* use loff_t for file offsetsSascha Hauer2012-06-301-6/+6
| | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add automount supportSascha Hauer2012-03-181-0/+4
| | | | | | | | | | | | | | This patch adds an automount command which makes it possible to execute a script when a certain directory is first accessed. It's the commands responsibility to make this directory available (bringing devices up and mounting it). This results in automount support which makes sure that from the shell every file can be accessed without having to care for device bringup. Bringing up devices may be expensive (USB, dhcp). The automount support makes it easy for the environment to bringup devices when they are actually needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: drop struct mtab_entrySascha Hauer2012-03-171-10/+5
| | | | | | | | | | every struct fs_device_d contains a struct mtab_entry, so they have a 1:1 relationship. Instead of having to use container_of to get from a struct mtab_entry to a struct fs_device_d we can better embed the members of struct mtab_entry into struct fs_device_d directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: get fs device using container_ofSascha Hauer2012-02-251-0/+1
| | | | | | This reduces the usage of dev->type_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: get fs driver using container_ofSascha Hauer2012-02-251-0/+2
| | | | | | This reduces the usage of dev->type_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: put fs devices on its own busSascha Hauer2012-02-171-0/+1
| | | | | | | | | | | By putting the fs devices/drivers on a bus on its own we can hook into the bus remove function to cleanup the fs device. This way we can unmount a device by simply unregistering the device which is useful for for example USB mass storage devices. These can now unregister the assoiated filesystems by unregistering their child devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: remove fs devices listSascha Hauer2012-02-171-2/+0
| | | | | | | | | | We store the fs devices in a list only because we want to check if the fs driver needs a backingstore or not. The driver will bail out anyway if it needs a backingstore and doesn't find one. So we can remove this check and thus remove the list of fs devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: remove unused function fsdev_get_mountpointSascha Hauer2012-02-171-7/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Store mtab path in allocated stringSascha Hauer2012-02-171-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: make locally used function get_mtab_entry_by_path staticSascha Hauer2012-02-171-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Store mtab entries in listSascha Hauer2012-02-171-2/+4
| | | | | | | To make the code a bit easier to read. Also, do not allow to umount / when something else is mounted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: implement flush functionSascha Hauer2011-04-111-0/+2
| | | | | | | Once we have caching in file functions we need a way to sync the the underlying devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: remove unused field 'type' from struct fs_driver_dSascha Hauer2011-04-111-5/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: replace broken dev_protect with protect_file functionSascha Hauer2009-10-021-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* get rid of device idsSascha Hauer2009-07-211-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Get rid of DEVICE_TYPE_FS usageSascha Hauer2009-07-211-0/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* - introduce ioctl callSascha Hauer2008-06-061-0/+3
| | | | - pass open/close/lseek through to drivers
* add ls -c and -lSascha Hauer2008-03-111-0/+1
|
* fix typoSascha Hauer2008-03-011-1/+1
|
* - Implement tree structure for devicessascha2007-10-191-7/+10
| | | | | | | - 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.
* pass file size from read_fileSascha Hauer2007-09-271-2/+3
|
* implement mkdir -pSascha Hauer2007-09-271-0/+3
|
* - change function declarations for better standard conformity:Sascha Hauer2007-09-241-2/+2
| | | | | | | 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-1/+4
|
* implement memmap().Sascha Hauer2007-07-151-0/+6
| | | | | | 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_634Sascha Hauer2007-07-051-4/+29
| | | | add comments
* svn_rev_605Sascha Hauer2007-07-051-0/+1
| | | | make read_file global
* svn_rev_453Sascha Hauer2007-07-051-0/+4
| | | | add erase function
* svn_rev_420Sascha Hauer2007-07-051-7/+7
| | | | | | | | | | | - 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-1/+4
| | | | let normalise path allocate the string instead of changing the original one
* svn_rev_368Sascha Hauer2007-07-051-1/+1
| | | | let mount take the device as string
* svn_rev_331Sascha Hauer2007-07-051-0/+6
| | | | add rmdir and unlink
* svn_rev_290Sascha Hauer2007-07-051-1/+9
| | | | add lseek
* svn_rev_272Sascha Hauer2007-07-051-1/+8
| | | | more FS work
* svn_rev_270Sascha Hauer2007-07-051-6/+10
| | | | WIP FS support
* svn_rev_268Sascha Hauer2007-07-051-7/+36
| | | | WIP
* svn_rev_261Sascha Hauer2007-07-051-3/+28
| | | | WIP Filesystem support
* svn_rev_259Sascha Hauer2007-07-051-0/+3
| | | | WIP
* svn_rev_235Sascha Hauer2007-07-051-0/+34
beginning filesystem support