If you read this enum ...
... and this function ....
... you see that the values of the constants 'UPDATE_PARTITION_TYPE' and 'GAME_PARTITION_TYPE' have been confused.
In detail:[*]test_partition_skip() returns 1 if the partition should be skipped (not selected).[*]'ONLY_GAME_PARTITION' checks partition type '0' but 'UPDATE_PARTITION_TYPE' is defined as '0'.[*]'REMOVE_UPDATE_PARTITION' checks partition type '1' but GAME_PARTITION_TYPE is defined as '1'.It seems that the correct definition is:
Moreover there is no need for ONLY_GAME_PARTITION because (the corrected) GAME_PARTITION_TYPE does the same.
P.S.: I have already renamed test_parition_skip() to test_partition_skip().
Code:
typedef enum
{
ÂÂÂÂUPDATE_PARTITION_TYPEÂÂÂÂÂÂÂÂ= 0,
ÂÂÂÂGAME_PARTITION_TYPE,
ÂÂÂÂOTHER_PARTITION_TYPE,
ÂÂÂÂ// value in between selects partition types of that value
ÂÂÂÂALL_PARTITIONSÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ= 0xffffffff-3,
ÂÂÂÂREMOVE_UPDATE_PARTITION,ÂÂÂÂÂÂÂÂ// keeps game + channel installers
ÂÂÂÂONLY_GAME_PARTITION,
} partition_selector_t;
Code:
static int test_partition_skip ( u32 partition_type, partition_selector_t part_sel )
{
ÂÂÂÂswitch (part_sel)
ÂÂÂÂ{
ÂÂÂÂÂÂÂÂcase ALL_PARTITIONS:
ÂÂÂÂÂÂÂÂÂÂÂÂreturn 0;
ÂÂÂÂÂÂÂÂcase REMOVE_UPDATE_PARTITION:
ÂÂÂÂÂÂÂÂÂÂÂÂreturn (partition_type==1);
ÂÂÂÂÂÂÂÂcase ONLY_GAME_PARTITION:
ÂÂÂÂÂÂÂÂÂÂÂÂreturn (partition_type!=0);
ÂÂÂÂÂÂÂÂdefault:
ÂÂÂÂÂÂÂÂÂÂÂÂreturn (partition_type!=part_sel);
ÂÂÂÂ}
}
In detail:[*]test_partition_skip() returns 1 if the partition should be skipped (not selected).[*]'ONLY_GAME_PARTITION' checks partition type '0' but 'UPDATE_PARTITION_TYPE' is defined as '0'.[*]'REMOVE_UPDATE_PARTITION' checks partition type '1' but GAME_PARTITION_TYPE is defined as '1'.It seems that the correct definition is:
Code:
typedef enum
{
ÂÂÂÂGAME_PARTITION_TYPEÂÂ = 0,
ÂÂÂÂUPDATE_PARTITION_TYPE = 1,
ÂÂÂÂ...
P.S.: I have already renamed test_parition_skip() to test_partition_skip().