btrfs-progs: send-stream: document return values of some functions
authorDavid Sterba <dsterba@suse.com>
Tue, 15 Nov 2016 14:09:08 +0000 (15:09 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 23 Nov 2016 09:50:16 +0000 (10:50 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
send-stream.c

index 913a17f..d2de9d3 100644 (file)
@@ -37,6 +37,13 @@ struct btrfs_send_stream {
        void *user;
 };
 
+/*
+ * Read len bytes to buf.
+ * Return:
+ *   0 - success
+ * < 0 - negative errno in case of error
+ * > 0 - no data read, EOF
+ */
 static int read_buf(struct btrfs_send_stream *sctx, char *buf, size_t len)
 {
        int ret;
@@ -68,6 +75,10 @@ out:
 /*
  * Reads a single command from kernel space and decodes the TLV's into
  * sctx->cmd_attrs
+ *
+ * Returns:
+ *   0 - success
+ * < 0 - an error in the command
  */
 static int read_cmd(struct btrfs_send_stream *sctx)
 {