diff options
author | Phillip Susi <psusi@ubuntu.com> | 2011-12-05 19:24:39 -0500 |
---|---|---|
committer | Phillip Susi <psusi@ubuntu.com> | 2014-06-15 15:16:33 -0400 |
commit | 360d6277d674c6f92135c8b6bf274c48675ef168 (patch) | |
tree | 6f0cd207b71711655073ed431c6e6d73ee1ec25e /parted | |
parent | f46146a15bf45478569c1d364661d3d54f8e3a1a (diff) | |
download | parted-360d6277d674c6f92135c8b6bf274c48675ef168.tar.gz |
parted: Allow undocumented commands
Have command_print_summary print nothing if the command summary is NULL.
This allows for a command to be registered, but not documented in the
output of help.
Diffstat (limited to 'parted')
-rw-r--r-- | parted/command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/parted/command.c b/parted/command.c index e8fa64e..bc70e8a 100644 --- a/parted/command.c +++ b/parted/command.c @@ -118,6 +118,8 @@ command_get_names (Command** list) void command_print_summary (Command* cmd) { + if (cmd->summary == NULL) + return; fputs (" ", stdout); str_list_print_wrap (cmd->summary, screen_width(), 2, 8, stdout); putchar ('\n'); |