]> err.no Git - util-linux/commitdiff
blkid: use "char **" rather than "unsigned char **"
authorKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2009 15:00:39 +0000 (16:00 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2009 15:00:39 +0000 (16:00 +0100)
Use "char" to be consistent with the old high level API.

Signed-off-by: Karel Zak <kzak@redhat.com>
libs/blkid/bin/blkid.c
libs/blkid/src/blkid.h
libs/blkid/src/evaluate.c
libs/blkid/src/probe.c
libs/blkid/src/verify.c

index 868897ac0ab9d3cb57ac0f980967f0e9af77c5b6..488b9b9d9764896e614ca660f23cb7e379f29910 100644 (file)
@@ -323,7 +323,7 @@ static void print_tags(blkid_dev dev, char *show[], int numtag, int output)
 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;
index 06eba12bb5ecf7eafd57d505107371698f38147b..ea5b3eb318f05391df97981717d72772668ce104 100644 (file)
@@ -159,9 +159,9 @@ extern int blkid_do_safeprobe(blkid_probe pr);
 
 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
index a3aaf151dd581b486cf3be8a30eff09e8b18c3fc..e2acee7c40bee8f93c523a2164ed5fd5e2764dc5 100644 (file)
@@ -44,7 +44,7 @@ static int verify_tag(const char *devname, const char *name, const char *value)
        blkid_probe pr;
        int fd = -1, rc = -1;
        size_t len;
-       unsigned char *data;
+       const char *data;
 
        pr = blkid_new_probe();
        if (!pr)
index 449ee819f31625c01d8d1a80090c4c20d9f121a3..0fd3c10191de7aac8ab528d9fa9b9f0dd2de1027 100644 (file)
@@ -860,7 +860,7 @@ int blkid_probe_set_uuid(blkid_probe pr, unsigned char *uuid)
 }
 
 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;
 
@@ -871,7 +871,7 @@ int blkid_probe_get_value(blkid_probe pr, int num, const char **name,
        if (name)
                *name = v->name;
        if (data)
-               *data = v->data;
+               *data = (char *) v->data;
        if (len)
                *len = v->len;
 
@@ -880,7 +880,7 @@ int blkid_probe_get_value(blkid_probe pr, int num, const char **name,
 }
 
 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;
 
@@ -892,7 +892,7 @@ int blkid_probe_lookup_value(blkid_probe pr, const char *name,
 
                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));
index 7f795a4266293cf46c9834fcc3b783c9e08131a1..40ab4c672e0fc13e6b1bd07d19e1218c9151744b 100644 (file)
@@ -22,7 +22,7 @@
 
 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;
@@ -31,7 +31,7 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev)
 
        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);
        }
 }