@@ -34,32 +34,32 @@ bool CRYPT_CIPHER_Support::supportAllcrypt(CRYPT_CIPHER_Support::Support x)
3434
3535QDBusArgument &operator <<(QDBusArgument &argument, const CRYPT_CIPHER_Support &data)
3636{
37- qDebug () << " Starting CRYPT_CIPHER_Support serialization" ;
37+ // qDebug() << "Starting CRYPT_CIPHER_Support serialization";
3838 argument.beginStructure ();
3939 argument << static_cast <int >(data.aes_xts_plain64 )
4040 << static_cast <int >(data.sm4_xts_plain64 );
4141 argument.endStructure ();
42- qDebug () << " Completed CRYPT_CIPHER_Support serialization" ;
42+ // qDebug() << "Completed CRYPT_CIPHER_Support serialization";
4343 return argument;
4444}
4545
4646const QDBusArgument &operator >>(const QDBusArgument &argument, CRYPT_CIPHER_Support &data)
4747{
48- qDebug () << " Starting CRYPT_CIPHER_Support deserialization" ;
48+ // qDebug() << "Starting CRYPT_CIPHER_Support deserialization";
4949 argument.beginStructure ();
5050 int aes, sm4;
5151 argument >> aes
5252 >> sm4;
5353 data.aes_xts_plain64 = static_cast <CRYPT_CIPHER_Support::Support>(aes);
5454 data.sm4_xts_plain64 = static_cast <CRYPT_CIPHER_Support::Support>(sm4);
5555 argument.endStructure ();
56- qDebug () << " Completed CRYPT_CIPHER_Support deserialization" ;
56+ // qDebug() << "Completed CRYPT_CIPHER_Support deserialization";
5757 return argument;
5858}
5959/* ********************************** LUKS_MapperInfo *********************************************/
6060QDBusArgument &operator <<(QDBusArgument &argument, const LUKS_MapperInfo &data)
6161{
62- qDebug () << " Starting LUKS_MapperInfo serialization" ;
62+ // qDebug() << "Starting LUKS_MapperInfo serialization";
6363 argument.beginStructure ();
6464 argument << static_cast <int >(data.m_luksFs )
6565 << data.m_mountPoints
@@ -79,13 +79,13 @@ QDBusArgument &operator<<(QDBusArgument &argument, const LUKS_MapperInfo &data)
7979 << data.m_fsLimits .min_size
8080 << data.m_fileSystemLabel ;
8181 argument.endStructure ();
82- qDebug () << " Completed LUKS_MapperInfo serialization" ;
82+ // qDebug() << "Completed LUKS_MapperInfo serialization";
8383 return argument;
8484}
8585
8686const QDBusArgument &operator >>(const QDBusArgument &argument, LUKS_MapperInfo &data)
8787{
88- qDebug () << " Starting LUKS_MapperInfo deserialization" ;
88+ // qDebug() << "Starting LUKS_MapperInfo deserialization";
8989 argument.beginStructure ();
9090 int luksFlag, vgFlag, cipher;
9191 argument >> luksFlag
@@ -109,13 +109,13 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, LUKS_MapperInfo &
109109 data.m_vgflag = static_cast <LVMFlag>(vgFlag);
110110 data.m_crypt = static_cast <CRYPT_CIPHER>(cipher);
111111 argument.endStructure ();
112- qDebug () << " Completed LUKS_MapperInfo deserialization" ;
112+ // qDebug() << "Completed LUKS_MapperInfo deserialization";
113113 return argument;
114114}
115115/* ********************************** LUKS_INFO *********************************************/
116116QDBusArgument &operator <<(QDBusArgument &argument, const LUKS_INFO &data)
117117{
118- qDebug () << " Starting LUKS_INFO serialization" ;
118+ // qDebug() << "Starting LUKS_INFO serialization";
119119 argument.beginStructure ();
120120 argument << data.m_mapper
121121 << data.m_devicePath
@@ -132,13 +132,13 @@ QDBusArgument &operator<<(QDBusArgument &argument, const LUKS_INFO &data)
132132 << data.m_Suspend
133133 << data.m_fileSystemLabel ;
134134 argument.endStructure ();
135- qDebug () << " Completed LUKS_INFO serialization" ;
135+ // qDebug() << "Completed LUKS_INFO serialization";
136136 return argument;
137137}
138138
139139const QDBusArgument &operator >>(const QDBusArgument &argument, LUKS_INFO &data)
140140{
141- qDebug () << " Starting LUKS_INFO deserialization" ;
141+ // qDebug() << "Starting LUKS_INFO deserialization";
142142 argument.beginStructure ();
143143 int crypt, cryptErr;
144144 argument >> data.m_mapper
@@ -158,26 +158,26 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, LUKS_INFO &data)
158158 data.m_crypt = static_cast <CRYPT_CIPHER>(crypt);
159159 data.m_cryptErr = static_cast <CRYPTError>(cryptErr);
160160 argument.endStructure ();
161- qDebug () << " Completed LUKS_INFO deserialization" ;
161+ // qDebug() << "Completed LUKS_INFO deserialization";
162162 return argument;
163163}
164164/* ********************************** LUKSMap ************************************************/
165165QDBusArgument &operator <<(QDBusArgument &argument, const LUKSMap &data)
166166{
167- qDebug () << " Starting LUKSMap serialization" ;
167+ // qDebug() << "Starting LUKSMap serialization";
168168 argument.beginStructure ();
169169 argument << data.m_luksMap
170170 << data.m_mapper
171171 << static_cast <int >(data.m_cryErr )
172172 << data.m_cryptSuuport ;
173173 argument.endStructure ();
174- qDebug () << " Completed LUKSMap serialization" ;
174+ // qDebug() << "Completed LUKSMap serialization";
175175 return argument;
176176}
177177
178178const QDBusArgument &operator >>(const QDBusArgument &argument, LUKSMap &data)
179179{
180- qDebug () << " Starting LUKSMap deserialization" ;
180+ // qDebug() << "Starting LUKSMap deserialization";
181181 argument.beginStructure ();
182182 int cryptErr;
183183 argument >> data.m_luksMap
@@ -186,7 +186,7 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, LUKSMap &data)
186186 >> data.m_cryptSuuport ;
187187 data.m_cryErr = static_cast <CRYPTError>(cryptErr);
188188 argument.endStructure ();
189- qDebug () << " Completed LUKSMap deserialization" ;
189+ // qDebug() << "Completed LUKSMap deserialization";
190190 return argument;
191191}
192192
@@ -205,6 +205,7 @@ bool LUKSMap::mapperExists(const QString &path) const
205205
206206 foreach (const LUKS_MapperInfo &tmp, m_mapper) {
207207 if (tmp.m_dmPath == path) {
208+ // qDebug() << "Mapper found by dmPath for path:" << path;
208209 return true ;
209210 }
210211 }
@@ -247,8 +248,10 @@ bool LUKSMap::deviceExists(const QString &dev) const
247248
248249LUKS_MapperInfo LUKSMap::getMapper (const QString &path) const
249250{
251+ // qDebug() << "Getting mapper for path:" << path;
250252 foreach (const LUKS_MapperInfo &tmp, m_mapper) {
251253 if (tmp.m_dmPath == path || tmp.m_devicePath == path) {
254+ qDebug () << " Mapper found for path:" << path;
252255 return tmp;
253256 }
254257 }
@@ -258,6 +261,7 @@ LUKS_MapperInfo LUKSMap::getMapper(const QString &path) const
258261
259262LUKS_MapperInfo LUKSMap::getMapper (const LUKS_MapperInfo &mapper) const
260263{
264+ // qDebug() << "Getting mapper for device path:" << mapper.m_devicePath;
261265 return getMapper (mapper.m_devicePath );
262266}
263267
@@ -271,19 +275,22 @@ bool LUKSMap::luksExists(const QString &devPath) const
271275
272276LUKS_INFO LUKSMap::getLUKS (const QString &path) const
273277{
278+ // qDebug() << "Getting LUKS for path:" << path;
274279 QString devicePath = deviceExists (path) ? path : getDevPath (path);
275280 return getItem (devicePath, m_luksMap);
276281}
277282
278283template <class T >
279284bool LUKSMap::itemExists (const QString &str, const QMap<QString, T> &containers)const
280285{
286+ // qDebug() << "Checking existence of item:" << str;
281287 return containers.find (str) != containers.end ();
282288}
283289
284290template <class T >
285291T LUKSMap::getItem (const QString &str, const QMap<QString, T> &containers)const
286292{
293+ // qDebug() << "Getting item:" << str;
287294 return itemExists (str, containers) ? *containers.find (str) : T ();
288295}
289296
0 commit comments