mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
4dcef0e178
commit
18e5dd7b03
22 changed files with 82 additions and 33 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue