[svn] GnuPG - r5231 - in trunk: agent g10 scd
svn author wk
cvs at cvs.gnupg.org
Tue Dec 15 12:03:18 CET 2009
Author: wk
Date: 2009-12-15 12:03:17 +0100 (Tue, 15 Dec 2009)
New Revision: 5231
Modified:
trunk/agent/protect.c
trunk/g10/ChangeLog
trunk/g10/keydb.c
trunk/g10/keyring.c
trunk/g10/keyring.h
trunk/scd/ChangeLog
trunk/scd/app-p15.c
trunk/scd/iso7816.c
Log:
Do not use the VMC C reserved word readonly.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/g10/ChangeLog 2009-12-15 11:03:17 UTC (rev 5231)
@@ -1,5 +1,8 @@
2009-12-15 Werner Koch <wk at g10code.com>
+ * keydb.c (keydb_add_resource): s/readonly/read_only/g.
+ * keyring.c (keyring_register_filename): Ditto.
+
* tdbio.c (tdbio_set_dbname): Do not call log_fatal after creating
the directory. Fixes bug#1169. Reported by Daniel Leidert.
Modified: trunk/scd/ChangeLog
===================================================================
--- trunk/scd/ChangeLog 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/scd/ChangeLog 2009-12-15 11:03:17 UTC (rev 5231)
@@ -1,3 +1,8 @@
+2009-12-15 Werner Koch <wk at g10code.com>
+
+ * iso7816.c (do_generate_keypair): s/readonly/read_only/ because
+ the first is a keyword in VMS C.
+
2009-12-03 Werner Koch <wk at g10code.com>
* scdaemon.c (set_debug): Allow for numerical debug leveles. Print
Modified: trunk/agent/protect.c
===================================================================
--- trunk/agent/protect.c 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/agent/protect.c 2009-12-15 11:03:17 UTC (rev 5231)
@@ -161,7 +161,7 @@
if (opt.verbose)
{
ms = calibrate_s2k_count_one (count);
- log_info ("S2K calibration: %lu iterations for %lums\n", count, ms);
+ log_info ("S2K calibration: %lu -> %lums\n", count, ms);
}
return count;
Modified: trunk/g10/keydb.c
===================================================================
--- trunk/g10/keydb.c 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/g10/keydb.c 2009-12-15 11:03:17 UTC (rev 5231)
@@ -219,12 +219,12 @@
const char *resname = url;
char *filename = NULL;
int force = (flags&1);
- int readonly = !!(flags&8);
+ int read_only = !!(flags&8);
int rc = 0;
KeydbResourceType rt = KEYDB_RESOURCE_TYPE_NONE;
void *token;
- if (readonly)
+ if (read_only)
force = 0;
/* Do we have an URL?
@@ -254,7 +254,7 @@
else
filename = xstrdup (resname);
- if (!force && !readonly)
+ if (!force && !read_only)
force = secret? !any_secret : !any_public;
/* See whether we can determine the filetype. */
@@ -289,7 +289,7 @@
if (rc)
goto leave;
- if(keyring_register_filename (filename, secret, readonly, &token))
+ if(keyring_register_filename (filename, secret, read_only, &token))
{
if (used_resources >= MAX_KEYDB_RESOURCES)
rc = G10ERR_RESOURCE_LIMIT;
Modified: trunk/g10/keyring.c
===================================================================
--- trunk/g10/keyring.c 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/g10/keyring.c 2009-12-15 11:03:17 UTC (rev 5231)
@@ -54,7 +54,7 @@
{
struct keyring_name *next;
int secret;
- int readonly;
+ int read_only;
dotlock_t lockhd;
int is_locked;
int did_full_scan;
@@ -201,7 +201,7 @@
* if a new keyring was registered.
*/
int
-keyring_register_filename (const char *fname, int secret, int readonly,
+keyring_register_filename (const char *fname, int secret, int read_only,
void **ptr)
{
KR_NAME kr;
@@ -214,8 +214,8 @@
if (same_file_p (kr->fname, fname))
{
/* Already registered. */
- if (readonly)
- kr->readonly = 1;
+ if (read_only)
+ kr->read_only = 1;
*ptr=kr;
return 0;
}
@@ -227,7 +227,7 @@
kr = xmalloc (sizeof *kr + strlen (fname));
strcpy (kr->fname, fname);
kr->secret = !!secret;
- kr->readonly = readonly;
+ kr->read_only = read_only;
kr->lockhd = NULL;
kr->is_locked = 0;
kr->did_full_scan = 0;
@@ -249,7 +249,7 @@
{
KR_NAME r = token;
- return r? (r->readonly || !access (r->fname, W_OK)) : 0;
+ return r? (r->read_only || !access (r->fname, W_OK)) : 0;
}
@@ -516,7 +516,7 @@
if (!hd->found.kr)
return -1; /* no successful prior search */
- if (hd->found.kr->readonly)
+ if (hd->found.kr->read_only)
return gpg_error (GPG_ERR_EACCES);
if (!hd->found.n_packets) {
@@ -562,13 +562,13 @@
else if (hd->found.kr)
{
fname = hd->found.kr->fname;
- if (hd->found.kr->readonly)
+ if (hd->found.kr->read_only)
return gpg_error (GPG_ERR_EACCES);
}
else if (hd->current.kr)
{
fname = hd->current.kr->fname;
- if (hd->current.kr->readonly)
+ if (hd->current.kr->read_only)
return gpg_error (GPG_ERR_EACCES);
}
else
@@ -603,7 +603,7 @@
if (!hd->found.kr)
return -1; /* no successful prior search */
- if (hd->found.kr->readonly)
+ if (hd->found.kr->read_only)
return gpg_error (GPG_ERR_EACCES);
if (!hd->found.n_packets) {
Modified: trunk/g10/keyring.h
===================================================================
--- trunk/g10/keyring.h 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/g10/keyring.h 2009-12-15 11:03:17 UTC (rev 5231)
@@ -24,7 +24,7 @@
typedef struct keyring_handle *KEYRING_HANDLE;
-int keyring_register_filename (const char *fname, int secret, int readonly,
+int keyring_register_filename (const char *fname, int secret, int read_only,
void **ptr);
int keyring_is_writable (void *token);
Modified: trunk/scd/app-p15.c
===================================================================
--- trunk/scd/app-p15.c 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/scd/app-p15.c 2009-12-15 11:03:17 UTC (rev 5231)
@@ -2178,7 +2178,7 @@
} (CONSTRAINED BY { -- Each AlgorithmInfo.reference value must be unique --})
TokenFlags ::= BIT STRING {
- readonly (0),
+ readOnly (0),
loginRequired (1),
prnGeneration (2),
eidCompliant (3)
Modified: trunk/scd/iso7816.c
===================================================================
--- trunk/scd/iso7816.c 2009-12-15 10:26:17 UTC (rev 5230)
+++ trunk/scd/iso7816.c 2009-12-15 11:03:17 UTC (rev 5231)
@@ -640,7 +640,7 @@
returned. In that case a value of -1 uses a large default
(e.g. 4096 bytes), a value larger 256 used that value. */
static gpg_error_t
-do_generate_keypair (int slot, int extended_mode, int readonly,
+do_generate_keypair (int slot, int extended_mode, int read_only,
const unsigned char *data, size_t datalen,
int le,
unsigned char **result, size_t *resultlen)
@@ -653,7 +653,7 @@
*resultlen = 0;
sw = apdu_send_le (slot, extended_mode,
- 0x00, CMD_GENERATE_KEYPAIR, readonly? 0x81:0x80, 0,
+ 0x00, CMD_GENERATE_KEYPAIR, read_only? 0x81:0x80, 0,
datalen, (const char*)data,
le >= 0 && le < 256? 256:le,
result, resultlen);
More information about the Gnupg-commits
mailing list