mirror of
https://github.com/postgres/postgres.git
synced 2025-06-06 00:02:36 -04:00
Change some keyring function to return void
No callers cared about the return value of these functions anyway.
This commit is contained in:
parent
14a2bd2849
commit
043232e31e
@ -62,9 +62,9 @@ static GenericKeyring *load_keyring_provider_from_record(KeyringProviderRecord *
|
|||||||
static inline void get_keyring_infofile_path(char *resPath, Oid dbOid);
|
static inline void get_keyring_infofile_path(char *resPath, Oid dbOid);
|
||||||
static bool fetch_next_key_provider(int fd, off_t *curr_pos, KeyringProviderRecord *provider);
|
static bool fetch_next_key_provider(int fd, off_t *curr_pos, KeyringProviderRecord *provider);
|
||||||
|
|
||||||
static uint32 write_key_provider_info(KeyringProviderRecord *provider,
|
static void write_key_provider_info(KeyringProviderRecord *provider,
|
||||||
Oid database_id, off_t position,
|
Oid database_id, off_t position,
|
||||||
bool error_if_exists, bool write_xlog);
|
bool error_if_exists, bool write_xlog);
|
||||||
|
|
||||||
#ifdef FRONTEND
|
#ifdef FRONTEND
|
||||||
|
|
||||||
@ -188,10 +188,10 @@ GetAllKeyringProviders(Oid dbOid)
|
|||||||
return scan_key_provider_file(PROVIDER_SCAN_ALL, NULL, dbOid);
|
return scan_key_provider_file(PROVIDER_SCAN_ALL, NULL, dbOid);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
void
|
||||||
redo_key_provider_info(KeyringProviderXLRecord *xlrec)
|
redo_key_provider_info(KeyringProviderXLRecord *xlrec)
|
||||||
{
|
{
|
||||||
return write_key_provider_info(&xlrec->provider, xlrec->database_id, xlrec->offset_in_file, false, false);
|
write_key_provider_info(&xlrec->provider, xlrec->database_id, xlrec->offset_in_file, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -394,7 +394,7 @@ GetKeyProviderByID(int provider_id, Oid dbOid)
|
|||||||
|
|
||||||
#endif /* !FRONTEND */
|
#endif /* !FRONTEND */
|
||||||
|
|
||||||
static uint32
|
static void
|
||||||
write_key_provider_info(KeyringProviderRecord *provider, Oid database_id,
|
write_key_provider_info(KeyringProviderRecord *provider, Oid database_id,
|
||||||
off_t position, bool error_if_exists, bool write_xlog)
|
off_t position, bool error_if_exists, bool write_xlog)
|
||||||
{
|
{
|
||||||
@ -548,26 +548,25 @@ write_key_provider_info(KeyringProviderRecord *provider, Oid database_id,
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
LWLockRelease(tde_provider_info_lock());
|
LWLockRelease(tde_provider_info_lock());
|
||||||
return provider->provider_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save the key provider info to the file
|
* Save the key provider info to the file
|
||||||
*/
|
*/
|
||||||
uint32
|
void
|
||||||
save_new_key_provider_info(KeyringProviderRecord *provider, Oid databaseId, bool write_xlog)
|
save_new_key_provider_info(KeyringProviderRecord *provider, Oid databaseId, bool write_xlog)
|
||||||
{
|
{
|
||||||
return write_key_provider_info(provider, databaseId, -1, true, write_xlog);
|
write_key_provider_info(provider, databaseId, -1, true, write_xlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
void
|
||||||
modify_key_provider_info(KeyringProviderRecord *provider, Oid databaseId, bool write_xlog)
|
modify_key_provider_info(KeyringProviderRecord *provider, Oid databaseId, bool write_xlog)
|
||||||
{
|
{
|
||||||
return write_key_provider_info(provider, databaseId, -1, false, write_xlog);
|
write_key_provider_info(provider, databaseId, -1, false, write_xlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
void
|
||||||
delete_key_provider_info(int provider_id, Oid databaseId, bool write_xlog)
|
delete_key_provider_info(int provider_id, Oid databaseId, bool write_xlog)
|
||||||
{
|
{
|
||||||
KeyringProviderRecord kpr;
|
KeyringProviderRecord kpr;
|
||||||
@ -575,7 +574,7 @@ delete_key_provider_info(int provider_id, Oid databaseId, bool write_xlog)
|
|||||||
memset(&kpr, 0, sizeof(KeyringProviderRecord));
|
memset(&kpr, 0, sizeof(KeyringProviderRecord));
|
||||||
kpr.provider_id = provider_id;
|
kpr.provider_id = provider_id;
|
||||||
|
|
||||||
return modify_key_provider_info(&kpr, databaseId, write_xlog);
|
modify_key_provider_info(&kpr, databaseId, write_xlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FRONTEND
|
#ifdef FRONTEND
|
||||||
|
@ -33,13 +33,13 @@ extern GenericKeyring *GetKeyProviderByName(const char *provider_name, Oid dbOid
|
|||||||
extern GenericKeyring *GetKeyProviderByID(int provider_id, Oid dbOid);
|
extern GenericKeyring *GetKeyProviderByID(int provider_id, Oid dbOid);
|
||||||
extern ProviderType get_keyring_provider_from_typename(char *provider_type);
|
extern ProviderType get_keyring_provider_from_typename(char *provider_type);
|
||||||
extern void InitializeKeyProviderInfo(void);
|
extern void InitializeKeyProviderInfo(void);
|
||||||
extern uint32 save_new_key_provider_info(KeyringProviderRecord *provider,
|
extern void save_new_key_provider_info(KeyringProviderRecord *provider,
|
||||||
Oid databaseId, bool write_xlog);
|
|
||||||
extern uint32 modify_key_provider_info(KeyringProviderRecord *provider,
|
|
||||||
Oid databaseId, bool write_xlog);
|
Oid databaseId, bool write_xlog);
|
||||||
extern uint32 delete_key_provider_info(int provider_id,
|
extern void modify_key_provider_info(KeyringProviderRecord *provider,
|
||||||
Oid databaseId, bool write_xlog);
|
Oid databaseId, bool write_xlog);
|
||||||
extern uint32 redo_key_provider_info(KeyringProviderXLRecord *xlrec);
|
extern void delete_key_provider_info(int provider_id,
|
||||||
|
Oid databaseId, bool write_xlog);
|
||||||
|
extern void redo_key_provider_info(KeyringProviderXLRecord *xlrec);
|
||||||
|
|
||||||
extern bool ParseKeyringJSONOptions(ProviderType provider_type, void *out_opts,
|
extern bool ParseKeyringJSONOptions(ProviderType provider_type, void *out_opts,
|
||||||
char *in_buf, int buf_len);
|
char *in_buf, int buf_len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user