Index: uspace/lib/c/generic/capa.c
===================================================================
--- uspace/lib/c/generic/capa.c	(revision c111da2e5d8d220f8936c4d80df74d461f2e0866)
+++ uspace/lib/c/generic/capa.c	(revision cfd04c4747e6065a3d8116877b13a2bc1307950f)
@@ -199,4 +199,10 @@
 }
 
+/** Format capacity as string into a newly allocated buffer.
+ *
+ * @param capa Capacity
+ * @param rstr Place to store pointer to newly allocated string
+ * @return EOK on success or an error code
+ */
 errno_t capa_format(capa_spec_t *capa, char **rstr)
 {
@@ -233,4 +239,11 @@
 }
 
+/** Format capacity as string into an existing buffer.
+ *
+ * @param capa Capacity
+ * @param buf Buffer for storing string
+ * @param bufsize Size of buffer in bytes
+ * @return EOK on success or an error code
+ */
 errno_t capa_format_buf(capa_spec_t *capa, char *buf, size_t bufsize)
 {
@@ -263,4 +276,14 @@
 }
 
+/** Format capacity of n blocks as string into a newly allocated buffer.
+ *
+ * This computes the total capacity of the blocks, simplifies it
+ * and formats it as string.
+ *
+ * @param nblocks Number of blocks
+ * @param block_size Size of each block in bytes
+ * @param rstr Place to store pointer to newly allocated string
+ * @return EOK on success or an error code
+ */
 errno_t capa_blocks_format(uint64_t nblocks, size_t block_size,
     char **rptr)
@@ -273,6 +296,20 @@
 }
 
+/** Format capacity of n blocks as string into an existing buffer.
+ *
+ * This computes the total capacity of the blocks, simplifies it
+ * and formats it as string.
+ *
+ * This function does not return error. If the buffer is too small,
+ * the string will be truncated. To make sure it is not truncated,
+ * bufsize should be at least CAPA_BLOCKS_BUFSIZE.
+ *
+ * @param nblocks Number of blocks
+ * @param block_size Size of each block in bytes
+ * @param buf Buffer for storing string
+ * @param bufsize Size of buffer in bytes
+ */
 void capa_blocks_format_buf(uint64_t nblocks, size_t block_size,
-    char *buf, size_t bsize)
+    char *buf, size_t bufsize)
 {
 	capa_spec_t capa;
@@ -283,5 +320,5 @@
 
 	/* Should not get range error because of nblocks * block_size limits */
-	rc = capa_format_buf(&capa, buf, bsize);
+	rc = capa_format_buf(&capa, buf, bufsize);
 	assert(rc == EOK);
 	(void)rc;
@@ -328,4 +365,10 @@
 }
 
+/** Parse string as capacity specification.
+ *
+ * @param str String (e.g. "100 kB")
+ * @param capa Place to store capacity
+ * @return EOK on success or an error code
+ */
 errno_t capa_parse(const char *str, capa_spec_t *capa)
 {
