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
|
fs: fix rmdir with symlink
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|
fs: add readlink support
...
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
committed
on 4 Sep 2012
|
fs/mount: add autodetection type support
...
if NULL is pass as type mount will try to autodetect the filesystem type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Jean-Christophe PLAGNIOL-VILLARD
authored
on 12 Aug 2012
Sascha Hauer
committed
on 4 Sep 2012
|
2012-07-04 |
fs: fix standard zero, full devices
...
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>
Sascha Hauer
committed
on 4 Jul 2012
|
2012-07-02 |
Merge branch 'for-next/resource-size'
...
Conflicts:
drivers/base/resource.c
fs/fs.c
Sascha Hauer
committed
on 2 Jul 2012
|
Merge branch 'for-next/fs'
Sascha Hauer
committed
on 2 Jul 2012
|
2012-07-01 |
resource: store 'end' instead of 'size' in struct resource
...
Storing the size instead of the resource end in struct resource was
a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously
leads to problems. 'end' on the other hand will never exceed
UINT[32|64]_MAX. Also this way we can express a iomem region covering
the whole address space.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 1 Jul 2012
|
2012-06-30 |
fs: Fix file create bug when parent is not a directory
...
When creating a file or a directory we have to check if the parent
is actually a directory. Otherwise trying it results in a crash.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Jun 2012
|
make cdev 64bit capable
...
Next step to 64bit support: Make cdev size a 64bit type.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Jun 2012
|
use loff_t for file offsets
...
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Jun 2012
|
2012-06-07 |
fs: limit flash erase and protect to the partiton boundary
...
Passing a too large size or offset to erase could
affect flash outside the partition boundary.
Addresses for SPI flash wrap around, thus giving a
count + offset going past the end of the flash would
wrap around and erase flash at offset 0.
Add the same check for protect.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Johannes Stezenbach
authored
on 6 Jun 2012
Sascha Hauer
committed
on 7 Jun 2012
|
2012-05-18 |
lseek: return -1 instead of -errno
...
The patch making errno a positive value has another bug:
lseek was switched to return -errno instead of -1. This does not
work since we can lseek we can address the whole 4G address space,
have of which has a negative offset when interpreted as a signed
integer. Let lseek return -1 on failure again instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 May 2012
|
2012-05-14 |
fs readdir: check for NULL pointer again
...
This got lost in:
commit 6188685
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date: Sun May 13 12:43:58 2012 +0200
Make errno a positive value
Normally errno contains a positive error value. A certain unnamed developer
mixed this up while implementing U-Boot-v2. Also, normally errno is never
set to zero by any library function.
This patch fixes this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 May 2012
|
Make errno a positive value
...
Normally errno contains a positive error value. A certain unnamed developer
mixed this up while implementing U-Boot-v2. Also, normally errno is never
set to zero by any library function.
This patch fixes this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 May 2012
|
2012-04-15 |
automount: remove existing automountpoint
...
Before creating a new mountpoint on an already existing mountpoint
we have to remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Apr 2012
|