diff --git a/doc/man/man1/sinfo.1 b/doc/man/man1/sinfo.1 index d5208999dc0f28f9ab5e4788ae99d82b7331a26d..fc52f94e241c5975cd69069bc118f00daa685945 100644 --- a/doc/man/man1/sinfo.1 +++ b/doc/man/man1/sinfo.1 @@ -182,7 +182,7 @@ List of node names List of node communication addresses .TP \fB%P\fR -Partition name +Partition name followed by "*" for the default partition .TP \fB%r\fR Only user root may initiate jobs, "yes" or "no" diff --git a/src/sinfo/print.c b/src/sinfo/print.c index 77ffeeef4cbeed4b9b9a4fccb988ac331cdc129a..669cc2f9343e256f471d2feaed91e542c0d0914c 100644 --- a/src/sinfo/print.c +++ b/src/sinfo/print.c @@ -716,7 +716,7 @@ int _print_partition(sinfo_data_t * sinfo_data, int width, char *tmp; tmp = xstrdup(sinfo_data->part_info->name); if (sinfo_data->part_info->flags & PART_FLAG_DEFAULT) { - if (strlen(tmp) < width) + if ( (strlen(tmp) < width) || (width == 0) ) xstrcat(tmp, "*"); else if (width > 0) tmp[width-1] = '*';