btrfs-progs: typo review of strings and comments
[platform/upstream/btrfs-progs.git] / cmds-send.c
index bbe16d8..07070ad 100644 (file)
@@ -474,7 +474,7 @@ int cmd_send(int argc, char **argv)
 
                        ret = add_clone_source(&send, root_id);
                        if (ret < 0) {
-                               error("not enough memory");
+                               error("cannot add clone source: %s", strerror(-ret));
                                goto out;
                        }
                        subvol_uuid_search_finit(&send.sus);
@@ -579,7 +579,7 @@ int cmd_send(int argc, char **argv)
 
                ret = add_clone_source(&send, parent_root_id);
                if (ret < 0) {
-                       error("not enough memory");
+                       error("cannot add clone source: %s", strerror(-ret));
                        goto out;
                }
        }
@@ -617,7 +617,7 @@ int cmd_send(int argc, char **argv)
                        goto out;
                if (!ret) {
                        ret = -EINVAL;
-                       error("subvolum %s is not read-only", subvol);
+                       error("subvolume %s is not read-only", subvol);
                        goto out;
                }
        }
@@ -673,15 +673,16 @@ int cmd_send(int argc, char **argv)
                if (ret < 0)
                        goto out;
 
-               /* done with this subvol, so add it to the clone sources */
-               ret = add_clone_source(&send, root_id);
-               if (ret < 0) {
-                       error("not enough memory");
-                       goto out;
+               if (!full_send) {
+                       /* done with this subvol, so add it to the clone sources */
+                       ret = add_clone_source(&send, root_id);
+                       if (ret < 0) {
+                               error("cannot add clone source: %s", strerror(-ret));
+                               goto out;
+                       }
                }
 
                parent_root_id = 0;
-               full_send = 0;
        }
 
        ret = 0;