btrbk: consistently use "subvolume" (instead of "subvol") for table headings

pull/299/head
Axel Burri 2019-09-08 16:29:05 +02:00
parent 5e87e8248b
commit 8551a9f52a
1 changed files with 17 additions and 16 deletions

33
btrbk
View File

@ -181,26 +181,26 @@ my %table_formats = (
long => [ qw( volume_host volume_port volume_path ) ], long => [ qw( volume_host volume_port volume_path ) ],
raw => [ qw( volume_url volume_host volume_port volume_path volume_rsh ) ], raw => [ qw( volume_url volume_host volume_port volume_path volume_rsh ) ],
}, },
list_source => { table => [ qw( -source_host -source_port source_subvol snapshot_path snapshot_name ) ], list_source => { table => [ qw( -source_host -source_port source_subvolume snapshot_path snapshot_name ) ],
long => [ qw( source_host source_port source_subvol snapshot_path snapshot_name ) ], long => [ qw( source_host source_port source_subvolume snapshot_path snapshot_name ) ],
raw => [ qw( source_url source_host source_port source_path snapshot_path snapshot_name source_rsh ) ], raw => [ qw( source_url source_host source_port source_path snapshot_path snapshot_name source_rsh ) ],
}, },
list_target => { table => [ qw( -target_host -target_port target_path ) ], list_target => { table => [ qw( -target_host -target_port target_path ) ],
long => [ qw( target_host target_port target_path ) ], long => [ qw( target_host target_port target_path ) ],
raw => [ qw( target_url target_host target_port target_path target_rsh ) ], raw => [ qw( target_url target_host target_port target_path target_rsh ) ],
}, },
list => { table => [ qw( -source_host -source_port source_subvol snapshot_path snapshot_name -target_host -target_port target_path ) ], list => { table => [ qw( -source_host -source_port source_subvolume snapshot_path snapshot_name -target_host -target_port target_path ) ],
long => [ qw( source_host source_port source_subvol snapshot_path snapshot_name snapshot_preserve target_host target_port target_path target_preserve ) ], long => [ qw( source_host source_port source_subvolume snapshot_path snapshot_name snapshot_preserve target_host target_port target_path target_preserve ) ],
raw => [ qw( source_url source_host source_port source_subvol snapshot_path snapshot_name snapshot_preserve target_url target_host target_port target_path target_preserve source_rsh target_rsh ) ], raw => [ qw( source_url source_host source_port source_subvolume snapshot_path snapshot_name snapshot_preserve target_url target_host target_port target_path target_preserve source_rsh target_rsh ) ],
}, },
resolved => { table => [ qw( -source_host -source_port source_subvol snapshot_subvol status -target_host -target_port target_subvol ) ], resolved => { table => [ qw( -source_host -source_port source_subvolume snapshot_subvolume status -target_host -target_port target_subvolume ) ],
long => [ qw( type source_host source_port source_subvol snapshot_subvol status target_host target_port target_subvol target_type ) ], long => [ qw( type source_host source_port source_subvolume snapshot_subvolume status target_host target_port target_subvolume target_type ) ],
raw => [ qw( type source_host source_port source_path snapshot_path snapshot_name status target_host target_port target_path target_type source_rsh target_rsh ) ], raw => [ qw( type source_host source_port source_path snapshot_path snapshot_name status target_host target_port target_path target_type source_rsh target_rsh ) ],
}, },
schedule => { table => [ qw( action -host -port subvol scheme reason ) ], schedule => { table => [ qw( action -host -port subvolume scheme reason ) ],
long => [ qw( action host port root_path subvol_path scheme reason ) ], long => [ qw( action host port root_path subvolume_path scheme reason ) ],
raw => [ qw( topic action url host port path hod dow min h d w m y) ], raw => [ qw( topic action url host port path hod dow min h d w m y) ],
}, },
@ -210,8 +210,8 @@ my %table_formats = (
RALIGN => { size=>1, used=>1, device_size=>1, device_allocated=>1, device_unallocated=>1, device_missing=>1, device_used=>1, free=>1, free_min=>1, data_ratio=>1, metadata_ratio=>1, global_reserve=>1, global_reserve_used=>1 }, RALIGN => { size=>1, used=>1, device_size=>1, device_allocated=>1, device_unallocated=>1, device_missing=>1, device_used=>1, free=>1, free_min=>1, data_ratio=>1, metadata_ratio=>1, global_reserve=>1, global_reserve_used=>1 },
}, },
transaction => { table => [ qw( type status -target_host -target_port target_subvol -source_host -source_port source_subvol parent_subvol ) ], transaction => { table => [ qw( type status -target_host -target_port target_subvolume -source_host -source_port source_subvolume parent_subvolume ) ],
long => [ qw( localtime type status duration target_host target_port target_subvol source_host source_port source_subvol parent_subvol message ) ], long => [ qw( localtime type status duration target_host target_port target_subvolume source_host source_port source_subvolume parent_subvolume message ) ],
tlog => [ qw( localtime type status target_url source_url parent_url message ) ], tlog => [ qw( localtime type status target_url source_url parent_url message ) ],
syslog => [ qw( type status target_url source_url parent_url message ) ], syslog => [ qw( type status target_url source_url parent_url message ) ],
raw => [ qw( time localtime type status duration target_url source_url parent_url message ) ], raw => [ qw( time localtime type status duration target_url source_url parent_url message ) ],
@ -224,8 +224,8 @@ my %table_formats = (
fs_list => { table => [ qw( mount_point id flags path ) ], fs_list => { table => [ qw( mount_point id flags path ) ],
rel => [ qw( mount_source mount_point path subvolume_path subvolume_rel_path ) ], rel => [ qw( mount_source mount_point path subvolume_path subvolume_rel_path ) ],
long => [ qw( mount_source mount_subvol mount_point id top_level cgen gen uuid parent_uuid received_uuid flags path ) ], long => [ qw( mount_source mount_subvolume mount_point id top_level cgen gen uuid parent_uuid received_uuid flags path ) ],
raw => [ qw( mount_source mount_subvol mount_point mount_subvolid id top_level cgen gen uuid parent_uuid received_uuid readonly path subvolume_path ) ], raw => [ qw( mount_source mount_subvolume mount_point mount_subvolid id top_level cgen gen uuid parent_uuid received_uuid readonly path subvolume_path subvolume_rel_path ) ],
}, },
); );
@ -2924,10 +2924,11 @@ sub vinfo_prefixed_keys($$)
$ret{$prefix} = $vinfo->{PRINT}; $ret{$prefix} = $vinfo->{PRINT};
$prefix .= '_'; $prefix .= '_';
} }
foreach (qw( URL PATH HOST PORT NAME SUBVOL_PATH )) { foreach (qw( URL PATH HOST PORT NAME )) {
$ret{$prefix . lc($_)} = $vinfo->{$_}; $ret{$prefix . lc($_)} = $vinfo->{$_};
} }
$ret{$prefix . "subvol"} = $vinfo->{PATH}; $ret{$prefix . "subvolume"} = $vinfo->{PATH};
$ret{$prefix . "subvolume_path"} = $vinfo->{SUBVOL_PATH};
my $rsh = vinfo_rsh($vinfo); my $rsh = vinfo_rsh($vinfo);
$ret{$prefix . "rsh"} = ($rsh ? join(" ", @$rsh) : undef), $ret{$prefix . "rsh"} = ($rsh ? join(" ", @$rsh) : undef),
return %ret; return %ret;
@ -5331,7 +5332,7 @@ MAIN:
mount_point => $svol->{VINFO_MOUNTPOINT}{PATH}, mount_point => $svol->{VINFO_MOUNTPOINT}{PATH},
mount_source => $svol->{node}{TREE_ROOT}{host_mount_source}, mount_source => $svol->{node}{TREE_ROOT}{host_mount_source},
mount_subvolid => $mnt->{MNTOPS}{subvolid}, mount_subvolid => $mnt->{MNTOPS}{subvolid},
mount_subvol => $mnt->{MNTOPS}{subvol}, mount_subvolume => $mnt->{MNTOPS}{subvol},
subvolume_path => $svol->{node}{path}, subvolume_path => $svol->{node}{path},
subvolume_rel_path => $svol->{node}{REL_PATH}, subvolume_rel_path => $svol->{node}{REL_PATH},
path => $svol->{PATH}, path => $svol->{PATH},