From 70ae158ec84d39a1672f062376daf8b2d7696177 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 18 Aug 2023 01:39:32 +0200 Subject: [PATCH] btrfs-progs: rename time-long format name to date-time Make the timestamp format more descriptive what is actually printed. We may need separate date or time in the future. Signed-off-by: David Sterba --- cmds/subvolume.c | 6 +++--- common/format-output.c | 2 +- common/format-output.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmds/subvolume.c b/cmds/subvolume.c index 52789add..754f7759 100644 --- a/cmds/subvolume.c +++ b/cmds/subvolume.c @@ -52,16 +52,16 @@ const struct rowspec btrfs_subvolume_rowspec[] = { { .key = "cgen", .fmt = "%llu", .out_json = "cgeneration" }, { .key = "parent", .fmt = "%llu", .out_json = "parent" }, { .key = "top level", .fmt = "%llu", .out_json = "top_level" }, - { .key = "otime", .fmt = "time-long", .out_json = "otime" }, + { .key = "otime", .fmt = "date-time", .out_json = "otime" }, { .key = "parent_uuid", .fmt = "uuid", .out_json = "parent_uuid" }, { .key = "received_uuid", .fmt = "uuid", .out_json = "received_uuid" }, { .key = "uuid", .fmt = "uuid", .out_json = "uuid" }, { .key = "path", .fmt = "%s", .out_json = "path" }, { .key = "flag-list-item", .fmt = "%s" }, { .key = "stransid", .fmt = "%llu", .out_json = "stransid" }, - { .key = "stime", .fmt = "time-long", .out_json = "stime" }, + { .key = "stime", .fmt = "date-time", .out_json = "stime" }, { .key = "rtransid", .fmt = "%llu", .out_json = "rtransid" }, - { .key = "rtime", .fmt = "time-long", .out_json = "rtime" }, + { .key = "rtime", .fmt = "date-time", .out_json = "rtime" }, { .key = "snapshot-list-item", .fmt = "%s" }, { .key = "quota-qgroup", .fmt = "qgroupid", .out_json = "qgroupid" }, { .key = "quota-ref", .fmt = "%llu", .out_json = "referenced" }, diff --git a/common/format-output.c b/common/format-output.c index 6572f405..a2b3edc1 100644 --- a/common/format-output.c +++ b/common/format-output.c @@ -350,7 +350,7 @@ void fmt_print(struct format_ctx *fctx, const char* key, ...) const u8 *uuid = va_arg(args, const u8*); print_uuid(uuid); - } else if (strcmp(row->fmt, "time-long") == 0) { + } else if (strcmp(row->fmt, "date-time") == 0) { const time_t ts = va_arg(args, time_t); if (ts) { diff --git a/common/format-output.h b/common/format-output.h index 33e8c2bc..7bbbae16 100644 --- a/common/format-output.h +++ b/common/format-output.h @@ -33,7 +33,7 @@ struct rowspec { * (values: const char *) * - uuid: format UUID as text * (value: u8 *uuid) - * - time-long: pretty print timestamp, including timezone + * - date-time: pretty print timestamp, date, time and timezone * (values: time_t) * - list: print list opening bracket [ * (values printed separately)