Skip to content

Commit 03ba6ea

Browse files
wongnelsonlauralt
authored andcommitted
vhost: correct 'trucate' to 'truncate'
There are several typos when using "truncate" on some messages and on the error type \`FileTruncateError\`. Signed-off-by: Nelson Wong <[email protected]>
1 parent 9a744c2 commit 03ba6ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vhost/src/vhost_user/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub enum Error {
9696
/// memfd file creation error
9797
MemFdCreateError,
9898
/// File truncate error
99-
FileTrucateError,
99+
FileTruncateError,
100100
/// memfd file seal errors
101101
MemFdSealError,
102102
}
@@ -126,8 +126,8 @@ impl std::fmt::Display for Error {
126126
Error::MemFdCreateError => {
127127
write!(f, "handler failed to allocate memfd during get_inflight_fd")
128128
}
129-
Error::FileTrucateError => {
130-
write!(f, "handler failed to trucate memfd during get_inflight_fd")
129+
Error::FileTruncateError => {
130+
write!(f, "handler failed to truncate memfd during get_inflight_fd")
131131
}
132132
Error::MemFdSealError => write!(
133133
f,
@@ -161,7 +161,7 @@ impl Error {
161161
Error::SocketError(_) | Error::SocketConnect(_) => false,
162162
Error::FeatureMismatch => false,
163163
Error::ReqHandlerError(_) => false,
164-
Error::MemFdCreateError | Error::FileTrucateError | Error::MemFdSealError => false,
164+
Error::MemFdCreateError | Error::FileTruncateError | Error::MemFdSealError => false,
165165
}
166166
}
167167
}

0 commit comments

Comments
 (0)