]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysupdated: Fixup redundant constant name
authorAdrian Vovk <adrianvovk@gmail.com>
Thu, 22 Aug 2024 01:35:25 +0000 (21:35 -0400)
committerAdrian Vovk <adrianvovk@gmail.com>
Thu, 22 Aug 2024 02:33:16 +0000 (22:33 -0400)
SD_ stands for systemd, so SD_SYSTEMD_* is SYSTEMD_SYSTEMD_*

man/org.freedesktop.sysupdate1.xml
src/sysupdate/sysupdate-util.h
src/sysupdate/sysupdated.c
src/sysupdate/updatectl.c

index ac0e9152a13d9729012f4c091364ee26ea247c0f..329fab8635d6cd7a4f550f133f1b358a3774d8db 100644 (file)
@@ -180,11 +180,11 @@ node /org/freedesktop/sysupdate1/target/host {
       <para><function>Describe()</function> returns all known information about a given version as a JSON
       object. The <varname>version</varname> argument is used to pass the version to be described. Additional
       options may be passed through the <varname>flags</varname> argument. The only supported value currently
-      is <varname>SD_SYSTEMD_SYSUPDATE_OFFLINE</varname>, which prevents the call from accessing the network
+      is <varname>SD_SYSUPDATE_OFFLINE</varname>, which prevents the call from accessing the network
       and restricts results to locally installed versions. This flag is defined as follows:</para>
 
       <programlisting>
-#define SD_SYSTEMD_SYSUPDATE_OFFLINE    (UINT64_C(1) &lt;&lt; 0)
+#define SD_SYSUPDATE_OFFLINE    (UINT64_C(1) &lt;&lt; 0)
       </programlisting>
 
       <para>The returned JSON object contains several known keys. More keys may be added in the future. The
@@ -327,8 +327,8 @@ node /org/freedesktop/sysupdate1/target/host {
       <literal>class</literal> contains the class of the Target being acted upon, and <literal>name</literal>
       contains the name of the same Target. Additionally, each method exposes its arguments to the
       rule. Arguments containing flags are unwrapped into a variable-per-flag; for example, the
-      <literal>SD_SYSTEMD_SYSUPDATE_OFFLINE</literal> flag is exposed as a variable named
-      <literal>offline</literal>.</para>
+      <literal>SD_SYSUPDATE_OFFLINE</literal> flag is exposed as a variable named <literal>offline</literal>.
+      </para>
     </refsect2>
   </refsect1>
 
index 56339a87b15233da086ada6cf3e2883fd1c6ce79..989e0693297d96b1ee410c60ef14796b3ae5d1b7 100644 (file)
@@ -4,4 +4,4 @@
 
 int reboot_now(void);
 
-#define SD_SYSTEMD_SYSUPDATE_OFFLINE  (UINT64_C(1) << 0)
+#define SD_SYSUPDATE_OFFLINE  (UINT64_C(1) << 0)
index 776211f74b4d961c8d790efb7d9d0895a91f184e..83295fe0d9620275fc84d12715ef9cc04f6ec215 100644 (file)
@@ -856,7 +856,7 @@ static int target_method_list(sd_bus_message *msg, void *userdata, sd_bus_error
         const char *details[] = {
                 "class", target_class_to_string(t->class),
                 "name", t->name,
-                "offline", one_zero(FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE)),
+                "offline", one_zero(FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE)),
                 NULL
         };
 
@@ -875,7 +875,7 @@ static int target_method_list(sd_bus_message *msg, void *userdata, sd_bus_error
         if (r < 0)
                 return r;
 
-        j->offline = FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE);
+        j->offline = FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE);
 
         r = job_start(j);
         if (r < 0)
@@ -922,7 +922,7 @@ static int target_method_describe(sd_bus_message *msg, void *userdata, sd_bus_er
                 "class", target_class_to_string(t->class),
                 "name", t->name,
                 "version", version,
-                "offline", one_zero(FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE)),
+                "offline", one_zero(FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE)),
                 NULL
         };
 
@@ -945,7 +945,7 @@ static int target_method_describe(sd_bus_message *msg, void *userdata, sd_bus_er
         if (!j->version)
                 return log_oom();
 
-        j->offline = FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE);
+        j->offline = FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE);
 
         r = job_start(j);
         if (r < 0)
index 39957ea1a01b218bf8d76d52a4bd7ffaf8765ba4..151fa9e1d7a7b8240fa0160a56ab54f3a712ef24 100644 (file)
@@ -430,7 +430,7 @@ static int list_versions(sd_bus *bus, const char *target_path) {
                         &error,
                         &reply,
                         "t",
-                        arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0);
+                        arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
         if (r < 0)
                 return log_bus_error(r, &error, NULL, "call List");
 
@@ -473,7 +473,7 @@ static int list_versions(sd_bus *bus, const char *target_path) {
                                              op,
                                              "st",
                                              *version,
-                                             arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0);
+                                             arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
                 if (r < 0)
                         return log_error_errno(r, "Failed to call Describe: %m");
                 TAKE_PTR(op);
@@ -508,7 +508,7 @@ static int describe(sd_bus *bus, const char *target_path, const char *version) {
                         &reply,
                         "st",
                         version,
-                        arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0);
+                        arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
         if (r < 0)
                 return log_bus_error(r, &error, NULL, "call Describe");
 
@@ -707,7 +707,7 @@ static int check_finished(sd_bus_message *reply, void *userdata, sd_bus_error *r
                                      op,
                                      "st",
                                      new_version,
-                                     arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0);
+                                     arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
         if (r < 0)
                 return log_error_errno(r, "Failed to call Describe: %m");
         TAKE_PTR(op);