summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c2
-rw-r--r--src/journal/sd-journal.c10
-rw-r--r--src/readahead/readahead-collect.c2
-rw-r--r--src/shared/macro.h2
-rw-r--r--src/shared/util.c4
6 files changed, 10 insertions, 12 deletions
diff --git a/TODO b/TODO
index 5c5e4b46f9..9bc14fdbf5 100644
--- a/TODO
+++ b/TODO
@@ -57,8 +57,6 @@ Features:
* better error message if you run systemctl without systemd running
-* rename F_TYPE_CMP() to F_TYPE_EQUAL()
-
* unlink PID files of units after exit
* tiny tool that saves/restores backlight
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index 5c0e455338..880661e277 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -434,7 +434,7 @@ static int get_block_device(const char *path, dev_t *dev) {
if (statfs("/", &sfs) < 0)
return -errno;
- if (F_TYPE_CMP(sfs.f_type, BTRFS_SUPER_MAGIC))
+ if (F_TYPE_EQUAL(sfs.f_type, BTRFS_SUPER_MAGIC))
return get_btrfs_block_device(path, dev);
return 0;
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index a83c0c25bf..7700d6cb12 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1266,11 +1266,11 @@ static void check_network(sd_journal *j, int fd) {
return;
j->on_network =
- F_TYPE_CMP(sfs.f_type, CIFS_MAGIC_NUMBER) ||
- F_TYPE_CMP(sfs.f_type, CODA_SUPER_MAGIC) ||
- F_TYPE_CMP(sfs.f_type, NCP_SUPER_MAGIC) ||
- F_TYPE_CMP(sfs.f_type, NFS_SUPER_MAGIC) ||
- F_TYPE_CMP(sfs.f_type, SMB_SUPER_MAGIC);
+ F_TYPE_EQUAL(sfs.f_type, CIFS_MAGIC_NUMBER) ||
+ F_TYPE_EQUAL(sfs.f_type, CODA_SUPER_MAGIC) ||
+ F_TYPE_EQUAL(sfs.f_type, NCP_SUPER_MAGIC) ||
+ F_TYPE_EQUAL(sfs.f_type, NFS_SUPER_MAGIC) ||
+ F_TYPE_EQUAL(sfs.f_type, SMB_SUPER_MAGIC);
}
static bool file_has_type_prefix(const char *prefix, const char *filename) {
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index 5d37bb75f3..32888add01 100644
--- a/src/readahead/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
@@ -510,7 +510,7 @@ done:
on_ssd = fs_on_ssd(root) > 0;
log_debug("On SSD: %s", yes_no(on_ssd));
- on_btrfs = statfs(root, &sfs) >= 0 && F_TYPE_CMP(sfs.f_type, BTRFS_SUPER_MAGIC);
+ on_btrfs = statfs(root, &sfs) >= 0 && F_TYPE_EQUAL(sfs.f_type, BTRFS_SUPER_MAGIC);
log_debug("On btrfs: %s", yes_no(on_btrfs));
if (asprintf(&pack_fn_new, "%s/.readahead.new", root) < 0) {
diff --git a/src/shared/macro.h b/src/shared/macro.h
index 969329d152..0d3ff1cda5 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -273,7 +273,7 @@ do { \
* 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_CMP(a, b) (a == (typeof(a)) b)
+#define F_TYPE_EQUAL(a, b) (a == (typeof(a)) b)
/* Returns the number of chars needed to format variables of the
diff --git a/src/shared/util.c b/src/shared/util.c
index f23dd92a6b..ca9c2eb9d1 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2830,8 +2830,8 @@ int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct
_pure_ static int is_temporary_fs(struct statfs *s) {
assert(s);
return
- F_TYPE_CMP(s->f_type, TMPFS_MAGIC) ||
- F_TYPE_CMP(s->f_type, RAMFS_MAGIC);
+ F_TYPE_EQUAL(s->f_type, TMPFS_MAGIC) ||
+ F_TYPE_EQUAL(s->f_type, RAMFS_MAGIC);
}
int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev) {