xen: fix xs_directory

The xs_directory signature was still non-conforming with libxenstore.
It requires that we return the directory strings, not that we pass them
in a parameter.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts/upload_manifest: Fix symlink permissions

The os.stat() function follows symbolic links. Upload_manifest.py
therefore fails when it encounters a symlink that's missing its target
file on the host. Fix the code to use os.lstat() to look up the
permissions for symlinks.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts/osv: Add support for symlinks in filemap.py

Currently, filemap.py generates a manifest file where all files are
mapped by their path. This causes upload_manifest.py not to consider
symlinks and simply upload a copy of the target file.

Fixes #539.

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge branch 'stable/v0.14'