library: remove procps_version functions
It doesn't make any sense to have the binary version strings embedded into the library. The version strings are defined already either in the Makefile or in include/c.h
This commit is contained in:
@@ -55,7 +55,7 @@ static void signal_handler(int signo){
|
||||
signo,
|
||||
signal_number_to_name(signo),
|
||||
myname,
|
||||
procps_version
|
||||
PACKAGE_VERSION
|
||||
);
|
||||
switch (signo) {
|
||||
case SIGHUP:
|
||||
|
@@ -479,7 +479,7 @@ void self_info(void){
|
||||
sysv_l_format ? sysv_l_format : "(none)"
|
||||
);
|
||||
|
||||
display_version();
|
||||
fprintf(stderr, "%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
|
||||
fprintf(stderr, "Linux version %d.%d.%d\n",
|
||||
LINUX_VERSION_MAJOR(linux_version_code),
|
||||
LINUX_VERSION_MINOR(linux_version_code),
|
||||
|
13
ps/parser.c
13
ps/parser.c
@@ -32,9 +32,9 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "../proc/alloc.h"
|
||||
#include "../proc/version.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "c.h"
|
||||
|
||||
#define ARG_GNU 0
|
||||
#define ARG_END 1
|
||||
@@ -58,6 +58,11 @@ static int force_bsd = 0; /* set when normal parsing fails */
|
||||
return _("the option is exclusive: " x)
|
||||
|
||||
/********** utility functions **********/
|
||||
static void display_ps_version(void)
|
||||
{
|
||||
fprintf(stdout, PROCPS_NG_VERSION);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Both "-Oppid" and "-O ppid" should be legal, though Unix98
|
||||
@@ -341,7 +346,7 @@ static const char *parse_sysv_option(void){
|
||||
case 'V': /* single */
|
||||
trace("-V prints version\n");
|
||||
exclusive("-V");
|
||||
display_version();
|
||||
display_ps_version();
|
||||
exit(0);
|
||||
// This must be verified against SVR4-MP. (UnixWare or Powermax)
|
||||
// Leave it undocumented until that problem is solved.
|
||||
@@ -610,7 +615,7 @@ static const char *parse_bsd_option(void){
|
||||
case 'V': /* single */
|
||||
trace("V show version info\n");
|
||||
exclusive("V");
|
||||
display_version();
|
||||
display_ps_version();
|
||||
exit(0);
|
||||
case 'W':
|
||||
trace("W N/A get swap info from ... not /dev/drum.\n");
|
||||
@@ -1029,7 +1034,7 @@ static const char *parse_gnu_option(void){
|
||||
case_version:
|
||||
trace("--version\n");
|
||||
exclusive("--version");
|
||||
display_version();
|
||||
display_ps_version();
|
||||
exit(0);
|
||||
return NULL;
|
||||
case_context:
|
||||
|
Reference in New Issue
Block a user