diff options
author | Laurent Vivier <laurent@vivier.eu> | 2015-09-01 22:27:33 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2015-09-28 16:44:46 +0300 |
commit | 0f0426f343886fb5c9f137c2830f35cc2dae7327 (patch) | |
tree | 93efd20512ba8c6b38921c28b2a9c91b7dd09f67 /linux-user/Makefile.objs | |
parent | 93b4eff80af9822e4b726dcf21ee61538e088695 (diff) |
linux-user: add name_to_handle_at/open_by_handle_at
This patch allows to run example given by open_by_handle_at(2):
The following shell session demonstrates the use of these two programs:
$ echo 'Can you please think about it?' > cecilia.txt
$ ./t_name_to_handle_at cecilia.txt > fh
$ ./t_open_by_handle_at < fh
open_by_handle_at: Operation not permitted
$ sudo ./t_open_by_handle_at < fh # Need CAP_SYS_ADMIN
Read 31 bytes
$ rm cecilia.txt
Now we delete and (quickly) re-create the file so that it has the same
content and (by chance) the same inode.[...]
$ stat --printf="%i\n" cecilia.txt # Display inode number
4072121
$ rm cecilia.txt
$ echo 'Can you please think about it?' > cecilia.txt
$ stat --printf="%i\n" cecilia.txt # Check inode number
4072121
$ sudo ./t_open_by_handle_at < fh
open_by_handle_at: Stale NFS file handle
See the man page for source code.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/Makefile.objs')
0 files changed, 0 insertions, 0 deletions