2012-03-18 |
FAT: Fix error path
...
- forward the return value of chk_mounted to detect whether mount succeeded
- free resources on mount failure
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 Mar 2012
|
fs open: pass error from stat
...
We used to simply answer with -ENOENT in open() when the
initial call to stat() failed. Instead, forward the error from
stat().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 Mar 2012
|
Add automount support
...
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>
Sascha Hauer
committed
on 18 Mar 2012
|
2012-03-17 |
fs: drop struct mtab_entry
...
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>
Sascha Hauer
committed
on 17 Mar 2012
|
fs: change get_fs_device_by_path prototype
...
get_fs_device_by_path returns a struct device_d instead of what the
name suggests a struct fs_device_d. Also it returns the rootpath
of the corresponding fs_device. This patch changes the name of
this function to get_fs_device_and_root_path to better reflect what
the function does and changes the return type to struct fs_device_d.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Mar 2012
|
2012-02-25 |
fs: get fs device using container_of
...
This reduces the usage of dev->type_data.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 25 Feb 2012
|
fs: get fs driver using container_of
...
This reduces the usage of dev->type_data.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 25 Feb 2012
|
2012-02-19 |
Add suport for tftp as a filesystem
...
This adds tftp filesystem support. It currently duplicates
significant amounts of the tftp (command) support. This is ok
since we can eventually drop the original tftp command later.
tftp is not really suitable to be handled as a filesystem. It lacks
support for stat, reading directories and other things. Handling
it as a filesystem has one big advantage though: tftp is no special
case for boot scripts and/or commands anymore which makes them simpler.
This implementation has some improvements to the original tftp command.
It supports blocksize negotiation which speeds up transfers if the tftp
server supports it. Also we can determine the filesize to transfer if
the remote end supports it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 19 Feb 2012
|
2012-02-17 |
Merge branch 'pu/device-cleanup' into next
Sascha Hauer
committed
on 17 Feb 2012
|
fs: allow to mount on subdirectories
...
Since get_mtab_entry_by_path() is a bit more flexible now
we no longer have to force the user to mount on the root
directory only. Instead, we can allow to mount on subdirectories
aswell. Nested mounts are still not possible though.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: put fs devices on its own bus
...
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>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: remove fs devices list
...
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>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: remove only once used variable
...
dev is used only once, so make the code a tiny bit simpler by
not using an extra variable but dereference it when needed directly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: simplify get_mtab_entry_by_path
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: remove unused function fsdev_get_mountpoint
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: Store mtab path in allocated string
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: make locally used function get_mtab_entry_by_path static
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Feb 2012
|
fs: Store mtab entries in list
...
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>
Sascha Hauer
committed
on 17 Feb 2012
|
2012-02-15 |
fat: revert fat caching mechanism
...
There seems to be a bug in this mechanism. It's easy to
get the cached fat out of sync with the device. Revert
it for now. This includes a huge write performance drop.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Feb 2012
|
2012-01-16 |
devfs-code: fix warning
...
/opt/work/barebox/fs/devfs-core.c: In function 'partition_ioctl':
/opt/work/barebox/fs/devfs-core.c27: warning: unused variable 'reg'
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 12 Jan 2012
Sascha Hauer
committed
on 16 Jan 2012
|
2012-01-06 |
ioctl: add support for ECCGETSTATS and MEMGETREGIONINFO
...
Support added for ioctl of ECCGETSTATS and MEMGETREGIONINFO.
Fix default handling in core.c to return -EINVAL, if request
was unknown.
Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Alexander Aring
authored
on 5 Jan 2012
Sascha Hauer
committed
on 6 Jan 2012
|
2012-01-05 |
fat fs: Fix compile warning
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 5 Jan 2012
|
2011-12-15 |
cdev: pass flags to open function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Dec 2011
|
2011-12-05 |
Merge branch 'pu/cramfs-fix' into next
Sascha Hauer
committed
on 5 Dec 2011
|
ramfs: increase chunk size to 8192 bytes
...
dlmalloc seems to work more efficient with this chunk size.
Copying a bigger file (3MB) takes 271ms vs. 125ms on a i.MX27
board. Even bigger chunk sizes do not further improve performance.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 5 Dec 2011
|
fix cramfs support broken since zlib update
...
cramfs does not compile since we updated zlib to the kernel
version. Fix this by using the kernel version of uncompress.c
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 5 Dec 2011
|
2011-11-29 |
Merge branch 'master' into next
...
Conflicts:
drivers/ata/disk_drive.c
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Nov 2011
|
2011-11-28 |
Create a unique cdev number for on demand devices
...
For disk like devices attached to MCI, ATA or USB it depends on the order they
will be recognized. So an unique number for all disk like devices is required.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Juergen Beisert
authored
on 24 Nov 2011
Sascha Hauer
committed
on 28 Nov 2011
|
2011-11-17 |
fs/fat: Initialize local variable finfo
...
fat_stat in fs/fat.c declares finfo but doesn't initialize it.
When get_fileinfo is called, fno->lfname and fno->lfsize are
tested but haven't been zeroed...This can lead to a wrong
behavior.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Franck Jullien
authored
on 15 Nov 2011
Sascha Hauer
committed
on 17 Nov 2011
|
2011-11-11 |
mount: Fix the printing of device name
...
Mount without argument always print a "none" as device name mounted
because entry->parent_device is always NULL.
The problem is the mount function in fs/fs.c. parent_device is
initialized to NULL and never updated. With this patch,
parent_device is set with the mounted device name.
Moreover, the mount function has been modified to print the device
name plus device id using the dev_name function.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Franck Jullien
authored
on 9 Nov 2011
Sascha Hauer
committed
on 11 Nov 2011
|