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:
parent
4c82d41f8e
commit
9666e0788d
7 changed files with 113 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue