Skip to content
Snippets Groups Projects
Commit 16958ea6 authored by Moe Jette's avatar Moe Jette
Browse files

Make sinfo print trailing "*" after default partition name even if

the name is truncated.
parent b0ec4554
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,8 @@
*****************************************************************************
* Copyright (C) 2002 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Joey Ekstrom <ekstrom1@llnl.gov>, Moe Jette <jette1@llnl.gov>
* Written by Joey Ekstrom <ekstrom1@llnl.gov> and
* Morris Jette <jette1@llnl.gov>
* UCRL-CODE-2002-040.
*
* This file is part of SLURM, a resource management program.
......@@ -401,8 +402,12 @@ int _print_partition(sinfo_data_t * sinfo_data, int width,
else {
char *tmp;
tmp = xstrdup(sinfo_data->part_info->name);
if (sinfo_data->part_info->default_part)
xstrcat(tmp, "*");
if (sinfo_data->part_info->default_part) {
if (strlen(tmp) < width)
xstrcat(tmp, "*");
else
tmp[width-1] = '*';
}
_print_str(tmp, width, right_justify, true);
xfree(tmp);
}
......
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