diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2019-09-20 08:59:00 -0400 |
---|---|---|
committer | Thanos <tmakatos@gmail.com> | 2019-09-27 15:59:11 +0100 |
commit | 4e2151a06739f4b3a01d834a068baf128ad596ce (patch) | |
tree | b2a9bc04b891f8c89bbcf0863e170de58d3979c1 /lib | |
parent | c228bef24d038498526c6c1aca53376906ff3c4a (diff) | |
download | libvfio-user-4e2151a06739f4b3a01d834a068baf128ad596ce.zip libvfio-user-4e2151a06739f4b3a01d834a068baf128ad596ce.tar.gz libvfio-user-4e2151a06739f4b3a01d834a068baf128ad596ce.tar.bz2 |
add some function documentation
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cap.c | 7 | ||||
-rw-r--r-- | lib/libmuser.c | 7 |
2 files changed, 14 insertions, 0 deletions
@@ -18,6 +18,9 @@ struct caps { int nr_caps; }; +/* + * Tells whether a capability is being accessed. + */ static bool cap_is_accessed(struct cap *caps, int nr_caps, loff_t offset) { @@ -53,6 +56,10 @@ cap_is_accessed(struct cap *caps, int nr_caps, loff_t offset) return true; } +/* + * Returns the PCI capability that is contained withint the specified region + * (offset + count). + */ static struct cap* cap_find(struct cap *caps, int nr_caps, loff_t offset, size_t count) { diff --git a/lib/libmuser.c b/lib/libmuser.c index 140ad9f..b74c4ab 100644 --- a/lib/libmuser.c +++ b/lib/libmuser.c @@ -605,6 +605,10 @@ out: return err; } +/* + * Returns the number of bytes comminicated to the kernel (may be less than + * ret), or a negative number on error. + */ static int post_read(lm_ctx_t * const lm_ctx, struct muser_cmd *const cmd, ssize_t ret) { @@ -709,6 +713,9 @@ do_access(lm_ctx_t * const lm_ctx, char * const buf, size_t count, loff_t pos, } /* + * Returns the number of bytes processed on success or a negative number on + * error. + * * TODO function name same lm_access_t, fix */ ssize_t |