summaryrefslogtreecommitdiffstats
path: root/scd/app.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-10-20 11:52:16 +0200
committerWerner Koch <wk@gnupg.org>2020-10-20 12:15:56 +0200
commit390497ea115e1aca93feec297a5bd6ae7b1ba6dd (patch)
tree675448ff809e3f333bba4918e4787eacda7f8190 /scd/app.c
parentReplace all calls to access by gnupg_access (diff)
downloadgnupg2-390497ea115e1aca93feec297a5bd6ae7b1ba6dd.tar.xz
gnupg2-390497ea115e1aca93feec297a5bd6ae7b1ba6dd.zip
Replace most of the remaining stdio calls by estream calls.
-- We need to use es_fopen on Windows to cope with non-ascii file names. This is quite a large but fortunately straightforward change. At a very few places we keep using stdio (for example due to the use of popen). GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd/app.c')
-rw-r--r--scd/app.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scd/app.c b/scd/app.c
index f772510c3..d02c0ef91 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -1935,18 +1935,18 @@ report_change (int slot, int old_status, int cur_status)
char *homestr, *envstr;
char *fname;
char templ[50];
- FILE *fp;
+ estream_t fp;
snprintf (templ, sizeof templ, "reader_%d.status", slot);
fname = make_filename (gnupg_homedir (), templ, NULL );
- fp = fopen (fname, "w");
+ fp = es_fopen (fname, "w");
if (fp)
{
- fprintf (fp, "%s\n",
+ es_fprintf (fp, "%s\n",
(cur_status & 1)? "USABLE":
(cur_status & 4)? "ACTIVE":
(cur_status & 2)? "PRESENT": "NOCARD");
- fclose (fp);
+ es_fclose (fp);
}
xfree (fname);