[PATCH] agent, gpg: Forward progress output for --gen-key

Daiki Ueno ueno at gnu.org
Mon Nov 2 02:52:36 CET 2015


Thanks for the comments.  I am attaching a revised patch.

>> +  if ( printchar == '\n' )
>> +    snprintf (buf, sizeof buf -1, "%.20s X 100 100", what );
>> +  else
>> +    snprintf (buf, sizeof buf -1, "%.20s %c %d %d",
>> +              what, printchar=='\n'?'X':printchar, current, total );
>                        ^^^^^^^^^^^^^^^
> This test will always be false - see above.  Can you please send a
> revised patch?

Ugh, it seems like a copy and paste error.  The first condition actually
had !strcmp (what, "primegen"), as special PRINTCHAR values are used for
primegen.

>> +  gcry_set_progress_handler (progress_cb, ctrl);
>
> This changes a global variable in libgcrypt - should be set only once.

Yes, moved it to the startup.

>> +static gpg_error_t
>> +agent_genkey_status_cb (void *opaque, const char *line)
>
> Minor thing: I would prefer to have this named without the "agent_"
> prefix.  I know that it is a little bit annoying if you have several
> functions with the same name and gtags-mode presents an extra selection
> screen. OTOH, "agent_" may indicate a global function.

Sure, that makes sense.

> Also please add a
> GnuPG-bug-id: 1415
> line to your commit message and add you explanations.

Done.

Regards,
-- 
Daiki Ueno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-agent-gpg-Forward-progress-output-for-gen-key.patch
Type: text/x-patch
Size: 3243 bytes
Desc: not available
URL: </pipermail/attachments/20151102/ee0e1114/attachment-0001.bin>


More information about the Gnupg-devel mailing list