2014-07-03 |
automount: check for recursive automount
...
automount_mount calls run_command which may trigger an automount
again. This results in an endless loop. A simple way to trigger
this is:
mkdir /x; automount /x false; cd /x; something
Use a static variable to detect if we are currently in automount_mount()
and bail out if we are.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 3 Jul 2014
|
2014-03-07 |
Merge branch 'for-next/nfs'
...
Conflicts:
defaultenv/defaultenv-2-base/bin/ifup
Sascha Hauer
committed
on 7 Mar 2014
|
run_command: remove unused flag parameter
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 7 Mar 2014
|
2014-02-13 |
read_file: Use read_full
...
At least NFS does not fulfill read requests > 1024 bytes at once.
Use read_full in read_file as read doesn't guarantee that the
whole request can be read at once.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Feb 2014
|
2014-02-10 |
mount: support filesystem options passed via -o
...
Similar to mount(8) the barebox command mount now supports passing a string
to the file system driver via -o.
This is used in the next commit to let the user specify port numbers for
nfs mounts.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Uwe Kleine-König
authored
on 7 Feb 2014
Sascha Hauer
committed
on 10 Feb 2014
|
2013-11-27 |
Fix endless loop in automount code
...
A chdir to a path registered as an automount path followed by a 'ls'
results in an endless loop. This happens because the command the
automounter executes results in another automount request.
Fix this by running the automounter from the chdir code before
the cwd is actually changed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Nov 2013
|
2013-11-05 |
fs: Add function to get cdev by mountpath
...
This is useful to know for the bootloader spec implementation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 5 Nov 2013
|
2013-10-16 |
fs: ignore O_TRUNC open flag for devices
...
The O_TRUNC flag has to be ignored when opening devices. Otherwise
cp /somefile /dev/somedev fails. This is broken since:
| commit d4f5bb1
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Sat Sep 28 13:12:50 2013 +0200
|
| copy_file: Add missing O_TRUNC
|
| Without it, when copying a smaller file over a larger file the
| resulting file still has the remaining space from the larger file.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 16 Oct 2013
|
2013-09-30 |
fs: add cdev mount helpers
...
Introduce helpers to iterate over cdevs and mount them to a known
path.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Sep 2013
|
2013-09-29 |
fs: use bus_for_each_driver
...
Instead of using for_each_driver and testing for the bus type.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Sep 2013
|
fs: cleanup backingstore handling
...
All filesystem drivers which need a backingstore device do the same
ignoring of '/dev/' in the backingstore followed by a cdev_open. Add a
helper function for it and let the core handle the cdev. As a side
effect this makes sure that fsdev->cdev is also set when a device is
mounted without the leading '/dev/' which was previously ignored
by the mount code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Sep 2013
|
2013-06-20 |
read_file: Make it work on tftp servers which do not pass size
...
Some tftp servers (for example netkit-tftp) do not pass the filesize.
Add a workaround for read_file which reads the file into a temporary
file which then is copied to a buffer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 20 Jun 2013
|
2013-03-14 |
fs: allocate FILE table dynamically
...
Some systems are runnignfrom a very limited SRAM, but have a huge
malloc space in SDRAM. The bss normally is in SRAM, so we should
avoid having big structures there. The FILE table is 5120 bytes
big, so allocate it dynamically instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Mar 2013
|
2013-02-20 |
fs: add pread and pwrite functions
...
Add pread and pwrite functions.
Split read and write functions to save some space.
The functions pread and pwrite saves and sets the file
position to a given offset and restore them afterwards.
This also makes the nandtest command use these function
which is necessary to not break compilation for the nandtest
command.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Alexander Aring
authored
on 17 Feb 2013
Sascha Hauer
committed
on 20 Feb 2013
|
2013-02-18 |
fs: fix return type of read
...
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Alexander Aring
authored
on 17 Feb 2013
Sascha Hauer
committed
on 18 Feb 2013
|
2013-01-19 |
Add write_file function
...
write_file() will write a buffer to a file. The file is created
if necessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 19 Jan 2013
|
2012-12-12 |
drivers/base: fix corrupt device tree
...
dev_add_child is a very unsafe function. If called multiple times
it allows setting the same device to different parents thus corrupting
the siblings list. This happens regularly since:
| commit c2e568d
| Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| Date: Sat Nov 3 16:11:05 2012 +0100
|
| bus: add bus device
|
| automatically add it as parent of any bus device if none already specified
|
| we have now a nice output per bus
If for example a FATfs is mounted this nice output per bus often ends with:
> `---- fat0
> `---- 0
> `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL>
> `---- sram00
> `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
> `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
> unable to handle NULL pointer dereference at address 0x0000000c
> pc : [<87f08a20>] lr : [<87f08a04>]
> sp : 86eff8c0 ip : 87f3fbde fp : ffffffff
> r10: ffffffff r9 : 00000000 r8 : 00000003
> r7 : 86f075b8 r6 : 00000002 r5 : ffffffec r4 : 86f07544
> r3 : 00000000 r2 : 43f900b4 r1 : 00000020 r0 : 00000005
> Flags: Nzcv IRQs off FIQs off Mode SVC_32
> [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130)
>
> [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c)
> [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14)
> [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38)
> [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60)
This patch fixes this by adding a device to its parents children list in
register_device so that dev_add_child is no longer needed. This function
is removed from the tree. Now callers of register_device have to clearly
set the parent *before* registering a device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Jan Lübbe <jlu@pengutronix.de>
Sascha Hauer
committed
on 12 Dec 2012
|
fs: move dev_add_child before device_register
...
Biology tells us that the parent is known before the child is born.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Dec 2012
|
2012-10-08 |
fs: improve robustness
...
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Vicente
authored
on 7 Oct 2012
Sascha Hauer
committed
on 8 Oct 2012
|
2012-10-03 |
Merge branch 'for-next/remove-fsf-address'
...
Conflicts:
drivers/net/miidev.c
include/miidev.h
Sascha Hauer
committed
on 3 Oct 2012
|
Merge branch 'for-next/driver'
Sascha Hauer
committed
on 3 Oct 2012
|
2012-09-23 |
driver: register bus
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Jean-Christophe PLAGNIOL-VILLARD
authored
on 20 Sep 2012
Sascha Hauer
committed
on 23 Sep 2012
|
2012-09-17 |
Treewide: remove address of the Free Software Foundation
...
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Sep 2012
|
2012-09-11 |
fs: fs.c fix cast
...
Fix casting on min argument, to avoid warnings on 64bit build.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Alexander Aring
authored
on 11 Sep 2012
Sascha Hauer
committed
on 11 Sep 2012
|
2012-09-05 |
Merge branch 'for-next/link'
Sascha Hauer
committed
on 5 Sep 2012
|
2012-09-04 |
fs: introduce get_mounted_path to get the path where a file is mounted
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|
fs: open: add symlink support
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|
fs: implement stat
...
stat() stats the file pointed to by path and fills in buf.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|
fs: add symlink support
...
Limit it's support to existing file only
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|
fs: rename stat to lstat as we implement lstat
...
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>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|