print_fields.h: rename PRINT_FIELD_UID to PRINT_FIELD_ID
authorEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 5 Jan 2018 19:57:57 +0000 (20:57 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 8 Jan 2018 00:40:22 +0000 (00:40 +0000)
As uid is not the only thing that has a special treatment of the -1
value (and, as a result, needs special care), let's rename
PRINT_FIELD_UID to PRINT_FIELD_ID and make PRINT_FIELD_UID its alias.

* print_fields.h (PRINT_FIELD_ID): Rename from PRINT_FIELD_UID.
(PRINT_FIELD_UID): Define to PRINT_FIELD_ID.

print_fields.h

index 35859c99ce8223f86b21b9930ea125a248bca956..b78e09a1256f0e915fcabd0bc979542516ac4985 100644 (file)
                            (dflt_));           \
        } while (0)
 
-#define PRINT_FIELD_UID(prefix_, where_, field_)                                       \
+/*
+ * Generic "ID" printing. ID is considered unsigned except for the special value
+ * of -1.
+ */
+#define PRINT_FIELD_ID(prefix_, where_, field_)                                        \
        do {                                                                            \
                if (sign_extend_unsigned_to_ll((where_).field_) == -1LL)                \
                        STRACE_PRINTF("%s%s=-1", (prefix_), #field_);                   \
@@ -83,6 +87,8 @@
                                      zero_extend_signed_to_ull((where_).field_));      \
        } while (0)
 
+#define PRINT_FIELD_UID PRINT_FIELD_ID
+
 #define PRINT_FIELD_STRING(prefix_, where_, field_, len_, style_)      \
        do {                                                            \
                STRACE_PRINTF("%s%s=", (prefix_), #field_);             \