1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00

sysupdated: Fixup redundant constant name

SD_ stands for systemd, so SD_SYSTEMD_* is SYSTEMD_SYSTEMD_*
This commit is contained in:
Adrian Vovk 2024-08-21 21:35:25 -04:00
parent 5256326261
commit e0081f18a0
No known key found for this signature in database
GPG Key ID: 90A7B546533E15FB
4 changed files with 13 additions and 13 deletions

View 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 <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 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 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> and restricts results to locally installed versions. This flag is defined as follows:</para>
<programlisting> <programlisting>
#define SD_SYSTEMD_SYSUPDATE_OFFLINE (UINT64_C(1) &lt;&lt; 0) #define SD_SYSUPDATE_OFFLINE (UINT64_C(1) &lt;&lt; 0)
</programlisting> </programlisting>
<para>The returned JSON object contains several known keys. More keys may be added in the future. The <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> <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 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 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>SD_SYSUPDATE_OFFLINE</literal> flag is exposed as a variable named <literal>offline</literal>.
<literal>offline</literal>.</para> </para>
</refsect2> </refsect2>
</refsect1> </refsect1>

View File

@ -4,4 +4,4 @@
int reboot_now(void); int reboot_now(void);
#define SD_SYSTEMD_SYSUPDATE_OFFLINE (UINT64_C(1) << 0) #define SD_SYSUPDATE_OFFLINE (UINT64_C(1) << 0)

View File

@ -856,7 +856,7 @@ static int target_method_list(sd_bus_message *msg, void *userdata, sd_bus_error
const char *details[] = { const char *details[] = {
"class", target_class_to_string(t->class), "class", target_class_to_string(t->class),
"name", t->name, "name", t->name,
"offline", one_zero(FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE)), "offline", one_zero(FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE)),
NULL NULL
}; };
@ -875,7 +875,7 @@ static int target_method_list(sd_bus_message *msg, void *userdata, sd_bus_error
if (r < 0) if (r < 0)
return r; return r;
j->offline = FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE); j->offline = FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE);
r = job_start(j); r = job_start(j);
if (r < 0) 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), "class", target_class_to_string(t->class),
"name", t->name, "name", t->name,
"version", version, "version", version,
"offline", one_zero(FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE)), "offline", one_zero(FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE)),
NULL NULL
}; };
@ -945,7 +945,7 @@ static int target_method_describe(sd_bus_message *msg, void *userdata, sd_bus_er
if (!j->version) if (!j->version)
return log_oom(); return log_oom();
j->offline = FLAGS_SET(flags, SD_SYSTEMD_SYSUPDATE_OFFLINE); j->offline = FLAGS_SET(flags, SD_SYSUPDATE_OFFLINE);
r = job_start(j); r = job_start(j);
if (r < 0) if (r < 0)

View File

@ -430,7 +430,7 @@ static int list_versions(sd_bus *bus, const char *target_path) {
&error, &error,
&reply, &reply,
"t", "t",
arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0); arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
if (r < 0) if (r < 0)
return log_bus_error(r, &error, NULL, "call List"); 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, op,
"st", "st",
*version, *version,
arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0); arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
if (r < 0) if (r < 0)
return log_error_errno(r, "Failed to call Describe: %m"); return log_error_errno(r, "Failed to call Describe: %m");
TAKE_PTR(op); TAKE_PTR(op);
@ -508,7 +508,7 @@ static int describe(sd_bus *bus, const char *target_path, const char *version) {
&reply, &reply,
"st", "st",
version, version,
arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0); arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
if (r < 0) if (r < 0)
return log_bus_error(r, &error, NULL, "call Describe"); 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, op,
"st", "st",
new_version, new_version,
arg_offline ? SD_SYSTEMD_SYSUPDATE_OFFLINE : 0); arg_offline ? SD_SYSUPDATE_OFFLINE : 0);
if (r < 0) if (r < 0)
return log_error_errno(r, "Failed to call Describe: %m"); return log_error_errno(r, "Failed to call Describe: %m");
TAKE_PTR(op); TAKE_PTR(op);