[OpenWrt-Devel] [PATCH fstools] libblkid-tiny: fix f2fs labels by increasing label buffer

Petr Štetiar ynezz at true.cz
Wed Jan 15 05:26:18 EST 2020


f2fs max label length is 1024B (512 * uint16_t) which is way above
current 256B used in `struct blkid_struct_probe` which renders labels on
f2fs system unusable:

 $ mkfs.f2fs -l drive /dev/sda1
 $ block info /dev/sda1
 label buffer too small 1024 > 255

So increase the label buffer again in order to make enough space for
f2fs labels.

Fixes: FS#2735
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 libblkid-tiny/libblkid-tiny.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libblkid-tiny/libblkid-tiny.h b/libblkid-tiny/libblkid-tiny.h
index f0922b5f7aeb..e476e7b2c6ef 100644
--- a/libblkid-tiny/libblkid-tiny.h
+++ b/libblkid-tiny/libblkid-tiny.h
@@ -56,7 +56,7 @@ struct blkid_struct_probe
 	int	err;
 	char	dev[32];
 	char	uuid[64];
-	char	label[256];
+	char	label[1025];
 	char	version[64];
 
 	struct list_head	buffers;	/* list of buffers */

_______________________________________________
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