"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sa_common.c" between
sysstat-12.4.0.tar.xz and sysstat-12.4.1.tar.xz

About: sysstat is a collection of performance monitoring tools for Linux including amongst others sar (collects and reports system activity) and iostat (reports CPU statistics and I/O statistics for tty devices and disks). Stable version.

sa_common.c  (sysstat-12.4.0.tar.xz):sa_common.c  (sysstat-12.4.1.tar.xz)
skipping to change at line 1962 skipping to change at line 1962
SREALLOC(buffer, char, ba_size); SREALLOC(buffer, char, ba_size);
SREALLOC(*file_actlst, struct file_activity, FILE_ACTIVITY_SIZE * file_hd r->sa_act_nr); SREALLOC(*file_actlst, struct file_activity, FILE_ACTIVITY_SIZE * file_hd r->sa_act_nr);
fal = *file_actlst; fal = *file_actlst;
/* Read activity list */ /* Read activity list */
j = 0; j = 0;
for (i = 0; i < file_hdr->sa_act_nr; i++, fal++) { for (i = 0; i < file_hdr->sa_act_nr; i++, fal++) {
/* Read current file_activity structure from file */ /* Read current file_activity structure from file */
sa_fread(*ifd, buffer, (size_t) file_hdr->act_size, HARD_SIZE, UE OF_STOP); sa_fread(*ifd, buffer, (size_t) file_hdr->act_size, HARD_SIZE, UE OF_STOP);
/* /*
* Data file_activity size (file_hdr->act_size) may be greater or * Data file_activity size (file_hdr->act_size) may be greater or
* smaller than FILE_ACTIVITY_SIZE. Remap the fields of the file's * smaller than FILE_ACTIVITY_SIZE. Remap the fields of the file'
structure s structure
* then copy its contents to the expected structure. * then copy its contents to the expected structure.
*/ */
if (remap_struct(act_types_nr, file_hdr->act_types_nr, buffer, if (remap_struct(act_types_nr, file_hdr->act_types_nr, buffer,
file_hdr->act_size, FILE_ACTIVITY_SIZE, ba_size) < 0 ) file_hdr->act_size, FILE_ACTIVITY_SIZE, ba_size) < 0 )
goto format_error; goto format_error;
memcpy(fal, buffer, FILE_ACTIVITY_SIZE); memcpy(fal, buffer, FILE_ACTIVITY_SIZE);
/* Normalize endianness for file_activity structures */ /* Normalize endianness for file_activity structures */
if (*endian_mismatch) { if (*endian_mismatch) {
swap_struct(act_types_nr, fal, *arch_64); swap_struct(act_types_nr, fal, *arch_64);
} }
 End of changes. 2 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)