mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Add reder information to --card-status.
* g10/call-agent.h, g10/call-agent.c (agent_release_card_info) g10/card-util.c (card_status): Add READER. * scd/apdu.c (close_ccid_reader, open_ccid_reader): Handle RDRNAME. (apdu_get_reader_name): New. * scd/ccid-driver.c (ccid_open_reader): Add argument to RDRNAME_P. * scd/command.c (cmd_learn): Return READER information.
This commit is contained in:
parent
2242658efe
commit
bce0e3f71d
8 changed files with 41 additions and 6 deletions
11
scd/apdu.c
11
scd/apdu.c
|
@ -2466,6 +2466,7 @@ static int
|
|||
close_ccid_reader (int slot)
|
||||
{
|
||||
ccid_close_reader (reader_table[slot].ccid.handle);
|
||||
reader_table[slot].rdrname = NULL;
|
||||
reader_table[slot].used = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -2619,7 +2620,8 @@ open_ccid_reader (const char *portstr)
|
|||
return -1;
|
||||
slotp = reader_table + slot;
|
||||
|
||||
err = ccid_open_reader (&slotp->ccid.handle, portstr);
|
||||
err = ccid_open_reader (&slotp->ccid.handle, portstr,
|
||||
(const char **)&slotp->rdrname);
|
||||
if (err)
|
||||
{
|
||||
slotp->used = 0;
|
||||
|
@ -4326,3 +4328,10 @@ apdu_send_direct (int slot, size_t extended_length,
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
apdu_get_reader_name (int slot)
|
||||
{
|
||||
return reader_table[slot].rdrname;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue