1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-26 17:27:41 +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
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>

View 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)

View 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)

View 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);