]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
various: don't log synthetic EIO for fwrite
authorMike Yuan <me@yhndnzj.com>
Thu, 7 Dec 2023 16:49:17 +0000 (00:49 +0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Dec 2023 01:49:08 +0000 (10:49 +0900)
Follow-up for f9568765d4d3d57de1ec01d85f0a0682920f4d10

src/creds/creds.c
src/shared/edit-util.c

index 7a98a5dcd34e1f5fdce2dcec31e6f3b02a90d829..10d117118fbca592f2ba761ed85462c108142da7 100644 (file)
@@ -350,7 +350,7 @@ static int write_blob(FILE *f, const void *data, size_t size) {
         }
 
         if (fwrite(data, 1, size, f) != size)
-                return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to write credential data: %m");
+                return log_error_errno(SYNTHETIC_ERRNO(EIO), "Failed to write credential data.");
 
         r = print_newline(f, data, size);
         if (r < 0)
index 2662b2bf1b39484bbdcb56484ab426a6b07f120b..fb9bdbc1601ab42daf601207f7a328ca9325440d 100644 (file)
@@ -206,7 +206,7 @@ static int create_edit_temp_file(EditFile *e, const char *contents, size_t conte
         if (e->context->stdin) {
                 if (fwrite(contents, 1, contents_size, f) != contents_size)
                         return log_error_errno(SYNTHETIC_ERRNO(EIO),
-                                               "Failed to copy input to temporary file '%s': %m", temp);
+                                               "Failed to copy input to temporary file '%s'.", temp);
         } else {
                 r = populate_edit_temp_file(e, f, temp);
                 if (r < 0)