jamesge commented on a change in pull request #929: add license to file that missing it URL: https://github.com/apache/incubator-brpc/pull/929#discussion_r326942152
########## File path: src/butil/file_util_linux.cc ########## @@ -5,16 +5,31 @@ #include "butil/file_util.h" #include <errno.h> -// NOTE(gejun): Missing linux/magic.h in some machines of Baidu. Since the file -// only contains macro constants which is unlikely to be changed in future, we -// copy the header locally. -#include "butil/linux_magic.h" #include <sys/vfs.h> #include "butil/files/file_path.h" -// Make sure some of the newer macros from magic.h are defined. -// TODO([email protected]): remove this after 2014. +#ifndef EXT2_SUPER_MAGIC +#define EXT2_SUPER_MAGIC 0xEF53 +#endif +#ifndef MSDOS_SUPER_MAGIC +#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ +#endif +#ifndef REISERFS_SUPER_MAGIC +#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */ +#endif +#ifndef NFS_SUPER_MAGIC +#define NFS_SUPER_MAGIC 0x6969 +#endif +#ifndef SMB_SUPER_MAGIC +#define SMB_SUPER_MAGIC 0x517B +#endif +#ifndef CODA_SUPER_MAGIC +#define CODA_SUPER_MAGIC 0x73757245 +#endif +#ifndef CGROUP_SUPER_MAGIC +#define CGROUP_SUPER_MAGIC 0x27e0eb +#endif Review comment: 这里弄反了,应该把下面的四个放到butil/linux_magic.h里去。未来有可能其他地方需要这些macros ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
