and encodes and decodes printable text using various common encodings:
base64,base64url,base32,base32hex,base16,base2,z85.
+** Improvements
+
+ stat and tail now know about the "sdcardfs" file system on Android.
+ stat -f -c%T now reports the file system type, and tail -f uses inotify.
+
* Noteworthy changes in release 8.30 (2018-07-01) [stable]
print $emit_magic ? $magic_comment : $map_comment;
$emit_magic
- and print "\n#if defined __linux__\n";
+ and print "\n#if defined __linux__ || defined __ANDROID__\n";
$emit_magic
or print "static inline int\n"
. "is_local_fs_type (unsigned long int magic)\n"
#else
switch (statfsbuf->f_type)
{
-# if defined __linux__
+# if defined __linux__ || defined __ANDROID__
/* Compare with what's in libc:
f=/a/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
return "romfs";
case S_MAGIC_RPC_PIPEFS: /* 0x67596969 local */
return "rpc_pipefs";
+ case S_MAGIC_SDCARDFS: /* 0x5DCA2DF5 local */
+ return "sdcardfs";
case S_MAGIC_SECURITYFS: /* 0x73636673 local */
return "securityfs";
case S_MAGIC_SELINUX: /* 0xF97CFF8C local */
# include <sys/inotify.h>
/* 'select' is used by tail_forever_inotify. */
# include <sys/select.h>
+#endif
-/* inotify needs to know if a file is local. */
+/* Linux can optimize the handling of local files. */
+#if defined __linux__ || defined __ANDROID__
# include "fs.h"
# include "fs-is-local.h"
# if HAVE_SYS_STATFS_H
{
bool remote = true; /* be conservative (poll by default). */
-#if HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE && defined __linux__
+#if HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE \
+ && (defined __linux__ || defined __ANDROID__)
struct statfs buf;
int err = fstatfs (fd, &buf);
if (err != 0)