From: seb Date: Wed, 1 May 2013 12:22:08 +0000 (+0200) Subject: Remove unused constants from header files X-Git-Tag: v10.1.6~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68de16c0525bfd56ec3369cd6fc3c622a17798be;p=sysstat Remove unused constants from header files Several constants defined in header files were no longer used. So remove them. Note that S_F_PER_PROC constant (used in sar code to indicate that option -P has been entered on the commnd line) has also been deleted. We can know that option -P has been used if the CPU bitmap has at least one bit set. --- diff --git a/CHANGES b/CHANGES index 6a4a2d1..49dd743 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Changes: xxxx/xx/xx: Version 10.1.6 - Sebastien Godard (sysstat orange.fr) + * Code cleaned: Removed several unused constants from header files. * Sysstat command options can now be 'collapsed' (grouped) when not followed by an argument. So it's now possible for example to enter 'iostat -px 2 5' since no device name is given to diff --git a/ioconf.h b/ioconf.h index c704cf8..1509df9 100644 --- a/ioconf.h +++ b/ioconf.h @@ -15,7 +15,6 @@ #define IOC_DEVLEN 47 #define IOC_MAXMINOR 2047 #define IOC_LINESIZ 255 -#define IOC_PARTLEN 7 #define IOC_FMTLEN 15 #ifndef MAX_BLKDEV diff --git a/pidstat.h b/pidstat.h index c4a4cab..12388bb 100644 --- a/pidstat.h +++ b/pidstat.h @@ -68,7 +68,6 @@ #define PROC "/proc" -#define PROC_PID "/proc/%u" #define PID_STAT "/proc/%u/stat" #define PID_STATUS "/proc/%u/status" #define PID_IO "/proc/%u/io" diff --git a/rd_stats.h b/rd_stats.h index f941426..3b9b084 100644 --- a/rd_stats.h +++ b/rd_stats.h @@ -28,7 +28,6 @@ /* Maximum length of USB product string */ #define MAX_PROD_LEN 48 -#define CNT_DEV 0 #define CNT_PART 1 #define CNT_ALL_DEV 0 #define CNT_USED_DEV 1 diff --git a/sa.h b/sa.h index 1a91995..cd16f15 100644 --- a/sa.h +++ b/sa.h @@ -84,7 +84,7 @@ #define S_F_SEC_EPOCH 0x00000080 #define S_F_HDR_ONLY 0x00000100 #define S_F_FILE_LOCKED 0x00000200 -#define S_F_PER_PROC 0x00000400 +/* Unused 0x00000400*/ #define S_F_HORIZONTALLY 0x00000800 #define S_F_COMMENT 0x00001000 #define S_F_PERSIST_NAME 0x00002000 @@ -100,7 +100,6 @@ #define PRINT_SEC_EPOCH(m) (((m) & S_F_SEC_EPOCH) == S_F_SEC_EPOCH) #define DISPLAY_HDR_ONLY(m) (((m) & S_F_HDR_ONLY) == S_F_HDR_ONLY) #define FILE_LOCKED(m) (((m) & S_F_FILE_LOCKED) == S_F_FILE_LOCKED) -#define WANT_PER_PROC(m) (((m) & S_F_PER_PROC) == S_F_PER_PROC) #define DISPLAY_HORIZONTALLY(m) (((m) & S_F_HORIZONTALLY) == S_F_HORIZONTALLY) #define DISPLAY_COMMENT(m) (((m) & S_F_COMMENT) == S_F_COMMENT) #define DISPLAY_PERSIST_NAME_S(m) (((m) & S_F_PERSIST_NAME) == S_F_PERSIST_NAME) diff --git a/sa_common.c b/sa_common.c index 3d30d51..fd0e19e 100644 --- a/sa_common.c +++ b/sa_common.c @@ -1250,7 +1250,6 @@ int parse_sar_opt(char *argv[], int *opt, struct activity *act[], select_all_activities(act); /* Force '-P ALL -I XALL' */ - *flags |= S_F_PER_PROC; p = get_activity_position(act, A_MEMORY); act[p]->opt_flags |= AO_F_MEM_AMT + AO_F_MEM_DIA + @@ -1636,7 +1635,6 @@ int parse_sa_P_opt(char *argv[], int *opt, unsigned int *flags, struct activity p = get_activity_position(act, A_CPU); if (argv[++(*opt)]) { - *flags |= S_F_PER_PROC; for (t = strtok(argv[*opt], ","); t; t = strtok(NULL, ",")) { if (!strcmp(t, K_ALL)) { diff --git a/sadf.h b/sadf.h index 786d3b0..2e16854 100644 --- a/sadf.h +++ b/sadf.h @@ -39,7 +39,6 @@ */ /* Format options */ -#define FO_NULL 0x00 /* * Indicate that all statistics data for one activity should be displayed before