Use "char" to be consistent with the old high level API.
Signed-off-by: Karel Zak <kzak@redhat.com>
static int lowprobe_device(blkid_probe pr, const char *devname, int output,
blkid_loff_t offset, blkid_loff_t size)
{
- unsigned char *data;
+ const char *data;
const char *name;
int nvals = 0, n;
size_t len;
extern int blkid_probe_numof_values(blkid_probe pr);
extern int blkid_probe_get_value(blkid_probe pr, int num, const char **name,
- unsigned char **data, size_t *len);
+ const char **data, size_t *len);
extern int blkid_probe_lookup_value(blkid_probe pr, const char *name,
- unsigned char **data, size_t *len);
+ const char **data, size_t *len);
extern int blkid_probe_has_value(blkid_probe pr, const char *name);
#ifdef __cplusplus
blkid_probe pr;
int fd = -1, rc = -1;
size_t len;
- unsigned char *data;
+ const char *data;
pr = blkid_new_probe();
if (!pr)
}
int blkid_probe_get_value(blkid_probe pr, int num, const char **name,
- unsigned char **data, size_t *len)
+ const char **data, size_t *len)
{
struct blkid_prval *v;
if (name)
*name = v->name;
if (data)
- *data = v->data;
+ *data = (char *) v->data;
if (len)
*len = v->len;
}
int blkid_probe_lookup_value(blkid_probe pr, const char *name,
- unsigned char **data, size_t *len)
+ const char **data, size_t *len)
{
int i;
if (v->name && strcmp(name, v->name) == 0) {
if (data)
- *data = v->data;
+ *data = (char *) v->data;
if (len)
*len = v->len;
DBG(DEBUG_LOWPROBE, printf("returning %s value\n", v->name));
static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev)
{
- unsigned char *data;
+ const char *data;
const char *name;
int nvals, n;
size_t len;
for (n = 0; n < nvals; n++) {
if (blkid_probe_get_value(pr, n, &name, &data, &len) == 0)
- blkid_set_tag(dev, name, (char *) data, len);
+ blkid_set_tag(dev, name, data, len);
}
}