]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemd-mount: add --full command line option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 Jan 2020 03:07:28 +0000 (12:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 Jan 2020 03:07:28 +0000 (12:07 +0900)
man/systemd-mount.xml
src/mount/mount-tool.c

index 82ac61a447fffdfcf39fc959fad2368558dbb7d0..a6e6dd9b483bd7baede8d74b7c73caeb0318a8c6 100644 (file)
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>-l</option></term>
+        <term><option>--full</option></term>
+
+        <listitem>
+          <para>Do not ellipsize the output when <option>--list</option> is specified.</para>
+        </listitem>
+      </varlistentry>
+
       <xi:include href="standard-options.xml" xpointer="no-pager"/>
       <xi:include href="standard-options.xml" xpointer="no-legend" />
       <xi:include href="standard-options.xml" xpointer="no-ask-password"/>
index 69f140fb3e0f405c75be9679b5579c5ea94b0f42..babd82704c01d4fd0c85dc36445db7b992fdd752 100644 (file)
@@ -46,6 +46,7 @@ enum {
 static bool arg_no_block = false;
 static PagerFlags arg_pager_flags = 0;
 static bool arg_legend = true;
+static bool arg_full = false;
 static bool arg_ask_password = true;
 static bool arg_quiet = false;
 static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
@@ -92,6 +93,7 @@ static int help(void) {
                "     --no-block                   Do not wait until operation finished\n"
                "     --no-pager                   Do not pipe output into a pager\n"
                "     --no-legend                  Do not show the headers\n"
+               "  -l --full                       Do not ellipsize output\n"
                "     --no-ask-password            Do not prompt for password\n"
                "  -q --quiet                      Suppress information messages during runtime\n"
                "     --user                       Run as user unit\n"
@@ -150,6 +152,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "no-block",           no_argument,       NULL, ARG_NO_BLOCK           },
                 { "no-pager",           no_argument,       NULL, ARG_NO_PAGER           },
                 { "no-legend",          no_argument,       NULL, ARG_NO_LEGEND          },
+                { "full",               no_argument,       NULL, 'l'                    },
                 { "no-ask-password",    no_argument,       NULL, ARG_NO_ASK_PASSWORD    },
                 { "quiet",              no_argument,       NULL, 'q'                    },
                 { "user",               no_argument,       NULL, ARG_USER               },
@@ -182,7 +185,7 @@ static int parse_argv(int argc, char *argv[]) {
         if (strstr(program_invocation_short_name, "systemd-umount"))
                         arg_action = ACTION_UMOUNT;
 
-        while ((c = getopt_long(argc, argv, "hqH:M:t:o:p:AuG", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "hqH:M:t:o:p:AuGl", options, NULL)) >= 0)
 
                 switch (c) {
 
@@ -204,6 +207,10 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_legend = false;
                         break;
 
+                case 'l':
+                        arg_full = true;
+                        break;
+
                 case ARG_NO_ASK_PASSWORD:
                         arg_ask_password = false;
                         break;
@@ -1393,6 +1400,9 @@ static int list_devices(void) {
         if (!table)
                 return log_oom();
 
+        if (arg_full)
+                table_set_width(table, 0);
+
         r = table_set_sort(table, 0, SIZE_MAX);
         if (r < 0)
                 return log_error_errno(r, "Failed to set sort index: %m");