Skip to content

Commit

Permalink
fix disk not found for BTRFS filesystems
Browse files Browse the repository at this point in the history
Fix #11
  • Loading branch information
Canop committed Jun 30, 2021
1 parent ab8403e commit eb407eb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<a name="v0.7.3"></a>
### v0.7.3 - 2021/06/30
* fix disk not found for BTRFS filesystems - Fix #11

<a name="v0.7.2"></a>
### v0.7.2 - 2021/06/29
* use termimad 0.13 for better support of narrow terminals and wide chars
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lfs"
version = "0.7.2"
version = "0.7.3"
authors = ["dystroy <denys.seguret@gmail.com>"]
edition = "2018"
keywords = ["linux", "filesystem", "fs"]
Expand All @@ -14,7 +14,7 @@ readme = "README.md"
argh = "0.1.3"
crossterm = "0.20.0"
file-size = "1.0.3"
lfs-core = "0.3.4"
lfs-core = "0.4.0"
minimad = "0.8.0"
serde ="1.0"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A linux utility listing your filesystems.

![screenshot](doc/screenshot.png)

Besides traditional columns, the `dsk` column helps you identify your "disk":
Besides traditional columns, the `disk` column helps you identify your "disk":

* `remov` : a removable device (such as an USB key)
* `HDD` : a rotational disk
Expand Down
Binary file modified doc/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/fmt_mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ static BAR_WIDTH: usize = 5;

static MD: &str = r#"
|-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:
|id|dev|filesystem|dsk|type|used|use%|avail|size|mount point
|id|dev|filesystem|disk|type|used|use%|avail|size|mount point
|-:|:-|:-|:-:|:-:|-:|-:|-:|:-
${mount-points
|${id}|${dev-major}:${dev-minor}|${fs}|${dsk}|${fs-type}|`${used}`|`${use-percents}` ~~${bar}~~|*${available}*|**${size}**|${mount-point}
|${id}|${dev-major}:${dev-minor}|${fs}|${disk}|${fs-type}|`${used}`|`${use-percents}` ~~${bar}~~|*${available}*|**${size}**|${mount-point}
}
|-:
"#;
Expand All @@ -35,7 +35,7 @@ pub fn print(mounts: &[Mount]) -> Result<()> {
.set("dev-major", format!("{}", mount.info.dev.major))
.set("dev-minor", format!("{}", mount.info.dev.minor))
.set("fs", &mount.info.fs)
.set("dsk", mount.disk.as_ref().map_or("", |d| d.disk_type()))
.set("disk", mount.disk.as_ref().map_or("", |d| d.disk_type()))
.set("fs-type", &mount.info.fs_type)
.set("mount-point", mount.info.mount_point.to_string_lossy());
if let Some(stats) = mount.stats.as_ref().filter(|s| s.size() > 0) {
Expand Down

0 comments on commit eb407eb

Please sign in to comment.