mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-13 22:21:09 +02:00
Add help strings for all commands.
This commit is contained in:
parent
b15dffd9a8
commit
090c402430
100
g13/server.c
100
g13/server.c
@ -202,16 +202,6 @@ reset_notify (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* OPEN [options] <filename>
|
|
||||||
|
|
||||||
Open the container FILENAME. FILENAME must be percent-plus
|
|
||||||
escaped. A quick check to see whether this is a suitable G13
|
|
||||||
container file is done. However no cryptographic check or any
|
|
||||||
other check is done. This command is used to define the target for
|
|
||||||
further commands. The filename is reset with the RESET command,
|
|
||||||
another OPEN or the CREATE command.
|
|
||||||
*/
|
|
||||||
static const char hlp_open[] =
|
static const char hlp_open[] =
|
||||||
"OPEN [<options>] <filename>\n"
|
"OPEN [<options>] <filename>\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -272,12 +262,12 @@ cmd_open (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* MOUNT [options] [<mountpoint>]
|
static const char hlp_mount[] =
|
||||||
|
"MOUNT [options] [<mountpoint>]\n"
|
||||||
Mount the currently open file onto MOUNTPOINT. If MOUNTPOINT is
|
"\n"
|
||||||
not given the system picks an unused mountpoint. MOUNTPOINT must
|
"Mount the currently open file onto MOUNTPOINT. If MOUNTPOINT is not\n"
|
||||||
be percent-plus escaped to allow for arbitrary names.
|
"given the system picks an unused mountpoint. MOUNTPOINT must\n"
|
||||||
*/
|
"be percent-plus escaped to allow for arbitrary names.";
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_mount (assuan_context_t ctx, char *line)
|
cmd_mount (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
@ -323,12 +313,12 @@ cmd_mount (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* UMOUNT [options] [<mountpoint>]
|
static const char hlp_umount[] =
|
||||||
|
"UMOUNT [options] [<mountpoint>]\n"
|
||||||
Unmount the currently open file or the one opened at MOUNTPOINT.
|
"\n"
|
||||||
MOUNTPOINT must be percent-plus escaped. On success the mountpoint
|
"Unmount the currently open file or the one opened at MOUNTPOINT.\n"
|
||||||
is returned via a "MOUNTPOINT" status line.
|
"MOUNTPOINT must be percent-plus escaped. On success the mountpoint\n"
|
||||||
*/
|
"is returned via a \"MOUNTPOINT\" status line.";
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_umount (assuan_context_t ctx, char *line)
|
cmd_umount (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
@ -368,13 +358,12 @@ cmd_umount (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char hlp_recipient[] =
|
||||||
/* RECIPIENT <userID>
|
"RECIPIENT <userID>\n"
|
||||||
|
"\n"
|
||||||
FIXME - description.
|
"Add USERID to the list of recipients to be used for the next CREATE\n"
|
||||||
All RECIPIENT commands are cumulative until a RESET or an
|
"command. All recipient commands are cumulative until a RESET or an\n"
|
||||||
successful CREATE command.
|
"successful create command.";
|
||||||
*/
|
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_recipient (assuan_context_t ctx, char *line)
|
cmd_recipient (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
@ -390,10 +379,10 @@ cmd_recipient (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* SIGNER <userID>
|
static const char hlp_signer[] =
|
||||||
|
"SIGNER <userID>\n"
|
||||||
FIXME - description.
|
"\n"
|
||||||
*/
|
"Not yet implemented.";
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_signer (assuan_context_t ctx, char *line)
|
cmd_signer (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
@ -408,11 +397,11 @@ cmd_signer (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CREATE [options] filename
|
static const char hlp_create[] =
|
||||||
|
"CREATE [options] <filename>\n"
|
||||||
Create a new container. On success the OPEN command is done
|
"\n"
|
||||||
implictly for the new container.
|
"Create a new container. On success the OPEN command is \n"
|
||||||
*/
|
"implictly done for the new container.";
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_create (assuan_context_t ctx, char *line)
|
cmd_create (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
@ -466,17 +455,16 @@ cmd_create (assuan_context_t ctx, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* GETINFO <what>
|
static const char hlp_getinfo[] =
|
||||||
|
"GETINFO <what>\n"
|
||||||
Multipurpose function to return a variety of information.
|
"\n"
|
||||||
Supported values for WHAT are:
|
"Multipurpose function to return a variety of information.\n"
|
||||||
|
"Supported values for WHAT are:\n"
|
||||||
version - Return the version of the program.
|
"\n"
|
||||||
pid - Return the process id of the server.
|
" version - Return the version of the program.\n"
|
||||||
cmd_has_option CMD OPT
|
" pid - Return the process id of the server.\n"
|
||||||
- Returns OK if the command CMD implements the option OPT.
|
" cmd_has_option CMD OPT\n"
|
||||||
|
" - Return OK if the command CMD implements the option OPT.";
|
||||||
*/
|
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
cmd_getinfo (assuan_context_t ctx, char *line)
|
cmd_getinfo (assuan_context_t ctx, char *line)
|
||||||
{
|
{
|
||||||
@ -554,15 +542,15 @@ register_commands (assuan_context_t ctx)
|
|||||||
assuan_handler_t handler;
|
assuan_handler_t handler;
|
||||||
const char * const help;
|
const char * const help;
|
||||||
} table[] = {
|
} table[] = {
|
||||||
{ "OPEN", cmd_open, hlp_open },
|
{ "OPEN", cmd_open, hlp_open },
|
||||||
{ "MOUNT", cmd_mount },
|
{ "MOUNT", cmd_mount, hlp_mount},
|
||||||
{ "UMOUNT", cmd_umount },
|
{ "UMOUNT", cmd_umount, hlp_umount },
|
||||||
{ "RECIPIENT", cmd_recipient },
|
{ "RECIPIENT", cmd_recipient, hlp_recipient },
|
||||||
{ "SIGNER", cmd_signer },
|
{ "SIGNER", cmd_signer, hlp_signer },
|
||||||
{ "CREATE", cmd_create },
|
{ "CREATE", cmd_create, hlp_create },
|
||||||
{ "INPUT", NULL },
|
{ "INPUT", NULL },
|
||||||
{ "OUTPUT", NULL },
|
{ "OUTPUT", NULL },
|
||||||
{ "GETINFO", cmd_getinfo },
|
{ "GETINFO", cmd_getinfo,hlp_getinfo },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
gpg_error_t err;
|
gpg_error_t err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user