Skip to content

Commit 21e084d

Browse files
osandovmaharmstone
authored andcommitted
btrfs-progs: subvol list: remove unused raw layout code
It hasn't been used since commit 9005b60 ("btrfs-progs: use libbtrfsutil for subvol show"). Signed-off-by: Omar Sandoval <[email protected]>
1 parent ef6f0a1 commit 21e084d

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

cmds/subvolume-list.c

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ static const char * const cmd_subvolume_list_usage[] = {
9898
enum btrfs_list_layout {
9999
BTRFS_LIST_LAYOUT_DEFAULT = 0,
100100
BTRFS_LIST_LAYOUT_TABLE,
101-
BTRFS_LIST_LAYOUT_RAW,
102101
BTRFS_LIST_LAYOUT_JSON
103102
};
104103

@@ -1202,23 +1201,6 @@ static void print_subvolume_column(struct root_info *subv,
12021201
}
12031202
}
12041203

1205-
static void print_one_subvol_info_raw(struct root_info *subv,
1206-
const char *raw_prefix)
1207-
{
1208-
int i;
1209-
1210-
for (i = 0; i < BTRFS_LIST_ALL; i++) {
1211-
if (!btrfs_list_columns[i].need_print)
1212-
continue;
1213-
1214-
if (raw_prefix)
1215-
pr_verbose(LOG_DEFAULT, "%s",raw_prefix);
1216-
1217-
print_subvolume_column(subv, i);
1218-
}
1219-
pr_verbose(LOG_DEFAULT, "\n");
1220-
}
1221-
12221204
static void print_one_subvol_info_table(struct root_info *subv)
12231205
{
12241206
int i;
@@ -1349,7 +1331,7 @@ static void print_one_subvol_info_json(struct format_ctx *fctx,
13491331

13501332

13511333
static void print_all_subvol_info(struct rb_root *sorted_tree,
1352-
enum btrfs_list_layout layout, const char *raw_prefix)
1334+
enum btrfs_list_layout layout)
13531335
{
13541336
struct rb_node *n;
13551337
struct root_info *entry;
@@ -1377,9 +1359,6 @@ static void print_all_subvol_info(struct rb_root *sorted_tree,
13771359
case BTRFS_LIST_LAYOUT_TABLE:
13781360
print_one_subvol_info_table(entry);
13791361
break;
1380-
case BTRFS_LIST_LAYOUT_RAW:
1381-
print_one_subvol_info_raw(entry, raw_prefix);
1382-
break;
13831362
case BTRFS_LIST_LAYOUT_JSON:
13841363
print_one_subvol_info_json(&fctx, entry);
13851364
break;
@@ -1425,8 +1404,7 @@ static int btrfs_list_subvols(int fd, struct rb_root *root_lookup)
14251404

14261405
static int btrfs_list_subvols_print(int fd, struct btrfs_list_filter_set *filter_set,
14271406
struct btrfs_list_comparer_set *comp_set,
1428-
enum btrfs_list_layout layout, int full_path,
1429-
const char *raw_prefix)
1407+
enum btrfs_list_layout layout, int full_path)
14301408
{
14311409
struct rb_root root_lookup;
14321410
struct rb_root root_sort;
@@ -1448,7 +1426,7 @@ static int btrfs_list_subvols_print(int fd, struct btrfs_list_filter_set *filter
14481426
filter_and_sort_subvol(&root_lookup, &root_sort, filter_set,
14491427
comp_set, top_id);
14501428

1451-
print_all_subvol_info(&root_sort, layout, raw_prefix);
1429+
print_all_subvol_info(&root_sort, layout);
14521430
rb_free_nodes(&root_lookup, free_root_info);
14531431

14541432
return 0;
@@ -1726,7 +1704,7 @@ static int cmd_subvolume_list(const struct cmd_struct *cmd, int argc, char **arg
17261704
layout = BTRFS_LIST_LAYOUT_JSON;
17271705

17281706
ret = btrfs_list_subvols_print(fd, filter_set, comparer_set,
1729-
layout, !is_list_all && !is_only_in_path, NULL);
1707+
layout, !is_list_all && !is_only_in_path);
17301708

17311709
out:
17321710
close(fd);

0 commit comments

Comments
 (0)