diff options
Diffstat (limited to 'sdcard/fuse.h')
| -rw-r--r-- | sdcard/fuse.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sdcard/fuse.h b/sdcard/fuse.h index 634fbf191..9dafa79ea 100644 --- a/sdcard/fuse.h +++ b/sdcard/fuse.h @@ -33,6 +33,7 @@ #include <map> #include <string> +#include <android-base/logging.h> #include <cutils/fs.h> #include <cutils/log.h> #include <cutils/multiuser.h> @@ -40,15 +41,20 @@ #include <private/android_filesystem_config.h> -// TODO(b/30222003): Fix compilation with FUSE_TRACE == 1. #define FUSE_TRACE 0 #if FUSE_TRACE #define TRACE(x...) ALOGD(x) -#else +static constexpr bool kEnableDLog = true; +#else // FUSE_TRACE == 0 #define TRACE(x...) do {} while (0) +static constexpr bool kEnableDLog = false; #endif +// Use same strategy as DCHECK(). +#define DLOG(x) \ + if (kEnableDLog) LOG(x) + #define ERROR(x...) ALOGE(x) /* Maximum number of bytes to write in one request. */ |
