mirror of https://github.com/dswd/zvault
Diplaying xattrs (re #1)
This commit is contained in:
parent
f7899bb9f3
commit
3cb21cb59e
|
@ -11,6 +11,7 @@ use std::collections::HashMap;
|
||||||
use std::io::{BufReader, BufRead};
|
use std::io::{BufReader, BufRead};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
use std::str;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use self::args::Arguments;
|
use self::args::Arguments;
|
||||||
|
@ -175,6 +176,16 @@ fn print_inode(inode: &Inode) {
|
||||||
println!(" - {}", name);
|
println!(" - {}", name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !inode.xattrs.is_empty() {
|
||||||
|
println!("Extended attributes:");
|
||||||
|
for (key, value) in &inode.xattrs {
|
||||||
|
if let Ok(value) = str::from_utf8(value) {
|
||||||
|
println!(" - {} = '{}'", key, value);
|
||||||
|
} else {
|
||||||
|
println!(" - {} = 0x{}", key, to_hex(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_backups(backup_map: &HashMap<String, Backup>) {
|
fn print_backups(backup_map: &HashMap<String, Backup>) {
|
||||||
|
|
Loading…
Reference in New Issue