Skip to content
Snippets Groups Projects
Commit 1fc3dd83 authored by Danny Auble's avatar Danny Auble
Browse files

reverted more of the change from Gerrit since the last revert made functions...

reverted more of the change from Gerrit since the last revert made functions that aren't used anymore.
parent 752d0ba1
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,6 @@
#include <limits.h>
#include <sys/types.h>
#include <errno.h>
#include <ctype.h>
/**
* atou64 - Convert string into u64
......@@ -53,30 +52,3 @@ int atotime_t(const char *str, time_t *val)
*val = tmp;
return 1;
}
/**
* parse_version_string - extract release numbers from version string
* @vs: version string satisfying ^D*\d+.(\d*|\d+.\d*)
* @major: major number to extract
* @minor: minor number to extract (defaults to 0 if not given)
* @micro: micro number to extract (defaults to 0 if not given)
* Returns 0 if ok (@vs satisfies above regexp), else -1 to indicate error.
*/
int parse_version_string(const char *vs, unsigned *major,
unsigned *minor, unsigned *micro)
{
if (vs == NULL)
return -1;
while (*vs && !isdigit(*vs))
vs++;
for (*major = 0; isdigit(*vs); vs++)
*major = *major * 10 + *vs - '0';
if (*vs == '\0' || *vs != '.' || (*++vs && !isdigit(*vs)))
return -1;
for (*minor = *micro = 0; isdigit(*vs); vs++)
*minor = *minor * 10 + *vs - '0';
if (*vs == '.')
while (isdigit(*++vs))
*micro = *micro * 10 + *vs - '0';
return 0;
}
......@@ -4,9 +4,7 @@
* Copyright (c) 2009-2011 Centro Svizzero di Calcolo Scientifico (CSCS)
* Licensed under the GPLv2.
*/
#include "src/common/node_select.h"
#include "../basil_alps.h"
#include "parser_internal.h"
/**
* _get_alps_engine - run QUERY of type ENGINE
......@@ -31,7 +29,7 @@ static const char *_get_alps_engine(char *buf, size_t buflen)
* get_basil_version - Detect highest BASIL version supported by ALPS.
*
* This uses the following correspondence table to find the highest supported
* ALPS version. Failing that, it falls back to Basil 1.0 as last resort.
* BASIL version. Failing that, it falls back to Basil 1.0 as last resort.
*
* +------------+---------------+------+----------------+----------------------+
* | CLE release| Engine.version| ALPS | Basil Protocol | Remarks |
......@@ -51,9 +49,6 @@ static const char *_get_alps_engine(char *buf, size_t buflen)
*
* Starting from Basil 3.1, there is also a 'basil_support' attribute to query
* the supported 'Basil Protocol' list.
*
* However, we can not presuppose this version and thus use Basil 1.0 as lowest
* common denominator to obtain the name of the ALPS engine.
*/
enum basil_version get_basil_version(void)
{
......@@ -85,7 +80,7 @@ enum basil_version get_basil_version(void)
bv = BV_1_1;
else
fatal("unsupported ALPS Engine version '%s', please edit "
"src/plugins/select/cray/libalps/go_query.c "
"src/plugins/select/cray/libalps/do_query.c "
"for this version",
engine_version);
return bv;
......
......@@ -62,8 +62,6 @@ extern const struct element_handler basil_4_0_elements[];
extern int atou64(const char *str, uint64_t *value);
extern int atou32(const char *str, uint32_t *value);
extern int atotime_t(const char *str, time_t *value);
extern int parse_version_string(const char *vs, unsigned *major,
unsigned *minor, unsigned *micro);
/* popen2.c */
extern pid_t popen2(const char *path, int *in, int *out, bool no_stderr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment