From a68eb730558fb90bc8d9524564d8f9e58f3ccac1 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 7 Oct 2019 11:20:55 +0200 Subject: Improve ABI backward & forward compatibillity - Padd the compressor config union - 128 bytes aught to be enough for everyone, i.e. future compressors. - Insist that the padding space is initialized to 0. If a field gets added to an existing compressor, it can test for 0 as a sentinel value. - Add a size field to the hook structure, aka "the Microsoft way". - The explanation is in the comment. - Don't make the Microsoft mistake of checking for >=, insist on *exact* size match. Future users will need a fallback if their hooks are rejected. But at least they will be rejected instead of silently not being used. - Add an unsupported flag check to the dir tree reader. - Add a basic abi unit test that, for now, checks the size of the compressor config struct fields. Signed-off-by: David Oberhollenzer --- include/sqfs/dir_reader.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sqfs/dir_reader.h') diff --git a/include/sqfs/dir_reader.h b/include/sqfs/dir_reader.h index 8377fdd..ec84d98 100644 --- a/include/sqfs/dir_reader.h +++ b/include/sqfs/dir_reader.h @@ -99,6 +99,8 @@ typedef enum { * of parent nodes with the subtree stored at the end. */ SQFS_TREE_STORE_PARENTS = 0x40, + + SQFS_TREE_ALL_FLAGS = 0x7F, } E_SQFS_TREE_FILTER_FLAGS; /** -- cgit v1.2.3