mirror of
https://github.com/systemd/systemd.git
synced 2025-01-23 02:04:32 +03:00
sysupdated: Fixup redundant constant name
SD_ stands for systemd, so SD_SYSTEMD_* is SYSTEMD_SYSTEMD_*
This commit is contained in:
parent
5256326261
commit
e0081f18a0
@ -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) << 0)
|
||||
#define SD_SYSUPDATE_OFFLINE (UINT64_C(1) << 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>
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user