aboutsummaryrefslogtreecommitdiffstats
path: root/g13
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-10-20 14:38:06 +0000
committerWerner Koch <[email protected]>2020-10-20 14:38:06 +0000
commit18e5dd7b03ced51611c9ba1345cf498a0aaf14a6 (patch)
treefaeb1e27f9ffdb049f2e0dec728229d9fd7703b6 /g13
parentReplace most calls to open by a new wrapper. (diff)
downloadgnupg-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.tar.gz
gnupg-18e5dd7b03ced51611c9ba1345cf498a0aaf14a6.zip
Replace all calls to stat by gnupg_stat.
* common/sysutils.c (gnupg_stat): New. * common/sysutils.h: Include sys/stat.h. -- Yet another wrapper for Unicode support on Windows. GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g13')
-rw-r--r--g13/backend.c2
-rw-r--r--g13/create.c2
-rw-r--r--g13/mount.c2
-rw-r--r--g13/sh-dmcrypt.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/g13/backend.c b/g13/backend.c
index 71cd6ffc1..a0a26752c 100644
--- a/g13/backend.c
+++ b/g13/backend.c
@@ -139,7 +139,7 @@ be_take_lock_for_create (ctrl_t ctrl, const char *fname, dotlock_t *r_lock)
}
/* Check again that the file does not exist. */
- err = stat (fname, &sb)? 0 : gpg_error (GPG_ERR_EEXIST);
+ err = gnupg_stat (fname, &sb)? 0 : gpg_error (GPG_ERR_EEXIST);
leave:
if (!err)
diff --git a/g13/create.c b/g13/create.c
index d773dfa81..bc31f4e32 100644
--- a/g13/create.c
+++ b/g13/create.c
@@ -250,7 +250,7 @@ g13_create_container (ctrl_t ctrl, const char *filename)
{
struct stat sb;
- if (!stat (detachedname, &sb))
+ if (!gnupg_stat (detachedname, &sb))
{
err = gpg_error (GPG_ERR_EEXIST);
goto leave;
diff --git a/g13/mount.c b/g13/mount.c
index bee47fbd5..45b60806c 100644
--- a/g13/mount.c
+++ b/g13/mount.c
@@ -121,7 +121,7 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
{
struct stat sb;
- if (stat (filename, &sb))
+ if (gnupg_stat (filename, &sb))
{
err = gpg_error_from_syserror ();
goto leave;
diff --git a/g13/sh-dmcrypt.c b/g13/sh-dmcrypt.c
index 09c4d967b..4320ac394 100644
--- a/g13/sh-dmcrypt.c
+++ b/g13/sh-dmcrypt.c
@@ -94,7 +94,7 @@ check_blockdev (const char *devname, int expect_busy)
char **fields = NULL;
int lno, count;
- if (stat (devname, &sb))
+ if (gnupg_stat (devname, &sb))
{
err = gpg_error_from_syserror ();
log_error ("error stating '%s': %s\n", devname, gpg_strerror (err));