Move VOL_NAMES definition to mv.h

Fits better and including dir.h is more messy for some places.

Change-Id: I3ec30dcc1ac2734ad3844c903238b6cc2f4e134c
storage: Add STORAGE_HOSTFS

CONFIG_STORAGE & STORAGE_HOSTFS allows to use parts of the storage_* API to be
compiled for application targets without compiling storage.c or performing
actually raw storage access. This is primarily to enable application targets to
implement HAVE_MULTIVOMULE/HAVE_HOTSWAP (in a later commit).

SIMULATOR uses the same mechanism without explicitely defining STORAGE_HOSTFS
(how to add a bit to an existing preprocessor token?).

Change-Id: Ib3f8ee0d5231e2ed21ff00842d51e32bc4fc7292
simulator: Simulate external storage for HAVE_MULTIDRIVE.

The virtual external storage can be inserted/extracted with the e key. This
has little effect because there is no way to access the storage (yet, a later
commit will change this). Except on ondio where the mmc needs to be
extracted before entering USB (like on real target).

Change-Id: I523402832f3b4ae71e0603b281aba4fb8592a897
codepages: Translate to linux codepage names for use on APPLICATION.

The iocharset mount option names the codepages slightly differently and
must be translated properly.

Change-Id: I147a256e3453136282244201c27225a30cdfdca0
logdiskf: enable for application and simulator builds.

Change-Id: I93afc8e7a989e3e5a85ff7df70b839fb64c0cdef
Fix for HAVE_MULTIDRIVE on application builds.

Change-Id: I089ea4756e0c824993c65062290c40b3e67f9181
RaaA: Move directory related stuff from filesystem-unix.c into rbpaths.c.

Part of this change is to align sdlapp builds to other application targets
in that the sim_* wrappers are not used anymore (except for sim_read/write).
Path mangling is now done in rbpaths.c as well.

Change-Id: I9726da73b50a83d9e1a1840288de16ec01ea029d
simulator: Fully simulate external storage.

The external storage will be created during make install, as simext folder in
the build directory. Upon pressing the e key the sim will mount (virtually
) this into the root directory. It can be accessed in the same way as an
sd/mmc card on real targets. This requires quite some path trickery in io.c.

Change-Id: I2fa9070a3146101ec5655b5b4115ca349d1d4bf4
samsungypr0: Support or mounting the microsd

A thread polls the appropriate GPIO pin for sd card presence and mounts
using the mount system call.

Change-Id: I31ab41c4120f4af64eb6998b7e7b6f9051585efb
Add forgotten file.

Change-Id: Ibd17bba201427b4bc0e45f29b246c20bd493c7d6
Fix reds

Change-Id: Ib2036d0786bd6fa39c5dadeeed83d74c7bd5c273
undef HAVE_STORAGE_GET_INFO for the sim, there is no useful implementation right now.

Change-Id: I3050b97d10d9b4705321d8e37faf4d5a6c58485b
Second try at undefing STORAGE_GET_INFO, the previous one was too hasty, sorry.

Change-Id: If938c132d46efcb531227d9fde8cce91104566e0
hosted: Rename a bit in functions to avoid name clashes with unix headers.

Change-Id: I2baa5532ddcbca8a839c31434309013f02173ed8
ypr0: Make it build without HAVE_MULTIDRIVE again.

Change-Id: I973f1b23497ba9c0ddb24cd36c24d0ce3ca06d06
hosted/multidrive: Speed up readdir()/get_dir_info().

The two functions need to check whether they are called for a specific path
to implement the virtual mount point for the external storage. This
is statistically rare and a hit on the common case. Therefore speed up
the common case by performing integer comparision first, and only expensive
string construction and comparision if that succeeds.

Change-Id: I3c41fe073e1f4f8eb62d2b8556a36937c9cb8290
application: Speed up dir_get_info() further.

It's quite rare that it is called for a symlink to a directory. But it only
needs a second syscall to stat() if that happened. Therefore speed up the
common case by avoiding an unecessary second syscall.

Change-Id: I911105f76631ebccc7696a1540e9cf069a706000
application: Remove trailing slashes from the input in opendir().

This is needed for readdir() and dir_get_info() to work properly because
they depend on hash/path matching.

Change-Id: Ibd23def10eebabd76cdddac2739a5274159e88a9
test_disk: Add an additional dirscan test that calls dir_get_info() also.

Especially on hosted dir_get_info() can be relatively. It is commonly called
after every readdir() for further information about the dir entry. So it's
peformance compared to readdir()-only is interesting.

Change-Id: I03ab41fb190acf738e04a5d3b2a4fe29276094f6
application: fix opendir() for "/" directory.

"/" couldn't be opened. This regression was introduced by 731072d. Trailing
slash should not be stripped for the root directory.

Change-Id: Idd2d9b1f33e7be789bcf432e586e6715eb4152f4