From 6c0f9e53f331b719e0e5e04793dbe645936af2b5 Mon Sep 17 00:00:00 2001 From: Avril Date: Mon, 28 Dec 2020 18:52:35 +0000 Subject: [PATCH] open: optimise truncate --- src/main.rs | 1 + src/map.rs | 1 + src/open.rs | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 2231a76..1246355 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,6 +47,7 @@ fn work(arg::Operation{output, inputs}: arg::Operation) -> Result<(), Box write!(f, "Failed to open file: {}", io), Self::Allocate(errno) => write!(f, "fallocate() failed with error {}: {}", errno, errno_str(*errno)), Self::Map(io) => write!(f, "mmap() failed: {}", io), - Self::Size{expected, got} => write!(f, "mapped file size mismatch: expected {}, got {}", expected, got), + Self::Size{expected, got} => write!(f, "mapped file size mismatch: expected at least {}, got {}", expected, got), } } }