]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fs-posix: Log lseek() error with fs_set_error()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 25 Nov 2019 11:19:00 +0000 (13:19 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 11 Dec 2019 10:12:30 +0000 (10:12 +0000)
Makes it consistent with logging the read() error.

src/lib-fs/fs-posix.c

index fb5967168f74681dc2dead8914516cfbfbaecdd2..f9437f3b7c0989f26558ee9150e55bde031f4b69 100644 (file)
@@ -432,8 +432,8 @@ static ssize_t fs_posix_read(struct fs_file *_file, void *buf, size_t size)
        if (file->seek_to_beginning) {
                file->seek_to_beginning = FALSE;
                if (lseek(file->fd, 0, SEEK_SET) < 0) {
-                       fs_set_critical(_file->fs, "lseek(%s, 0) failed: %m",
-                                       file->full_path);
+                       fs_set_error(_file->fs, "lseek(%s, 0) failed: %m",
+                                    file->full_path);
                        return -1;
                }
        }