]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: stop saying "vendor preset"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 1 Apr 2022 08:15:54 +0000 (10:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 4 May 2022 07:10:50 +0000 (09:10 +0200)
We have vendor presets, and local admin presets, and runtime presets
(under /usr/lib, /usr/local/lib and /etc, /run, respectively). When we
display preset state, it can be configured in any of those places, so
we shouldn't say anything about the origin.

(Another nice advantage is that it improves alignment:

[root@f36 ~]# systemctl list-unit-files multipathd.service
UNIT FILE          STATE   VENDOR PRESET
multipathd.service enabled enabled

^ this looks we have a "PRESET" column that is empty.)

man/systemctl.xml
src/systemctl/systemctl-list-unit-files.c
src/systemctl/systemctl-show.c

index 963eb9ec3adf0b833b03a431a8b14f866c0904a9..3d03c0374b3376b4ae34fcfe3b4c8dcedb400e5e 100644 (file)
@@ -221,7 +221,7 @@ Sun 2017-02-26 20:57:49 EST  2h 3min left  Sun 2017-02-26 11:56:36 EST  6h ago
 
               <programlisting>$ systemctl status bluetooth
 ● bluetooth.service - Bluetooth service
-   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
+   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
    Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
      Docs: man:bluetoothd(8)
  Main PID: 930 (bluetoothd)
index 552e85a06b71c3d190ed96cb8808e59f314179f7..fa7a789b282b1bc3d6267895791ca323fdacaa9e 100644 (file)
@@ -54,7 +54,7 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) {
         _cleanup_(unit_file_presets_freep) UnitFilePresets presets = {};
         int r;
 
-        table = table_new("unit file", "state", "vendor preset");
+        table = table_new("unit file", "state", "preset");
         if (!table)
                 return log_oom();
 
index 1c0b0027347dcc8750019d192ab534a4da165a4e..c514109b170d82bf6cfec38a35203aacb845e147 100644 (file)
@@ -318,7 +318,7 @@ static void print_status_info(
                 bool *ellipsized) {
 
         const char *active_on, *active_off, *on, *off, *ss, *fs;
-        const char *enable_on, *enable_off, *enable_vendor_on, *enable_vendor_off;
+        const char *enable_on, *enable_off, *preset_on, *preset_off;
         _cleanup_free_ char *formatted_path = NULL;
         usec_t timestamp;
         const char *path;
@@ -331,7 +331,7 @@ static void print_status_info(
 
         format_active_state(i->active_state, &active_on, &active_off);
         format_enable_state(i->unit_file_state, &enable_on, &enable_off);
-        format_enable_state(i->unit_file_preset, &enable_vendor_on, &enable_vendor_off);
+        format_enable_state(i->unit_file_preset, &preset_on, &preset_off);
 
         const SpecialGlyph glyph = unit_active_state_to_glyph(unit_active_state_from_string(i->active_state));
 
@@ -366,8 +366,8 @@ static void print_status_info(
                        on, strna(i->load_state), off,
                        path,
                        enable_on, i->unit_file_state, enable_off,
-                       show_preset ? "; vendor preset: " : "",
-                       enable_vendor_on, show_preset ? i->unit_file_preset : "", enable_vendor_off);
+                       show_preset ? "; preset: " : "",
+                       preset_on, show_preset ? i->unit_file_preset : "", preset_off);
 
         } else if (path)
                 printf("     Loaded: %s%s%s (%s)\n",