]> sourceware.org Git - lvm2.git/commitdiff
debug: drop FD from error message
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 2 Oct 2020 09:10:44 +0000 (11:10 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 2 Oct 2020 19:04:16 +0000 (21:04 +0200)
Since now the error path already has device close and set -1,
there is not much in printing this info - actually shouldn't be
there at all..

lib/format_text/format-text.c

index e44871226d22de9d481fbb1eabda49d518d79a90..0de881b677af5426b31f465b619e86a2187dae74 100644 (file)
@@ -277,7 +277,7 @@ static int _raw_write_mda_header(const struct format_type *fmt,
        dev_set_last_byte(dev, start_byte + MDA_HEADER_SIZE);
 
        if (!dev_write_bytes(dev, start_byte, MDA_HEADER_SIZE, mdah)) {
-               log_error("Failed to write mda header to %s fd %d", dev_name(dev), dev->bcache_fd);
+               log_error("Failed to write mda header to %s.", dev_name(dev));
                return 0;
        }
        dev_unset_last_byte(dev);
@@ -972,7 +972,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
                           (unsigned long long)write2_size);
 
        if (!dev_write_bytes(mdac->area.dev, write1_start, (size_t)write1_size, write_buf)) {
-               log_error("Failed to write metadata to %s fd %d", devname, mdac->area.dev->bcache_fd);
+               log_error("Failed to write metadata to %s.", devname);
                goto out;
        }
 
@@ -984,7 +984,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
 
                if (!dev_write_bytes(mdac->area.dev, write2_start, write2_size,
                                     write_buf + new_size - new_wrap)) {
-                       log_error("Failed to write metadata wrap to %s fd %d", devname, mdac->area.dev->bcache_fd);
+                       log_error("Failed to write metadata wrap to %s", devname);
                        goto out;
                }
        }
This page took 0.041348 seconds and 5 git commands to generate.