stat-util.h: move F_TYPE_EQUAL() macro definition to stat-util.h
This commit is contained in:
parent
15a5e95075
commit
872a590ef8
|
@ -36,6 +36,7 @@
|
||||||
#include "path-util.h"
|
#include "path-util.h"
|
||||||
#include "selinux-util.h"
|
#include "selinux-util.h"
|
||||||
#include "smack-util.h"
|
#include "smack-util.h"
|
||||||
|
#include "stat-util.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
|
|
@ -41,15 +41,16 @@
|
||||||
#include "mkdir.h"
|
#include "mkdir.h"
|
||||||
#include "parse-util.h"
|
#include "parse-util.h"
|
||||||
#include "path-util.h"
|
#include "path-util.h"
|
||||||
|
#include "proc-cmdline.h"
|
||||||
#include "process-util.h"
|
#include "process-util.h"
|
||||||
#include "set.h"
|
#include "set.h"
|
||||||
#include "special.h"
|
#include "special.h"
|
||||||
|
#include "stat-util.h"
|
||||||
#include "string-table.h"
|
#include "string-table.h"
|
||||||
#include "string-util.h"
|
#include "string-util.h"
|
||||||
#include "unit-name.h"
|
#include "unit-name.h"
|
||||||
#include "user-util.h"
|
#include "user-util.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "proc-cmdline.h"
|
|
||||||
|
|
||||||
int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) {
|
int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) {
|
||||||
_cleanup_free_ char *fs = NULL;
|
_cleanup_free_ char *fs = NULL;
|
||||||
|
|
|
@ -301,12 +301,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
|
||||||
|
|
||||||
#define char_array_0(x) x[sizeof(x)-1] = 0;
|
#define char_array_0(x) x[sizeof(x)-1] = 0;
|
||||||
|
|
||||||
/* Because statfs.t_type can be int on some architectures, we have to cast
|
|
||||||
* the const magic to the type, otherwise the compiler warns about
|
|
||||||
* signed/unsigned comparison, because the magic can be 32 bit unsigned.
|
|
||||||
*/
|
|
||||||
#define F_TYPE_EQUAL(a, b) (a == (typeof(a)) b)
|
|
||||||
|
|
||||||
/* Returns the number of chars needed to format variables of the
|
/* Returns the number of chars needed to format variables of the
|
||||||
* specified type as a decimal string. Adds in extra space for a
|
* specified type as a decimal string. Adds in extra space for a
|
||||||
* negative '-' prefix (hence works correctly on signed
|
* negative '-' prefix (hence works correctly on signed
|
||||||
|
|
|
@ -61,3 +61,9 @@ int path_check_fstype(const char *path, statfs_f_type_t magic_value);
|
||||||
|
|
||||||
bool is_temporary_fs(const struct statfs *s) _pure_;
|
bool is_temporary_fs(const struct statfs *s) _pure_;
|
||||||
int fd_is_temporary_fs(int fd);
|
int fd_is_temporary_fs(int fd);
|
||||||
|
|
||||||
|
/* Because statfs.t_type can be int on some architectures, we have to cast
|
||||||
|
* the const magic to the type, otherwise the compiler warns about
|
||||||
|
* signed/unsigned comparison, because the magic can be 32 bit unsigned.
|
||||||
|
*/
|
||||||
|
#define F_TYPE_EQUAL(a, b) (a == (typeof(a)) b)
|
||||||
|
|
Loading…
Reference in New Issue