Skip to content

Conversation

@mmatuska
Copy link
Contributor

Motivation and Context

The compilation on FreeBSD i386 is broken.

Description

Incorrect printf specifier in mmap_seek.c
Missing cast to atomic_add_64

How Has This Been Tested?

Compilation on FreeBSD i386 and amd64

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

tests/zfs-tests/cmd/mmap_seek.c: use correct printf specifier
module/zfs/vdev.c: vdev_clear(): correctly cast argument to atomic_add_64()

Signed-off-by: Martin Matuska <[email protected]>
Comment on lines +58 to 60
fprintf(stderr, "lseek(fd, %jd, SEEK_%s) = %jd (expected %jd)",
offset, (whence == SEEK_DATA ? "DATA" : "HOLE"),
seek_offset, expect_offset);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formally I think %jd is uintmax_t, which might be bigger than off_t.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants