mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3-registry: add regval_ctr_addvalue_sz.
Guenther
This commit is contained in:
parent
2c11b73391
commit
a50cc61ee6
@ -5117,6 +5117,7 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
|
||||
const char *data_p, size_t size);
|
||||
int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
|
||||
const char *data_p, size_t size);
|
||||
int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data);
|
||||
int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
|
||||
int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
|
||||
struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
|
||||
|
@ -489,6 +489,23 @@ int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
|
||||
return ctr->num_values;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
Add a new registry SZ value to the array
|
||||
**********************************************************************/
|
||||
|
||||
int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data)
|
||||
{
|
||||
DATA_BLOB blob;
|
||||
|
||||
if (!push_reg_sz(ctr, &blob, data)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return regval_ctr_addvalue(ctr, name, REG_SZ,
|
||||
(const char *)blob.data,
|
||||
blob.length);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
Add a new registry value to the array
|
||||
**********************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user