diff options
| author | Po Lu | 2023-08-03 14:50:05 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-03 14:50:05 +0800 |
| commit | 6d44d08e044dd2a74c6ac65cedb32a8f7a4f82de (patch) | |
| tree | 2d698e41931b708c8c47f174c2471d5423d12424 /src/sysdep.c | |
| parent | 91a7e9d83f212e478958c2bafd59057ec816cba0 (diff) | |
| download | emacs-6d44d08e044dd2a74c6ac65cedb32a8f7a4f82de.tar.gz emacs-6d44d08e044dd2a74c6ac65cedb32a8f7a4f82de.zip | |
Isolate fchmodat within the Android VFS layer
* src/android.h: Update prototypes.
* src/androidvfs.c (unix_vfs_ops, android_unix_chmod, afs_vfs_ops)
(android_afs_chmod, content_vfs_ops, android_content_chmod)
(authority_vfs_ops, android_authority_chmod, saf_root_vfs_ops)
(android_saf_root_chmod, saf_tree_vfs_ops, android_saf_tree_chmod)
(saf_file_vfs_ops, saf_new_vfs_ops, android_saf_new_chmod)
(root_vfs_ops): Add `chmod' to the list of functions implemented
by each vnode.
(android_fchmodat): New function.
* src/fileio.c (Fset_file_modes): Use `emacs_fchmodat'.
* src/lisp.h:
* src/sysdep.c (emacs_fchmodat): Delegate to android_fchmodat on
Android.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 0a1905c9196..a995bc66741 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -2719,6 +2719,16 @@ emacs_rename (const char *src, const char *dst) | |||
| 2719 | #endif /* !(defined HAVE_ANDROID && !defined ANDROID_STUBIFY) */ | 2719 | #endif /* !(defined HAVE_ANDROID && !defined ANDROID_STUBIFY) */ |
| 2720 | } | 2720 | } |
| 2721 | 2721 | ||
| 2722 | int | ||
| 2723 | emacs_fchmodat (int fd, const char *path, mode_t mode, int flags) | ||
| 2724 | { | ||
| 2725 | #if !(defined HAVE_ANDROID && !defined ANDROID_STUBIFY) | ||
| 2726 | return fchmodat (fd, path, mode, flags); | ||
| 2727 | #else /* !defined HAVE_ANDROID || defined ANDROID_STUBIFY */ | ||
| 2728 | return android_fchmodat (fd, path, mode, flags); | ||
| 2729 | #endif /* !(defined HAVE_ANDROID && !defined ANDROID_STUBIFY) */ | ||
| 2730 | } | ||
| 2731 | |||
| 2722 | /* Maximum number of bytes to read or write in a single system call. | 2732 | /* Maximum number of bytes to read or write in a single system call. |
| 2723 | This works around a serious bug in Linux kernels before 2.6.16; see | 2733 | This works around a serious bug in Linux kernels before 2.6.16; see |
| 2724 | <https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=612839>. | 2734 | <https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=612839>. |