[OpenWrt-Devel] [PATCH fstools 1/3] libblkid-tiny: add blkid_probe_set_id_label() stub
Rafał Miłecki
zajec5 at gmail.com
Tue Dec 17 02:28:34 EST 2019
From: Rafał Miłecki <rafal at milecki.pl>
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 at milecki.pl>
---
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.21.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list