]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Rename supplement_target_for variable to supplemented_by
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 6 Jun 2026 14:27:00 +0000 (16:27 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Sat, 6 Jun 2026 14:34:22 +0000 (16:34 +0200)
"supplemented_by" seems a little quicker to grasp than "supplement_target_for"
as a variable name, and goes quite will together with "supplement_for" on the
opposite partition. So let's rename it.

src/repart/repart.c

index 501f2cd1e43d540450531320d94150f2174d4470..5de94e20bfce76905f417367f909a5229d77e871 100644 (file)
@@ -542,7 +542,7 @@ typedef struct Partition {
         RateLimit progress_ratelimit;
 
         char *supplement_for_name;
-        struct Partition *supplement_for, *supplement_target_for;
+        struct Partition *supplement_for, *supplemented_by;
         struct Partition *suppressing;
 
         struct Partition *siblings[_VERITY_MODE_MAX];
@@ -796,23 +796,23 @@ static Partition *partition_new(Context *c) {
 static void partition_unlink_supplement(Partition *p) {
         assert(p);
 
-        assert(!p->supplement_for || !p->supplement_target_for); /* Can't be both */
+        assert(!p->supplement_for || !p->supplemented_by); /* Can't be both */
 
-        if (p->supplement_target_for) {
-                assert(p->supplement_target_for->supplement_for == p);
+        if (p->supplemented_by) {
+                assert(p->supplemented_by->supplement_for == p);
 
-                p->supplement_target_for->supplement_for = NULL;
+                p->supplemented_by->supplement_for = NULL;
         }
 
         if (p->supplement_for) {
-                assert(p->supplement_for->supplement_target_for == p);
+                assert(p->supplement_for->supplemented_by == p);
                 assert(!p->supplement_for->suppressing || p->supplement_for->suppressing == p);
 
-                p->supplement_for->supplement_target_for = p->supplement_for->suppressing = NULL;
+                p->supplement_for->supplemented_by = p->supplement_for->suppressing = NULL;
         }
 
         p->supplement_for_name = mfree(p->supplement_for_name);
-        p->supplement_target_for = p->supplement_for = p->suppressing = NULL;
+        p->supplemented_by = p->supplement_for = p->suppressing = NULL;
 }
 
 static Partition* partition_free(Partition *p) {
@@ -3676,7 +3676,7 @@ static int context_read_definitions(Context *context) {
                                           "PaddingMinBytes= larger than PaddingMaxBytes= when merged with SupplementFor= target.");
 
                 p->supplement_for = tgt;
-                tgt->suppressing = tgt->supplement_target_for = p;
+                tgt->suppressing = tgt->supplemented_by = p;
         }
 
         return 0;