env: add the same prefix to error messages to make it detectable by tests
[oweals/u-boot.git] / cmd / nvedit.c
index 796867c62c4f1ecab099059900c7167969eb4375..87c2a860508ea9ea966638bcd7b309a2445d792e 100644 (file)
@@ -960,7 +960,8 @@ NXTARG:             ;
                                H_MATCH_KEY | H_MATCH_IDENT,
                                &ptr, size, argc, argv);
                if (len < 0) {
-                       pr_err("Cannot export environment: errno = %d\n", errno);
+                       pr_err("## Error: Cannot export environment: errno = %d\n",
+                              errno);
                        return 1;
                }
                sprintf(buf, "%zX", (size_t)len);
@@ -980,7 +981,8 @@ NXTARG:             ;
                        H_MATCH_KEY | H_MATCH_IDENT,
                        &res, ENV_SIZE, argc, argv);
        if (len < 0) {
-               pr_err("Cannot export environment: errno = %d\n", errno);
+               pr_err("## Error: Cannot export environment: errno = %d\n",
+                      errno);
                return 1;
        }
 
@@ -995,7 +997,8 @@ NXTARG:             ;
        return 0;
 
 sep_err:
-       printf("## %s: only one of \"-b\", \"-c\" or \"-t\" allowed\n", cmd);
+       printf("## Error: %s: only one of \"-b\", \"-c\" or \"-t\" allowed\n",
+              cmd);
        return 1;
 }
 #endif
@@ -1115,7 +1118,8 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag,
 
        if (himport_r(&env_htab, ptr, size, sep, del ? 0 : H_NOCLEAR,
                        crlf_is_lf, 0, NULL) == 0) {
-               pr_err("Environment import failed: errno = %d\n", errno);
+               pr_err("## Error: Environment import failed: errno = %d\n",
+                      errno);
                return 1;
        }
        gd->flags |= GD_FLG_ENV_READY;