Hi, during work on the move-XXX stuff I discovered this. Regards Holger
# HG changeset patch # User Holger Teutsch <holger.teut...@web.de> # Date 1302259903 -7200 # Branch mig # Node ID caed31174dc966450a31da048b640201980870a8 # Parent 9451c288259b7b9fd6f32f5df01d47569e570c58 Low: lib/common/utils.c: Don't try to print unprintable option values in crm_help
diff -r 9451c288259b -r caed31174dc9 lib/common/utils.c --- a/lib/common/utils.c Tue Apr 05 13:24:21 2011 +0200 +++ b/lib/common/utils.c Fri Apr 08 12:51:43 2011 +0200 @@ -2281,7 +2281,13 @@ fprintf(stream, "%s\n", crm_long_options[i].desc); } else { - fprintf(stream, " -%c, --%s%c%s\t%s\n", crm_long_options[i].val, crm_long_options[i].name, + /* is val printable as char ? */ + if(crm_long_options[i].val <= UCHAR_MAX) { + fprintf(stream, " -%c,", crm_long_options[i].val); + } else { + fputs(" ", stream); + } + fprintf(stream, " --%s%c%s\t%s\n", crm_long_options[i].name, crm_long_options[i].has_arg?'=':' ',crm_long_options[i].has_arg?"value":"", crm_long_options[i].desc?crm_long_options[i].desc:""); }
_______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker