diff options
Diffstat (limited to 'sm')
-rw-r--r-- | sm/ChangeLog | 5 | ||||
-rw-r--r-- | sm/base64.c | 2 | ||||
-rw-r--r-- | sm/certchain.c | 2 | ||||
-rw-r--r-- | sm/export.c | 8 | ||||
-rw-r--r-- | sm/import.c | 6 | ||||
-rw-r--r-- | sm/keylist.c | 2 | ||||
-rw-r--r-- | sm/qualified.c | 12 |
7 files changed, 21 insertions, 16 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog index 7bf2c0713..cb7e98712 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,8 @@ +2006-09-14 Werner Koch <[email protected]> + + Replaced all call gpg_error_from_errno(errno) by + gpg_error_from_syserror(). + 2006-09-13 Werner Koch <[email protected]> * keylist.c (list_internal_keys): Print marker line to FP and not diff --git a/sm/base64.c b/sm/base64.c index 1d5456788..37ec9ce35 100644 --- a/sm/base64.c +++ b/sm/base64.c @@ -451,7 +451,7 @@ base64_writer_cb (void *cb_value, const void *buffer, size_t count) parm->base64.idx = idx; parm->base64.quad_count = quad_count; - return ferror (fp) ? gpg_error_from_errno (errno) : 0; + return ferror (fp) ? gpg_error_from_syserror () : 0; } static int diff --git a/sm/certchain.c b/sm/certchain.c index 054ca4c83..6be6fbe5a 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -351,7 +351,7 @@ find_up_external (KEYDB_HANDLE kh, const char *issuer, ksba_sexp_t keyid) pattern = xtrymalloc (strlen (s)+2); if (!pattern) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); strcpy (stpcpy (pattern, "/"), s); add_to_strlist (&names, pattern); xfree (pattern); diff --git a/sm/export.c b/sm/export.c index e230f780e..0f01e5f64 100644 --- a/sm/export.c +++ b/sm/export.c @@ -117,7 +117,7 @@ insert_duptable (duptable_t *table, unsigned char *fpr, int *exists) /* Insert that fingerprint. */ t = xtrymalloc (sizeof *t); if (!t) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); memcpy (t->fpr, fpr+1, 19); t->next = table[idx]; table[idx] = t; @@ -558,14 +558,14 @@ export_p12 (ctrl_t ctrl, const unsigned char *certimg, size_t certimglen, infp = tmpfile (); if (!infp) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("error creating temporary file: %s\n"), strerror (errno)); goto cleanup; } if (fwrite (certimg, certimglen, 1, infp) != 1) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("error writing to temporary file: %s\n"), strerror (errno)); goto cleanup; @@ -574,7 +574,7 @@ export_p12 (ctrl_t ctrl, const unsigned char *certimg, size_t certimglen, outfp = tmpfile (); if (!outfp) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("error creating temporary file: %s\n"), strerror (errno)); goto cleanup; } diff --git a/sm/import.c b/sm/import.c index acb55152d..5dcd09508 100644 --- a/sm/import.c +++ b/sm/import.c @@ -521,7 +521,7 @@ parse_p12 (ctrl_t ctrl, ksba_reader_t reader, tmpfp = tmpfile (); if (!tmpfp) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("error creating temporary file: %s\n"), strerror (errno)); goto cleanup; } @@ -529,7 +529,7 @@ parse_p12 (ctrl_t ctrl, ksba_reader_t reader, { if (nread && fwrite (buffer, nread, 1, tmpfp) != 1) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("error writing to temporary file: %s\n"), strerror (errno)); goto cleanup; @@ -546,7 +546,7 @@ parse_p12 (ctrl_t ctrl, ksba_reader_t reader, certfp = tmpfile (); if (!certfp) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("error creating temporary file: %s\n"), strerror (errno)); goto cleanup; } diff --git a/sm/keylist.c b/sm/keylist.c index 927bc88a6..f2aac11f5 100644 --- a/sm/keylist.c +++ b/sm/keylist.c @@ -1164,7 +1164,7 @@ list_internal_keys (ctrl_t ctrl, STRLIST names, FILE *fp, desc = xtrycalloc (ndesc, sizeof *desc); if (!ndesc) { - rc = gpg_error_from_errno (errno); + rc = gpg_error_from_syserror (); log_error ("out of core\n"); goto leave; } diff --git a/sm/qualified.c b/sm/qualified.c index 474e1488d..920d15f4a 100644 --- a/sm/qualified.c +++ b/sm/qualified.c @@ -70,7 +70,7 @@ read_list (char *key, char *country, int *lnr) listfp = fopen (listname, "r"); if (!listfp && errno != ENOENT) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); log_error (_("can't open `%s': %s\n"), listname, gpg_strerror (err)); return err; } @@ -85,7 +85,7 @@ read_list (char *key, char *country, int *lnr) { if (feof (listfp)) return gpg_error (GPG_ERR_EOF); - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); } if (!*line || line[strlen(line)-1] != '\n') @@ -234,7 +234,7 @@ gpgsm_qualified_consent (ctrl_t ctrl, ksba_cert_t cert) "to create or verify such signatures.\n"), opt.qualsig_approval? "":"\n" ) < 0 ) - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); else err = 0; @@ -251,7 +251,7 @@ gpgsm_qualified_consent (ctrl_t ctrl, ksba_cert_t cert) buffer = p = xtrymalloc (strlen (name) * 3 + 1); if (!buffer) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); free (name); return err; } @@ -324,7 +324,7 @@ gpgsm_not_qualified_warning (ctrl_t ctrl, ksba_cert_t cert) "Note, that this certificate will NOT create a " "qualified signature!"), subject? subject:"?") < 0 ) - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); else err = 0; @@ -341,7 +341,7 @@ gpgsm_not_qualified_warning (ctrl_t ctrl, ksba_cert_t cert) buffer = p = xtrymalloc (strlen (name) * 3 + 1); if (!buffer) { - err = gpg_error_from_errno (errno); + err = gpg_error_from_syserror (); free (name); return err; } |