- combine State::CorruptedEncryption and State::CorruptedDecryption with State::Corrupted
to avoid build break since State::Corrupted is used in other packages.
Change-Id: I14ba9ee1c51dc35240a7151f7ddf545453555ced
Signed-off-by: seolheui kim <s414.kim@samsung.com>
typedef enum {
ODE_STATE_UNENCRYPTED = 0x00, /**< Device is not encrypted */
ODE_STATE_ENCRYPTED = 0x01, /**< Device is encrypted */
- ODE_STATE_CORRUPTED_ENCRYPTION = 0x02, /**< Device is corrupted because of encryption error */
- ODE_STATE_CORRUPTED_DECRYPTION = 0x03, /**< Device is corrupted becouse of decryption error */
+ ODE_STATE_CORRUPTED = 0x02, /**< Device is corrupted because of encryption error */
} ode_state_e;
/**
enum State {
Unencrypted = 0x00,
Encrypted = 0x01,
- CorruptedEncryption = 0x02,
- CorruptedDecryption = 0x03,
- Invalid = 0x04,
+ Corrupted = 0x02,
+ Invalid = 0x03,
};
virtual int getState() = 0;
enum State {
Unencrypted = 0x00,
Encrypted = 0x01,
- CorruptedEncryption = 0x02,
- CorruptedDecryption = 0x03,
- Invalid = 0x04,
+ Corrupted = 0x02,
+ Invalid = 0x03,
};
virtual int getState() = 0;
return State::Encrypted;
else if (valueStr == "unencrypted")
return State::Unencrypted;
- else if (valueStr == "error_partially_encrypted")
- return State::CorruptedEncryption;
- else if (valueStr == "error_partially_decrypted")
- return State::CorruptedDecryption;
+ else if (valueStr == "error_partially_encrypted" || valueStr == "error_partially_decrypted")
+ return State::Corrupted;
return State::Invalid;
}
if (state == State::Unencrypted)
return error::NoSuchDevice;
- if (state == State::CorruptedEncryption || state == State::CorruptedDecryption)
+ if (state == State::Corrupted)
Ext4Tool::mkfs(engine->getSource());
std::fstream fs;
return State::Encrypted;
else if (valueStr == "unencrypted")
return State::Unencrypted;
- else if (valueStr == "error_partially_encrypted")
- return State::CorruptedEncryption;
- else if (valueStr == "error_partially_decrypted")
- return State::CorruptedDecryption;
+ else if (valueStr == "error_partially_encrypted" || valueStr == "error_partially_decrypted")
+ return State::Corrupted;
return State::Invalid;
}
case ODE_STATE_UNENCRYPTED:
std::cout << "Unencrypted";
break;
- case ODE_STATE_CORRUPTED_ENCRYPTION:
- std::cout << "Corrupted Encryption";
- break;
- case ODE_STATE_CORRUPTED_DECRYPTION:
- std::cout << "Corrupted Decryption";
+ case ODE_STATE_CORRUPTED:
+ std::cout << "Corrupted";
break;
default:
std::cout << "Invalid";