diff options
| author | Po Lu | 2023-08-19 13:25:42 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-19 13:25:42 +0800 |
| commit | 2effd18c97bf542e43203c95dd88114159162dd5 (patch) | |
| tree | e8122ac2aab7a601d22024582fd90f1eb6bc5be4 /src/android.h | |
| parent | ec8f330df6b512242d0c2d18c8d1e9b112916160 (diff) | |
| download | emacs-2effd18c97bf542e43203c95dd88114159162dd5.tar.gz emacs-2effd18c97bf542e43203c95dd88114159162dd5.zip | |
Make some file I/O operations more robust on Android
* src/android.h (android_readlinkat): New prototype.
* src/androidvfs.c (struct android_vops): New function pointer
`readlink'.
(unix_vfs_ops, android_unix_readlink, afs_vfs_ops)
(android_afs_readlink, content_vfs_ops, android_content_mkdir)
(android_content_chmod, authority_vfs_ops)
(android_authority_readlink, saf_root_vfs_ops)
(android_saf_root_readlink, saf_tree_vfs_ops)
(android_saf_tree_readlink, saf_file_vfs_ops, saf_new_vfs_ops)
(android_saf_new_readlink, root_vfs_ops): Implement new
`readlink' vops for each vnode type.
(android_readlinkat): New function.
* src/fileio.c (Fcopy_file): Be more flexible about SELinux
errors under Android.
(emacs_readlinkat): Use `android_readlink' when built as
libemacs.so.
Diffstat (limited to 'src/android.h')
| -rw-r--r-- | src/android.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/android.h b/src/android.h index a052d3a3b21..e865d7da665 100644 --- a/src/android.h +++ b/src/android.h | |||
| @@ -75,6 +75,8 @@ extern int android_renameat_noreplace (int, const char *, | |||
| 75 | int, const char *); | 75 | int, const char *); |
| 76 | extern int android_rename (const char *, const char *); | 76 | extern int android_rename (const char *, const char *); |
| 77 | extern int android_fchmodat (int, const char *, mode_t, int); | 77 | extern int android_fchmodat (int, const char *, mode_t, int); |
| 78 | extern ssize_t android_readlinkat (int, const char *restrict, char *restrict, | ||
| 79 | size_t); | ||
| 78 | 80 | ||
| 79 | 81 | ||
| 80 | 82 | ||