Need more bits for future extensions.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
#define _SA_H
#include <stdio.h>
+#include <stdint.h>
#include "common.h"
#include "rd_stats.h"
int check_disk_reg
(struct activity *, int, int, int);
void check_file_actlst
- (int *, char *, struct activity * [], unsigned int, struct file_magic *,
+ (int *, char *, struct activity * [], uint64_t, struct file_magic *,
struct file_header *, struct file_activity **, unsigned int [], int, int *, int *);
int check_net_dev_reg
(struct activity *, int, int, int);
char *get_devname
(unsigned int, unsigned int, int);
char *get_sa_devname
- (unsigned int, unsigned int, unsigned long long [], unsigned int, unsigned int);
+ (unsigned int, unsigned int, unsigned long long [], unsigned int, uint64_t);
void get_file_timestamp_struct
- (unsigned int, struct tm *, struct file_header *);
+ (uint64_t, struct tm *, struct file_header *);
unsigned long long get_global_cpu_statistics
- (struct activity *, int, int, unsigned int, unsigned char []);
+ (struct activity *, int, int, uint64_t, unsigned char []);
void get_global_soft_statistics
- (struct activity *, int, int, unsigned int, unsigned char []);
+ (struct activity *, int, int, uint64_t, unsigned char []);
void get_itv_value
(struct record_header *, struct record_header *, unsigned long long *);
void init_custom_color_palette
void parse_sa_devices
(char *, struct activity *, int, int *, int);
int parse_sar_opt
- (char * [], int *, struct activity * [], unsigned int *, int);
+ (char * [], int *, struct activity * [], uint64_t *, int);
int parse_sar_I_opt
- (char * [], int *, unsigned int *, struct activity * []);
+ (char * [], int *, uint64_t *, struct activity * []);
int parse_sa_P_opt
- (char * [], int *, unsigned int *, struct activity * []);
+ (char * [], int *, uint64_t *, struct activity * []);
int parse_sar_m_opt
(char * [], int *, struct activity * []);
int parse_sar_n_opt
int parse_timestamp
(char * [], int *, struct tstamp *, const char *);
void print_report_hdr
- (unsigned int, struct tm *, struct file_header *);
+ (uint64_t, struct tm *, struct file_header *);
void print_sar_comment
(int *, int, char *, char *, int, char *, struct file_header *,
struct record_header *);
__printf_funct_t print_sar_restart
(int *, int, char *, char *, int, struct file_header *, struct record_header *);
int print_special_record
- (struct record_header *, unsigned int, struct tstamp *, struct tstamp *,
+ (struct record_header *, uint64_t, struct tstamp *, struct tstamp *,
int, int, struct tm *, char *, int, struct file_magic *,
struct file_header *, struct activity * [], struct report_format *, int, int);
int read_file_stat_bunch
(int, char *, struct file_magic *, int, int, int);
int read_record_hdr
(int, void *, struct record_header *, struct file_header *, int, int,
- int, size_t, unsigned int);
+ int, size_t, uint64_t);
void reallocate_all_buffers
(struct activity *, __nr_t);
void replace_nonprintable_char
int sa_fread
(int, void *, size_t, int, int);
int sa_get_record_timestamp_struct
- (unsigned int, struct record_header *, struct tm *);
+ (uint64_t, struct record_header *, struct tm *);
int sa_open_read_magic
(int *, char *, struct file_magic *, int, int *, int);
int search_list_item
void select_default_activity
(struct activity * []);
void set_bitmaps
- (struct activity * [], unsigned int *);
+ (struct activity * [], uint64_t *);
void set_hdr_rectime
(unsigned int, struct tm *, struct file_header *);
void set_record_timestamp_string
- (unsigned int, struct record_header *, char *, char *, int, struct tm *);
+ (uint64_t, struct record_header *, char *, char *, int, struct tm *);
void swap_struct
(unsigned int [], void *, int);
#endif /* SOURCE_SADC undefined */
* not the time, should be used by the caller.
***************************************************************************
*/
-void get_file_timestamp_struct(unsigned int flags, struct tm *rectime,
+void get_file_timestamp_struct(uint64_t flags, struct tm *rectime,
struct file_header *file_hdr)
{
if (PRINT_TRUE_TIME(flags)) {
* @rectime Date and time from file header.
***************************************************************************
*/
-void print_report_hdr(unsigned int flags, struct tm *rectime,
+void print_report_hdr(uint64_t flags, struct tm *rectime,
struct file_header *file_hdr)
{
*/
int read_record_hdr(int ifd, void *buffer, struct record_header *record_hdr,
struct file_header *file_hdr, int arch_64, int endian_mismatch,
- int oneof, size_t b_size, unsigned int flags)
+ int oneof, size_t b_size, uint64_t flags)
{
int rc;
* @arch_64 TRUE if file's data come from a 64 bit machine.
***************************************************************************
*/
-void check_file_actlst(int *ifd, char *dfile, struct activity *act[], unsigned int flags,
+void check_file_actlst(int *ifd, char *dfile, struct activity *act[], uint64_t flags,
struct file_magic *file_magic, struct file_header *file_hdr,
struct file_activity **file_actlst, unsigned int id_seq[],
int ignore, int *endian_mismatch, int *arch_64)
***************************************************************************
*/
int parse_sar_opt(char *argv[], int *opt, struct activity *act[],
- unsigned int *flags, int caller)
+ uint64_t *flags, int caller)
{
int i, p;
* 0 on success, 1 otherwise.
***************************************************************************
*/
-int parse_sar_I_opt(char *argv[], int *opt, unsigned int *flags, struct activity *act[])
+int parse_sar_I_opt(char *argv[], int *opt, uint64_t *flags, struct activity *act[])
{
int p;
* 0 on success, 1 otherwise.
***************************************************************************
*/
-int parse_sa_P_opt(char *argv[], int *opt, unsigned int *flags, struct activity *act[])
+int parse_sa_P_opt(char *argv[], int *opt, uint64_t *flags, struct activity *act[])
{
int p;
* @act Array of selected activities.
***************************************************************************
*/
-void set_bitmaps(struct activity *act[], unsigned int *flags)
+void set_bitmaps(struct activity *act[], uint64_t *flags)
{
int p;
* 1 if an error was detected, or 0 otherwise.
***************************************************************************
*/
-int sa_get_record_timestamp_struct(unsigned int l_flags, struct record_header *record_hdr,
+int sa_get_record_timestamp_struct(uint64_t l_flags, struct record_header *record_hdr,
struct tm *rectime)
{
struct tm *ltm;
* been used.
***************************************************************************
*/
-void set_record_timestamp_string(unsigned int l_flags, struct record_header *record_hdr,
+void set_record_timestamp_string(uint64_t l_flags, struct record_header *record_hdr,
char *cur_date, char *cur_time, int len, struct tm *rectime)
{
/* Set cur_time date value */
* 1 if the record has been successfully displayed, and 0 otherwise.
***************************************************************************
*/
-int print_special_record(struct record_header *record_hdr, unsigned int l_flags,
+int print_special_record(struct record_header *record_hdr, uint64_t l_flags,
struct tstamp *tm_start, struct tstamp *tm_end, int rtype, int ifd,
struct tm *rectime, char *file, int tab,
struct file_magic *file_magic, struct file_header *file_hdr,
***************************************************************************
*/
unsigned long long get_global_cpu_statistics(struct activity *a, int prev, int curr,
- unsigned int flags, unsigned char offline_cpu_bitmap[])
+ uint64_t flags, unsigned char offline_cpu_bitmap[])
{
int i;
unsigned long long tot_jiffies_c, tot_jiffies_p;
***************************************************************************
*/
void get_global_soft_statistics(struct activity *a, int prev, int curr,
- unsigned int flags, unsigned char offline_cpu_bitmap[])
+ uint64_t flags, unsigned char offline_cpu_bitmap[])
{
int i;
struct stats_softnet *ssnc, *ssnp;
***************************************************************************
*/
char *get_sa_devname(unsigned int major, unsigned int minor, unsigned long long wwn[],
- unsigned int part_nr, unsigned int flags)
+ unsigned int part_nr, uint64_t flags)
{
char *dev_name = NULL, *persist_dev_name = NULL;
static char sid[64];
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#endif
long interval = 0;
-unsigned int flags = 0;
+uint64_t flags = 0;
int optz = 0;
char timestamp[2][TIMESTAMP_LEN];
char sa_dir[])
{
int do_sa_rotat = 0;
- unsigned int save_flags;
+ uint64_t save_flags;
char new_ofile[MAX_FILE_LEN] = "";
struct tm rectime = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL};
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
#include <stdarg.h>
#include <unistd.h>
#include <time.h>
/* Color palette number */
int palette = SVG_DEFAULT_COL_PALETTE;
-unsigned int flags = 0;
+uint64_t flags = 0;
unsigned int dm_major; /* Device-mapper major number */
unsigned int format = 0; /* Output format */
unsigned int f_position = 0; /* Output format position in array */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
/* Number of decimal places */
int dplaces_nr = -1;
-unsigned int flags = 0;
+uint64_t flags = 0;
unsigned int dm_major; /* Device-mapper major number */
char timestamp[2][TIMESTAMP_LEN];