summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* mtd: Add support for marking blocks as goodSascha Hauer2016-03-151-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/squashfs'Sascha Hauer2016-03-1124-0/+4135
|\
| * fs: add support for SquashFS 4.0Yegor Yefremov2016-03-0224-0/+4135
| | | | | | | | | | | | | | | | | | | | The driver was imported from Linux 4.4. Current implementation supports only XZ decompressor. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2016-03-113-3/+3
|\ \
| * | mtd: Fix erasing of devices >4GiBSascha Hauer2016-02-093-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a device >4GiB is erased, not only the offset can be bigger than 4GiB, but also the size. This happens with the simplest command to erase a device: erase /dev/nand0. Make the size argument a 64bit type to make this work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2016-03-112-3/+4
|\ \ \
| * | | fs: fat: fix copy-paste typoAntony Pavlov2016-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: ext4: make locally used ext4fs_get_indir_block() staticAntony Pavlov2016-02-171-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixes this compiler's warning: CC fs/ext4/ext4_common.o fs/ext4/ext4_common.c:130:5: warning: no previous prototype for 'ext4fs_get_indir_block' [-Wmissing-prototypes] int ext4fs_get_indir_block(struct ext2fs_node *node, struct ext4fs_indir_block *indir, int blkno) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / | fs: efi: avoid comparison with uninitialized variableLucas Stach2016-03-041-1/+1
|/ / | | | | | | | | | | | | | | volume will only be initialized when efi_loaded_image is set. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ramoops: allow to build without OFTREE supportLucas Stach2016-02-111-1/+2
|/ | | | | | | | | | | | | Ramoops may be useful even without oftree support, as kernels booted without a DT may have other means to reserve the ramoops memory. Fixes: In function `ramoops_probe': undefined reference to `of_add_reserve_entry' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ratp'Sascha Hauer2016-02-083-0/+485
|\
| * fs: Add RATP fs supportJan Luebbe2016-01-183-1/+485
| | | | | | | | | | | | | | | | | | | | This adds file transfer support over RATP. The host can export a directory using the bbremote tool which can then be mounted under barebox as a filesystem. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
| * barebox remote controlSascha Hauer2016-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to control barebox over serial lines. The regular console is designed for human input and is unsuitable for controlling barebox from scripts since characters can be lost on both ends, the data stream contains escape sequences and the prompt cannot be easily matched upon. This approach is based on the RATP protocol. RATP packages start with a binary 0x01 which does not occur in normal console data. Whenever a 0x01 character is detected in the console barebox goes into RATP mode. The RATP packets contain a simple structure with a command/respone type and data for that type. Currently defined types are: BB_RATP_TYPE_COMMAND (host->barebox): Execute a command in the shell BB_RATP_TYPE_COMMAND_RETURN (barebox->host) Sends return value of the command back to the host, also means barebox is ready for the next command BB_RATP_TYPE_CONSOLEMSG (barebox->host) Console message from barebox Planned but not yet implemented are: BB_RATP_TYPE_PING (host->barebox) BB_RATP_TYPE_PONG (barebox->host) For testing purposes BB_RATP_TYPE_GETENV (host->barebox) BB_RATP_TYPE_GETENV_RETURN (barebox->host) Get values of environment variables Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
* | Merge branch 'for-next/net'Sascha Hauer2016-02-081-1/+20
|\ \
| * | nfs: forward filesystem options to the kernel command lineJuergen Borleis2016-02-081-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using NFS in conjunction with boot spec and the feature to let Barebox auto generate a kernel command line must keep the options the NFS filesystem was mounted in Barebox. This patch extends the kernel command line parameter on demand if something different than the defaults are used. The command: barebox:/ boot nfs://myhost//root expands to the kernel command line: nfsroot=myhost:/root,v3,tcp while the command: barebox:/ boot nfs://myhost:2049//root expands now to the kernel command line: nfsroot=myhost:/root,v3,tcp,mountport=2049,port=2049 Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/linux-headers'Sascha Hauer2016-02-087-368/+17
|\ \ \
| * | | fs: import magic.h from Linux kernelYegor Yefremov2016-02-033-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/linux/magic.h provides MAGIC numbers for various file systems. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Introduce include/linux/mutex.hYegor Yefremov2016-02-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move mutex related defines to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Introduce include/linux/spinlock.hYegor Yefremov2016-02-013-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move spinlock related definitions to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Introduce include/linux/sched.hYegor Yefremov2016-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move cond_resched() from barebox-wrapper.h to its original place. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: ubifs: move file and file_system_type definitions to linux/fs.hYegor Yefremov2016-02-011-39/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: ubifs: move path definition to include/linux/path.hYegor Yefremov2016-02-011-5/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | fs: ubifs: move vfsmount definition to include/linux/mount.hYegor Yefremov2016-02-011-34/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | 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>