Exemple #1
0
int headerPutString(Header h, rpmTag tag, const char *val)
{
    rpmTagType type = rpmTagGetType(tag) & RPM_MASK_TYPE;
    const void *sptr = NULL;

    /* string arrays expect char **, arrange that */
    if (type == RPM_STRING_ARRAY_TYPE || type == RPM_I18NSTRING_TYPE) {
	sptr = &val;
    } else if (type == RPM_STRING_TYPE) {
	sptr = val;
    } else {
	return 0;
    }

    return headerPutType(h, tag, type, sptr, 1);
}
Exemple #2
0
int headerPutBin(Header h, rpmTag tag, uint8_t *val, rpm_count_t size)
{
    return headerPutType(h, tag, RPM_BIN_TYPE, val, size);
}
Exemple #3
0
int headerPutUint64(Header h, rpmTag tag, uint64_t *val, rpm_count_t size)
{
    return headerPutType(h, tag, RPM_INT64_TYPE, val, size);
}
Exemple #4
0
int headerPutChar(Header h, rpmTag tag, char *val, rpm_count_t size)
{
    return headerPutType(h, tag, RPM_CHAR_TYPE, val, size);
}
Exemple #5
0
int headerPutStringArray(Header h, rpmTag tag, const char **array, rpm_count_t size)
{
    return headerPutType(h, tag, RPM_STRING_ARRAY_TYPE, array, size);
}
Exemple #6
0
int headerPutUint32(Header h, rpmTagVal tag, const uint32_t *val, rpm_count_t size)
{
    return headerPutType(h, tag, RPM_INT32_TYPE, val, size);
}