1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-22 18:26:39 +00:00

Use BITL macro from libnx.

This commit is contained in:
Pablo Curiel 2023-07-10 18:06:34 +02:00
parent eb4bdbf27a
commit 51b17f35fe
4 changed files with 48 additions and 50 deletions

View file

@ -282,7 +282,7 @@ typedef enum {
} NacpRequiredNetworkServiceLicenseOnLaunch;
typedef enum {
NacpJitConfigurationFlag_Enabled = BIT_LONG(0),
NacpJitConfigurationFlag_Enabled = BITL(0),
NacpJitConfigurationFlag_Count = 1 ///< Total values supported by this enum.
} NacpJitConfigurationFlag;

View file

@ -153,47 +153,47 @@ typedef struct {
NXDT_ASSERT(NpdmAciHeader, 0x40);
typedef enum {
NpdmFsAccessControlFlags_ApplicationInfo = BIT_LONG(0),
NpdmFsAccessControlFlags_BootModeControl = BIT_LONG(1),
NpdmFsAccessControlFlags_Calibration = BIT_LONG(2),
NpdmFsAccessControlFlags_SystemSaveData = BIT_LONG(3),
NpdmFsAccessControlFlags_GameCard = BIT_LONG(4),
NpdmFsAccessControlFlags_SaveDataBackUp = BIT_LONG(5),
NpdmFsAccessControlFlags_SaveDataManagement = BIT_LONG(6),
NpdmFsAccessControlFlags_BisAllRaw = BIT_LONG(7),
NpdmFsAccessControlFlags_GameCardRaw = BIT_LONG(8),
NpdmFsAccessControlFlags_GameCardPrivate = BIT_LONG(9),
NpdmFsAccessControlFlags_SetTime = BIT_LONG(10),
NpdmFsAccessControlFlags_ContentManager = BIT_LONG(11),
NpdmFsAccessControlFlags_ImageManager = BIT_LONG(12),
NpdmFsAccessControlFlags_CreateSaveData = BIT_LONG(13),
NpdmFsAccessControlFlags_SystemSaveDataManagement = BIT_LONG(14),
NpdmFsAccessControlFlags_BisFileSystem = BIT_LONG(15),
NpdmFsAccessControlFlags_SystemUpdate = BIT_LONG(16),
NpdmFsAccessControlFlags_SaveDataMeta = BIT_LONG(17),
NpdmFsAccessControlFlags_DeviceSaveData = BIT_LONG(18),
NpdmFsAccessControlFlags_SettingsControl = BIT_LONG(19),
NpdmFsAccessControlFlags_SystemData = BIT_LONG(20),
NpdmFsAccessControlFlags_SdCard = BIT_LONG(21),
NpdmFsAccessControlFlags_Host = BIT_LONG(22),
NpdmFsAccessControlFlags_FillBis = BIT_LONG(23),
NpdmFsAccessControlFlags_CorruptSaveData = BIT_LONG(24),
NpdmFsAccessControlFlags_SaveDataForDebug = BIT_LONG(25),
NpdmFsAccessControlFlags_FormatSdCard = BIT_LONG(26),
NpdmFsAccessControlFlags_GetRightsId = BIT_LONG(27),
NpdmFsAccessControlFlags_RegisterExternalKey = BIT_LONG(28),
NpdmFsAccessControlFlags_RegisterUpdatePartition = BIT_LONG(29),
NpdmFsAccessControlFlags_SaveDataTransfer = BIT_LONG(30),
NpdmFsAccessControlFlags_DeviceDetection = BIT_LONG(31),
NpdmFsAccessControlFlags_AccessFailureResolution = BIT_LONG(32),
NpdmFsAccessControlFlags_SaveDataTransferVersion2 = BIT_LONG(33),
NpdmFsAccessControlFlags_RegisterProgramIndexMapInfo = BIT_LONG(34),
NpdmFsAccessControlFlags_CreateOwnSaveData = BIT_LONG(35),
NpdmFsAccessControlFlags_MoveCacheStorage = BIT_LONG(36),
NpdmFsAccessControlFlags_DeviceTreeBlob = BIT_LONG(37),
NpdmFsAccessControlFlags_NotifyErrorContextServiceReady = BIT_LONG(38),
NpdmFsAccessControlFlags_Debug = BIT_LONG(62),
NpdmFsAccessControlFlags_FullPermission = BIT_LONG(63)
NpdmFsAccessControlFlags_ApplicationInfo = BITL(0),
NpdmFsAccessControlFlags_BootModeControl = BITL(1),
NpdmFsAccessControlFlags_Calibration = BITL(2),
NpdmFsAccessControlFlags_SystemSaveData = BITL(3),
NpdmFsAccessControlFlags_GameCard = BITL(4),
NpdmFsAccessControlFlags_SaveDataBackUp = BITL(5),
NpdmFsAccessControlFlags_SaveDataManagement = BITL(6),
NpdmFsAccessControlFlags_BisAllRaw = BITL(7),
NpdmFsAccessControlFlags_GameCardRaw = BITL(8),
NpdmFsAccessControlFlags_GameCardPrivate = BITL(9),
NpdmFsAccessControlFlags_SetTime = BITL(10),
NpdmFsAccessControlFlags_ContentManager = BITL(11),
NpdmFsAccessControlFlags_ImageManager = BITL(12),
NpdmFsAccessControlFlags_CreateSaveData = BITL(13),
NpdmFsAccessControlFlags_SystemSaveDataManagement = BITL(14),
NpdmFsAccessControlFlags_BisFileSystem = BITL(15),
NpdmFsAccessControlFlags_SystemUpdate = BITL(16),
NpdmFsAccessControlFlags_SaveDataMeta = BITL(17),
NpdmFsAccessControlFlags_DeviceSaveData = BITL(18),
NpdmFsAccessControlFlags_SettingsControl = BITL(19),
NpdmFsAccessControlFlags_SystemData = BITL(20),
NpdmFsAccessControlFlags_SdCard = BITL(21),
NpdmFsAccessControlFlags_Host = BITL(22),
NpdmFsAccessControlFlags_FillBis = BITL(23),
NpdmFsAccessControlFlags_CorruptSaveData = BITL(24),
NpdmFsAccessControlFlags_SaveDataForDebug = BITL(25),
NpdmFsAccessControlFlags_FormatSdCard = BITL(26),
NpdmFsAccessControlFlags_GetRightsId = BITL(27),
NpdmFsAccessControlFlags_RegisterExternalKey = BITL(28),
NpdmFsAccessControlFlags_RegisterUpdatePartition = BITL(29),
NpdmFsAccessControlFlags_SaveDataTransfer = BITL(30),
NpdmFsAccessControlFlags_DeviceDetection = BITL(31),
NpdmFsAccessControlFlags_AccessFailureResolution = BITL(32),
NpdmFsAccessControlFlags_SaveDataTransferVersion2 = BITL(33),
NpdmFsAccessControlFlags_RegisterProgramIndexMapInfo = BITL(34),
NpdmFsAccessControlFlags_CreateOwnSaveData = BITL(35),
NpdmFsAccessControlFlags_MoveCacheStorage = BITL(36),
NpdmFsAccessControlFlags_DeviceTreeBlob = BITL(37),
NpdmFsAccessControlFlags_NotifyErrorContextServiceReady = BITL(38),
NpdmFsAccessControlFlags_Debug = BITL(62),
NpdmFsAccessControlFlags_FullPermission = BITL(63)
} NpdmFsAccessControlFlags;
/// FsAccessControl descriptor. Part of the ACID section body.

View file

@ -30,8 +30,6 @@
#define MAX_ELEMENTS(x) ((sizeof((x))) / (sizeof((x)[0])))
#define BIT_LONG(n) (1UL << (n))
#define ALIGN_UP(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
#define ALIGN_DOWN(x, y) ((x) & ~((y) - 1))
#define IS_ALIGNED(x, y) (((x) & ((y) - 1)) == 0)

View file

@ -46,12 +46,12 @@ typedef enum {
} GameCardStorageArea;
typedef enum {
GameCardCapacity_1GiB = BIT_LONG(30),
GameCardCapacity_2GiB = BIT_LONG(31),
GameCardCapacity_4GiB = BIT_LONG(32),
GameCardCapacity_8GiB = BIT_LONG(33),
GameCardCapacity_16GiB = BIT_LONG(34),
GameCardCapacity_32GiB = BIT_LONG(35)
GameCardCapacity_1GiB = BITL(30),
GameCardCapacity_2GiB = BITL(31),
GameCardCapacity_4GiB = BITL(32),
GameCardCapacity_8GiB = BITL(33),
GameCardCapacity_16GiB = BITL(34),
GameCardCapacity_32GiB = BITL(35)
} GameCardCapacity;
/* Global variables. */