From 7ed79f2b3b1a87fd907b3961f1103ec04ee11b00 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 18 Aug 2023 01:42:20 +0200 Subject: [PATCH] btrfs-progs: use escaped format for subvolume path strings in json Signed-off-by: David Sterba --- cmds/subvolume.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmds/subvolume.c b/cmds/subvolume.c index 754f7759..57029178 100644 --- a/cmds/subvolume.c +++ b/cmds/subvolume.c @@ -47,7 +47,7 @@ const struct rowspec btrfs_subvolume_rowspec[] = { { .key = "ID", .fmt = "%llu", .out_json = "id" }, - { .key = "name", .fmt = "%s", .out_json = "name" }, + { .key = "name", .fmt = "str", .out_json = "name" }, { .key = "gen", .fmt = "%llu", .out_json = "generation" }, { .key = "cgen", .fmt = "%llu", .out_json = "cgeneration" }, { .key = "parent", .fmt = "%llu", .out_json = "parent" }, @@ -56,13 +56,13 @@ const struct rowspec btrfs_subvolume_rowspec[] = { { .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 = "path", .fmt = "str", .out_json = "path" }, { .key = "flag-list-item", .fmt = "%s" }, { .key = "stransid", .fmt = "%llu", .out_json = "stransid" }, { .key = "stime", .fmt = "date-time", .out_json = "stime" }, { .key = "rtransid", .fmt = "%llu", .out_json = "rtransid" }, { .key = "rtime", .fmt = "date-time", .out_json = "rtime" }, - { .key = "snapshot-list-item", .fmt = "%s" }, + { .key = "snapshot-list-item", .fmt = "str" }, { .key = "quota-qgroup", .fmt = "qgroupid", .out_json = "qgroupid" }, { .key = "quota-ref", .fmt = "%llu", .out_json = "referenced" }, { .key = "quota-excl", .fmt = "%llu", .out_json = "exclusive" },