From 157924dfca61d37f29017ebb4a5eab8137a0cd27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 17 Dec 2019 08:28:34 +0100 Subject: [PATCH] libblkid-tiny: add blkid_probe_set_id_label() stub MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- libblkid-tiny/libblkid-tiny.c | 6 ++++++ libblkid-tiny/superblocks.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libblkid-tiny/libblkid-tiny.c b/libblkid-tiny/libblkid-tiny.c index 05b4b99..52470ca 100644 --- a/libblkid-tiny/libblkid-tiny.c +++ b/libblkid-tiny/libblkid-tiny.c @@ -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)) { diff --git a/libblkid-tiny/superblocks.h b/libblkid-tiny/superblocks.h index cde8a40..ade2ae0 100644 --- a/libblkid-tiny/superblocks.h +++ b/libblkid-tiny/superblocks.h @@ -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); -- 2.25.1