This commit is contained in:
Kovid Goyal
2023-09-23 11:07:51 +05:30
parent 5fede41205
commit dc43f0d42f

View File

@@ -97,7 +97,7 @@ func truncate_or_unlink(ans *os.File, size uint64) (err error) {
sz := int64(size)
if err = Fallocate_simple(fd, sz); err != nil {
if !errors.Is(err, errors.ErrUnsupported) {
return err
return fmt.Errorf("fallocate() failed on fd from shm_open(%s) with size: %d with error: %w", ans.Name(), size, err)
}
for {
err = unix.Ftruncate(fd, sz)