Implement info command for SysV IPC mqs

The `list` command was refactored a little bit as well and the man
page and readme were updated.
This commit is contained in:
finga 2021-07-08 17:44:46 +02:00
parent 4c82d41f8e
commit 9666e0788d
7 changed files with 113 additions and 16 deletions

View file

@ -11,9 +11,7 @@ pub struct List {}
impl List {
pub fn run(&self) -> Result<()> {
let file = BufReader::new(File::open("/proc/sysvipc/msg")?);
for line in file.lines() {
for line in BufReader::new(File::open("/proc/sysvipc/msg")?).lines() {
for field in line?.split_whitespace().collect::<Vec<&str>>() {
print!("{0: <10}", field);
}