]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libafs: Fix pioctl get/putInt alignment issues
authorAndrew Deason <adeason@sinenomine.net>
Wed, 15 Sep 2010 16:19:33 +0000 (12:19 -0400)
committerDerrick Brashear <shadow@dementia.org>
Mon, 27 Sep 2010 15:28:34 +0000 (08:28 -0700)
commit1ac380b0d39fc0a4657ff134b0ef2d9bb63af3f1
tree21270caba6f7702dee265a24343843da6a52deb5
parentcb978ebcb68bf490e86e0f93de48b6119bae39ed
libafs: Fix pioctl get/putInt alignment issues

We don't know if the buffer for pioctl data is aligned to anything, so
we can't just dereference the given pointer as an int or anything
else. So, just memcpy the data in for ints and such; conveniently,
afs_pd_getBytes and afs_pd_putBytes can do this for us, so just use
that.

Change-Id: Id1abdae55308db6fe1e13f541a5d776daa6af934
Reviewed-on: http://gerrit.openafs.org/2763
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8fd83543b60aefb4b7c5a0116d1538a89f58bbb3)
Reviewed-on: http://gerrit.openafs.org/2801
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_pioctl.c