mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
watch: show information.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
65117c6794
commit
00995f5f35
30
scd/app.c
30
scd/app.c
@ -283,6 +283,34 @@ app_dump_state (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
app_show_list (ctrl_t ctrl)
|
||||||
|
{
|
||||||
|
card_t c;
|
||||||
|
app_t a;
|
||||||
|
|
||||||
|
send_status_direct (ctrl, "LIST_DEVICE", "show status of all devices");
|
||||||
|
|
||||||
|
npth_mutex_lock (&card_list_lock);
|
||||||
|
for (c = card_top; c; c = c->next)
|
||||||
|
{
|
||||||
|
char card_info[50];
|
||||||
|
|
||||||
|
snprintf (card_info, sizeof card_info, "card=%p slot=%d type=%s",
|
||||||
|
c, c->slot, strcardtype (c->cardtype));
|
||||||
|
|
||||||
|
for (a = c->app; a; a = a->next)
|
||||||
|
{
|
||||||
|
char app_info[50];
|
||||||
|
|
||||||
|
snprintf (app_info, sizeof app_info, "app=%p type=%s",
|
||||||
|
a, strapptype (a->apptype));
|
||||||
|
send_status_direct (ctrl, card_info, app_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
npth_mutex_unlock (&card_list_lock);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check whether the application NAME is allowed. This does not mean
|
/* Check whether the application NAME is allowed. This does not mean
|
||||||
we have support for it though. */
|
we have support for it though. */
|
||||||
static int
|
static int
|
||||||
@ -2026,7 +2054,7 @@ initialize_module_command (void)
|
|||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
log_error ("npth_cond_init failed: %s\n", gpg_strerror (err));
|
log_error ("npth_cond_init failed: %s\n", gpg_strerror (err));
|
||||||
return;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return apdu_init ();
|
return apdu_init ();
|
||||||
|
@ -2167,7 +2167,7 @@ cmd_list_device (assuan_context_t ctx, char *line)
|
|||||||
if (has_option (line, "--scan"))
|
if (has_option (line, "--scan"))
|
||||||
scan = 1;
|
scan = 1;
|
||||||
|
|
||||||
assuan_write_status (ctx, "LIST_DEVICE", "... show status of all devices");
|
app_show_list (ctrl);
|
||||||
|
|
||||||
/* Clear the remove flag so that the open_card is able to reread it. */
|
/* Clear the remove flag so that the open_card is able to reread it. */
|
||||||
if (ctrl->server_local->card_removed)
|
if (ctrl->server_local->card_removed)
|
||||||
|
@ -154,5 +154,6 @@ int get_active_connection_count (void);
|
|||||||
/*-- app.c --*/
|
/*-- app.c --*/
|
||||||
int scd_update_reader_status_file (void);
|
int scd_update_reader_status_file (void);
|
||||||
int app_wait (void);
|
int app_wait (void);
|
||||||
|
void app_show_list (ctrl_t ctrl);
|
||||||
|
|
||||||
#endif /*SCDAEMON_H*/
|
#endif /*SCDAEMON_H*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user