TSysinfo record in linux.pp is incorrect for sysinfo system call - patch included
Original Reporter info from Mantis: Brett
-
Reporter name:
Original Reporter info from Mantis: Brett
- Reporter name:
Description:
The TSysinfo record defined in linux.pp is broken in 3 ways:
-
After kernel version 2.3.16 the sysinfo struct to be passed to the sysinfo system call was changed, thus fields in TSysinfo need to be added/updated accordingly (totalhigh, freehigh, _f).
-
TSysinfo uses signed integers where unsigned integers are required.
-
TSysinfo uses 'pascal width' integers (eg: longint) where 'C width' integers (eg: culong) are required. This can cause an access violation on x86_64, where culongs are 8 bytes rather than 4.
Additional information:
See http://linux.about.com/library/cmd/blcmdl2_sysinfo.htm for details of the sysinfo struct change. I have attached a linux.pp with a fixed TSysinfo record to this report.
Mantis conversion info:
- Mantis ID: 9523
- Version: 2.2.0
- Fixed in version: 2.4.0
- Monitored by: » Brett (Brett)