summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | fs: ubifs: move dcache related definitions to include/linux/dcache.hYegor Yefremov2016-02-011-46/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: move pgoff_t definition to include/linux/types.hYegor Yefremov2016-02-011-2/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: use linux/fs.h for file system related definitionsYegor Yefremov2016-02-012-87/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: ubifs: remove redundant macro definesYegor Yefremov2016-01-291-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove macros, that were already defined in linux/stat.h. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: move PAGE_CACHE definitions to include/linux/pagemap.hYegor Yefremov2016-01-291-4/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: introduce include/linux/fs.hYegor Yefremov2016-01-291-127/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Linux file system structs from UBIFS to central place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: move struct timespec to include/linux/time.hYegor Yefremov2016-01-291-7/+0
| |/ / | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / ubifs: Fix reading holes in filesSascha Hauer2016-02-041-1/+1
|/ / | | | | | | | | | | | | | | When a whole block of 4KiB in an ubifs file is zero then the block is not stored in the filesystem. read_block() returns -ENOENT in this case, so this return value must be treated as success. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pstore'Sascha Hauer2016-01-119-0/+1468
|\ \
| * | fs: Add pstore filesystemMarkus Pargmann2015-12-109-0/+1468
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pstore is a persistent storage filesystem used for RAMOOPS. It is used to store console logs, panics, ftrace and other information in case of a crash/panic/oops/reboot. pstore is implemented for barebox as a read-only filesystem at the moment. It may be extended later on. The idea is to provide a way to extract essential data from the last running kernel. Most of the code is copied from the kernel. However this is only a lightweight implementation without real write support yet. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: automount: Make automountpoints persistentSascha Hauer2016-01-081-3/+4
| | | | | | | | | | | | | | Do not remove the automountpoints when they are mounted. This way they can be reused when they have been unmounted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | devfs: Add symlink supportSascha Hauer2016-01-082-14/+89
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | cdev: When creating a new cdev, initialize device_nodeTrent Piepho2016-01-081-1/+4
|/ | | | | | | | | | | | | | | If a new cdev doesn't have a device_node defined when passed to devfs_create(), set it to the device_node of the parent device, if one exists. For non-partitions, like ocotp or eeprom devices, this is the correct thing to do. Partitions need to use, and do use, a different node. The code from commit 274e0b8dc48956babeaa2faf70bf8066e656b621 to set device_node in ocotp can be removed. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: smhfs: Fix return value of truncate()Andrey Smirnov2015-11-091-1/+1
| | | | | | | | | | | | | | | Returning -ENOSYS as a result of truncate() breaks ability to write to semihosting host's filesystem, so change the return value to 0. This shouldn't cause any problems since all of the funcionlaity of truncate() should is already handled by 'open' (via O_TRUNC) and 'write' (will automatically grow the file size when writing) automatically Unfortunately this was missed in original commit that introduced semihosting Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-11-063-9/+13
|\
| * fs: pass path directly to cdev_openSascha Hauer2015-10-151-6/+1
| | | | | | | | | | | | | | Now that cdev_open handles a path we no longer have to add /dev/ to the name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * filetype: Use cdev_openSascha Hauer2015-10-151-2/+0
| | | | | | | | | | | | | | a cdev has to be opened before usage. Use cdev_open instead of cdev_by_name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: devfs: Allow mount path in cdev_openSascha Hauer2015-10-151-1/+5
| | | | | | | | | | | | | | When opening a cdev also allow a path beginning with /dev/ as some users of cdev_open already open coded this behaviour. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: devfs: Allow mounting only on /dev/Sascha Hauer2015-10-151-0/+7
| | | | | | | | | | | | | | We have places in the code where we assume that devfs is mounted on /dev/, so enforce this path to avoid surprises. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm'Sascha Hauer2015-11-063-0/+188
|\ \ | |/ |/|
| * ARM: Add support for semihostingAndrey Smirnov2015-10-303-0/+188
| | | | | | | | | | | | | | | | | | | | Add semihosting API implementation and implement a filesystem driver to access debugging host filesystem using it. Tested on Freescale SabreSD board (i.MX6Q) using OpenOCD Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: Fix filesystem detection with full pathPeter Mamonov2015-10-131-1/+5
|/ | | | | | | | | | | | | When mount is given a full path (including /dev/) to the cdev file we can no longer automatically detect the filesystem. This is broken since: e89f1a1 detect_fs: use device instead of file Fix it by dropping the /dev/ component of the path. Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/omap'Sascha Hauer2015-10-071-1/+1
|\
| * detect_fs: use device instead of fileVicente Bergas2015-10-021-1/+1
| | | | | | | | | | | | | | | | detect_fs would usually mount a device on a directory, so, use a device-specific type detection. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: syntax fix in ramfs.cStefan Christ2015-10-011-1/+1
| | | | | | | | | | Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | introduce strerrorpSascha Hauer2015-09-231-1/+1
|/ | | | | | | | | | putting an error pointer into strerror can be a bit confusing since strerror takes a positive error code but PTR_ERR returns a negative number, so we have to do strerror(-PTR_ERR(errp)). Some places got this wrong already, so introduce a strerrorp function which directly takes an error pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* cdev: Add function to find cdev by device_nodeSascha Hauer2015-09-011-0/+13
| | | | | | | | | | This adds a device_node member to struct cdev and a function to find a cdev by device_node. This also removes the setting of cdev->dev->device_node in the of partition parser. We must not set the device since it may not refer to a partition but to a whole device with partitions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/net'Sascha Hauer2015-08-062-6/+3
|\
| * fs/nfs.c: use SUNRPC_PORT remote port by defaultAntony Pavlov2015-07-201-1/+1
| | | | | | | | | | | | | | pico_socket_connect() needs remote_port != 0. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs/nfs.c: use uint16_t for port numbersAntony Pavlov2015-07-201-2/+2
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs/tftp.c: drop unused server_port variableAntony Pavlov2015-07-201-3/+0
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: efivars: read the attributes on the second get_variable()Michael Olbrich2015-07-271-3/+4
| | | | | | | | | | | | | | | | Some EFI get_variable() implementations don't set the attributes when returning EFI_BUFFER_TOO_SMALL. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: efivars: add more error checkingMichael Olbrich2015-07-271-4/+12
| | | | | | | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: efivars: use xstrdup_* when appropriateMichael Olbrich2015-07-271-3/+3
| | | | | | | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: efi: use xstrdup_* when appropriateMichael Olbrich2015-07-271-2/+2
| | | | | | | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drop <stddef.h> includesSascha Hauer2015-07-231-1/+0
|/ | | | | | | The compilers stddef.h should not be included. We declare all types ourselves. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/blspec'Sascha Hauer2015-07-063-0/+84
|\
| * fs: nfs: Implement Linux rootargSascha Hauer2015-06-181-0/+24
| | | | | | | | | | | | | | Add the root= parameter for NFS filesystems. We currently hardcode v3 and tcp which probably needs to become configurable at some point. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: ubifs: Implement Linux rootargSascha Hauer2015-06-181-0/+23
| | | | | | | | | | | | | | | | Add the parameter to boot from ubifs fileystems. This assumes that there will be only one UBI device registered in the kernel, otherwise there is no way to predict the ubi number. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: Add device parameter for Linux root= optionSascha Hauer2015-06-181-0/+37
| | | | | | | | | | | | | | | | | | | | When registering a filesystem device add a device parameter suitable for the Linux root= option to boot from exactly this filesystem. Currently the fs layer sets this parameter to the root=PARTUUID= mechanism if a partuuid is available. Other filesystems like NFS and UBIFS which do not have a PARTUUID can overwrite this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2015-07-031-21/+26
|\ \
| * | tftp_recv(): handle opcode field in a more natural wayAntony Pavlov2015-06-291-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC1350 uses the 'opcode' term for the first 2-bytes field of TFTP packet. But the U-boot tftp code uses the 'proto' term for the same thing. The patch takes back original term and makes opcode calculation more clear. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | tftp_recv(): according to RFC1350 minimal tftp packet length is 4 bytesAntony Pavlov2015-06-291-3/+2
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs/tftp: handle incoming packets in the separate tftp_recv() functionAntony Pavlov2015-06-291-10/+17
| |/ | | | | | | | | | | | | | | The separation of incoming packets handling makes it much easier to run barebox tftp client on top of picotcp network stack in the future. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / treewide: fix 'new blank line at EOF' formatting errorAntony Pavlov2015-07-023-3/+0
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-06-091-8/+5
|\
| * mem: Fix memcpy_sz variable typesSascha Hauer2015-05-151-8/+5
| | | | | | | | | | | | | | | | - Drop usage of 'ulong', use unsigned long - remove unnecessary intermediate casting to unsigned long - Use proper u8/u16/u32 types. Fixes 64bit systems on which ulong is 64bit Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fs: Add O_RWSIZE_8Sascha Hauer2015-05-281-0/+3
|/ | | | | | To support native 64bit accesses in memcpy_sz. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/fs'Sascha Hauer2015-03-0913-59/+59
|\
| * fs: rename inode member of struct filep to privSascha Hauer2015-03-0913-59/+59
| | | | | | | | | | | | | | Because that's what it is. 'inode' will become confusing once we support real inodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>