Skip to content

Commit 02187bc

Browse files
Add to README the names of the newer functions implemented. Fixes #18
1 parent 039dfd0 commit 02187bc

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,16 @@ Run "cargo doc" and then open "./target/doc/libproc/index.html".
2323
More documentation will be added over time.
2424

2525
# API
26-
At the moment these methods are implemented:
26+
At the moment these methods have been implemented:
27+
28+
## Process / PID related
2729
```
2830
pub fn listpids(proc_types: ProcType) -> Result<Vec<u32>, String>
2931
```
3032
```
33+
pub fn pidinfo<T: PIDInfo>(pid : i32, arg: u64) -> Result<T, String> {
34+
```
35+
```
3136
pub fn regionfilename(pid: i32, address: u64) -> Result<String, String>
3237
```
3338
```
@@ -39,7 +44,21 @@ pub fn libversion() -> Result<(i32, i32), String>
3944
```
4045
pub fn name(pid: i32) -> Result<String, String>
4146
```
47+
```
48+
pub fn listpidinfo<T: ListPIDInfo>(pid : i32, max_len: usize) -> Result<Vec<T::Item>, String>
49+
```
50+
51+
## File and FileDescriptor related
52+
```
53+
pub fn pidfdinfo<T: PIDFDInfo>(pid : i32, fd: i32) -> Result<T, String>
54+
```
55+
56+
## PID Resource Usage related
57+
```
58+
pub fn pidrusage<T: PIDRUsage>(pid : i32) -> Result<T, String>
59+
```
4260

61+
## kmsgbuf
4362
I have also implemented this method - but the MAGIC_NUMBER returned is not correct,
4463
and upon investigation it seems that Apple/Darwin/Mach have changed totally how dmessage works in
4564
latest versions, moving away from using libproc to use kvm - with a total rewrite of dmesg.
@@ -59,10 +78,14 @@ pub fn kmsgbuf() -> Result<String, String>
5978
Initially just for Mac OS X.
6079

6180
# TODO
81+
See the [list of issues](https://github.com/andrewdavidmackenzie/libproc-rs/issues).
82+
I put the "help wanted" label where I need help from others.
83+
6284
- Complete the API on Mac OS X - figuring out all the Mac OS X / Darwin version mess....
6385
- Add more documentation (including samples with documentation test)
6486
- Add own custom error type and implement From::from to ease reporting of multiple error types in clients
65-
- Once the API is complete then doing a Linux version with the same API would make sense.
87+
- Once the API is complete then doing a Linux version with the same API would make sense,
88+
starting with simpler or more similar methods, and then abstratcion over apple/unix/linux would be needed
6689

6790
# LICENSE
6891
This code is licensed under MIT license (see LICENCE).

src/libproc/pid_rusage.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ extern {
4343
/// }
4444
/// }
4545
/// ```
46-
///
4746
pub fn pidrusage<T: PIDRUsage>(pid : i32) -> Result<T, String> {
4847
let flavor = T::flavor() as i32;
4948
let mut pidrusage = T::default();

0 commit comments

Comments
 (0)