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

removed functions that didn't do anything.

parent 5d5ed589
No related branches found
No related tags found
No related merge requests found
...@@ -38,54 +38,6 @@ ...@@ -38,54 +38,6 @@
#include "src/sshare/sshare.h" #include "src/sshare/sshare.h"
extern void _sshare_print_time(print_field_t *field,
uint64_t value, int last)
{
/* (value == unset) || (value == cleared) */
if((value == NO_VAL) || (value == INFINITE)) {
if(print_fields_parsable_print
== PRINT_FIELDS_PARSABLE_NO_ENDING
&& last)
;
else if(print_fields_parsable_print)
printf("|");
else
printf("%-*s ", field->len, " ");
} else {
char *output = NULL;
double temp_d = (double)value;
switch(time_format) {
case SSHARE_TIME_SECS:
output = xstrdup_printf("%llu", value);
break;
case SSHARE_TIME_MINS:
temp_d /= 60;
output = xstrdup_printf("%.0lf", temp_d);
break;
case SSHARE_TIME_HOURS:
temp_d /= 3600;
output = xstrdup_printf("%.0lf", temp_d);
break;
default:
temp_d /= 60;
output = xstrdup_printf("%.0lf", temp_d);
break;
}
if(print_fields_parsable_print
== PRINT_FIELDS_PARSABLE_NO_ENDING
&& last)
printf("%s", output);
else if(print_fields_parsable_print)
printf("%s|", output);
else
printf("%*.*s ", field->len, field->len, output);
xfree(output);
}
}
extern int process(shares_response_msg_t *resp) extern int process(shares_response_msg_t *resp)
{ {
int rc = SLURM_SUCCESS; int rc = SLURM_SUCCESS;
......
...@@ -46,11 +46,8 @@ ...@@ -46,11 +46,8 @@
int exit_code; /* sshare's exit code, =1 on any error at any time */ int exit_code; /* sshare's exit code, =1 on any error at any time */
int quiet_flag; /* quiet=1, verbose=-1, normal=0 */ int quiet_flag; /* quiet=1, verbose=-1, normal=0 */
int verbosity; /* count of -v options */ int verbosity; /* count of -v options */
sshare_time_format_t time_format = SSHARE_TIME_MINS;
char *time_format_string = "Minutes";
uint32_t my_uid = 0; uint32_t my_uid = 0;
static int _set_time_format(char *format);
static int _get_info(shares_request_msg_t *shares_req, static int _get_info(shares_request_msg_t *shares_req,
shares_response_msg_t **shares_resp); shares_response_msg_t **shares_resp);
static int _addto_name_char_list(List char_list, char *names, bool gid); static int _addto_name_char_list(List char_list, char *names, bool gid);
...@@ -149,9 +146,6 @@ main (int argc, char *argv[]) ...@@ -149,9 +146,6 @@ main (int argc, char *argv[])
list_create(slurm_destroy_char); list_create(slurm_destroy_char);
_addto_name_char_list(req_msg.user_list, optarg, 0); _addto_name_char_list(req_msg.user_list, optarg, 0);
break; break;
case 't':
_set_time_format(optarg);
break;
case 'v': case 'v':
quiet_flag = -1; quiet_flag = -1;
verbosity++; verbosity++;
...@@ -238,25 +232,6 @@ main (int argc, char *argv[]) ...@@ -238,25 +232,6 @@ main (int argc, char *argv[])
exit(exit_code); exit(exit_code);
} }
static int _set_time_format(char *format)
{
if (strncasecmp (format, "Seconds", 1) == 0) {
time_format = SSHARE_TIME_SECS;
time_format_string = "Seconds";
} else if (strncasecmp (format, "Minutes", 1) == 0) {
time_format = SSHARE_TIME_MINS;
time_format_string = "Minutes";
} else if (strncasecmp (format, "Hours", 1) == 0) {
time_format = SSHARE_TIME_HOURS;
time_format_string = "Hours";
} else {
fprintf (stderr, "unknown time format %s", format);
return SLURM_ERROR;
}
return SLURM_SUCCESS;
}
static int _get_info(shares_request_msg_t *shares_req, static int _get_info(shares_request_msg_t *shares_req,
shares_response_msg_t **shares_resp) shares_response_msg_t **shares_resp)
{ {
...@@ -429,7 +404,6 @@ sshare [<OPTION>] [<COMMAND>] \n\ ...@@ -429,7 +404,6 @@ sshare [<OPTION>] [<COMMAND>] \n\
-P or --parsable2: output will be '|' delimited without a '|' at the end\n\ -P or --parsable2: output will be '|' delimited without a '|' at the end\n\
-q or --quiet: equivalent to \"quiet\" command \n\ -q or --quiet: equivalent to \"quiet\" command \n\
-u or --uid or user: equivalent to \"user\" command \n\ -u or --uid or user: equivalent to \"user\" command \n\
-t or --time: equivalent to \"time\" command \n\
-v or --verbose: equivalent to \"verbose\" command \n\ -v or --verbose: equivalent to \"verbose\" command \n\
-V or --version: equivalent to \"version\" command \n\ -V or --version: equivalent to \"version\" command \n\
\n\ \n\
......
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