libblkid-tiny: add blkid_probe_set_id_label() stub
authorRafał Miłecki <rafal@milecki.pl>
Tue, 17 Dec 2019 07:28:34 +0000 (08:28 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 20 Dec 2019 06:44:08 +0000 (07:44 +0100)
This stub will allow porting more upstream code without commenting out
calls and them unused variables. This will simplify maintenance.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
libblkid-tiny/libblkid-tiny.c
libblkid-tiny/superblocks.h

index 05b4b99..52470ca 100644 (file)
@@ -101,6 +101,12 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr,
        return bf->data;
 }
 
+int blkid_probe_set_id_label(blkid_probe pr, const char *name,
+                            const unsigned char *data, size_t len)
+{
+       return -ENOTSUP;
+}
+
 int blkid_probe_set_label(blkid_probe pr, unsigned char *label, size_t len)
 {
        if (len > (sizeof(pr->label) - 1)) {
index cde8a40..ade2ae0 100644 (file)
@@ -97,7 +97,7 @@ extern int blkid_probe_set_uuid(blkid_probe pr, unsigned char *uuid);
 extern int blkid_probe_set_uuid_as(blkid_probe pr, unsigned char *uuid, const char *name);
 
 extern int blkid_probe_set_id_label(blkid_probe pr, const char *name,
-                            unsigned char *data, size_t len);
+                            const unsigned char *data, size_t len);
 extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name,
                             unsigned char *data, size_t len, int enc);