[systemd-commits] 2 commits - src/shared src/timedate

Kay Sievers kay at kemper.freedesktop.org
Thu Nov 22 09:48:21 PST 2012


 src/shared/util.h          |    2 +-
 src/timedate/timedatectl.c |    9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 324dfd5c321d71cdf0d861de88d9d573e7c7da06
Author: Kay Sievers <kay at vrfy.org>
Date:   Thu Nov 22 18:47:25 2012 +0100

    timedatectl: shorten output to print single < 80 char line

diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index c96377f..8d8e12c 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -174,10 +174,10 @@ static void print_status_info(StatusInfo *i) {
                 zero(tm);
                 assert_se(strftime(b, sizeof(b), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&tc, &tm)) > 0);
                 char_array_0(b);
-                printf(" Last DST change: %s → %s, DST became %s\n"
+                printf(" Last DST change, DST became %s\n"
                        "                  %s\n"
                        "                  %s\n",
-                       strna(zn), strna(zc), is_dstc ? "active" : "inactive", a, b);
+                       is_dstc ? "active" : "inactive", a, b);
 
                 t = tn - 1;
                 zero(tm);
@@ -187,11 +187,10 @@ static void print_status_info(StatusInfo *i) {
                 zero(tm);
                 assert_se(strftime(b, sizeof(b), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&tn, &tm)) > 0);
                 char_array_0(b);
-                printf(" Next DST change: %s → %s, DST will become %s\n"
-                       "                  the clock will jump %s\n"
+                printf(" Next DST change, DST will become %s, the clock will jump %s\n"
                        "                  %s\n"
                        "                  %s\n",
-                       strna(zc), strna(zn), is_dstn ? "active" : "inactive", jump_str(dn, s, sizeof(s)), a, b);
+                       is_dstn ? "active" : "inactive", jump_str(dn, s, sizeof(s)), a, b);
 
                 free(zc);
                 free(zn);

commit 79263d03926af6e0a7f97bf70afb2cd37bdcf9db
Author: Kay Sievers <kay at vrfy.org>
Date:   Thu Nov 22 18:46:08 2012 +0100

    shared: FORMAT_TIMESTAMP_MAX +1
    
    5 is for weekday+comma+space, but week days in french have 4 digits
    
    https://bugs.freedesktop.org/show_bug.cgi?id=57411

diff --git a/src/shared/util.h b/src/shared/util.h
index a148ebb..5eb272d 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -79,7 +79,7 @@ union dirent_storage {
 #define QUOTES "\"\'"
 #define COMMENTS "#;\n"
 
-#define FORMAT_TIMESTAMP_MAX (5+11+9+4+1)
+#define FORMAT_TIMESTAMP_MAX (6+11+9+4+1)
 #define FORMAT_TIMESTAMP_PRETTY_MAX 256
 #define FORMAT_TIMESPAN_MAX 64
 #define FORMAT_BYTES_MAX 8



More information about the systemd-commits mailing list