Lines Matching defs:idHash

142 static int setupLoopDevice(char* buffer, size_t len, const char* asecFileName, const char* idHash, bool debug) {
143 if (Loop::lookupActive(idHash, buffer, len)) {
144 if (Loop::create(idHash, asecFileName, buffer, len)) {
159 static int setupDevMapperDevice(char* buffer, size_t len, const char* loopDevice, const char* asecFileName, const char* key, const char* idHash , unsigned long numImgSectors, bool* createdDMDevice, bool debug) {
161 if (Devmapper::lookupActive(idHash, buffer, len)) {
162 if (Devmapper::create(idHash, loopDevice, key, numImgSectors,
684 char idHash[33];
685 if (!asecHash(sourceFile, idHash, sizeof(idHash))) {
691 int written = snprintf(mountPath, mountPathLen, "%s/%s", VolumeManager::LOOPDIR, idHash);
833 char idHash[33];
834 if (!asecHash(id, idHash, sizeof(idHash))) {
841 if (Loop::create(idHash, asecFileName, loopDevice, sizeof(loopDevice))) {
853 if (Devmapper::create(idHash, loopDevice, key, numImgSectors, dmDevice,
871 Devmapper::destroy(idHash);
886 Devmapper::destroy(idHash);
902 Devmapper::destroy(idHash);
913 Devmapper::destroy(idHash);
933 Devmapper::destroy(idHash);
1064 char idHash[33];
1065 if (!asecHash(id, idHash, sizeof(idHash))) {
1071 if (setupLoopDevice(loopDevice, sizeof(loopDevice), asecFileName, idHash, mDebug))
1076 if (setupDevMapperDevice(dmDevice, sizeof(dmDevice), loopDevice, asecFileName, key, idHash, numImgSectors, &cleanupDm, mDebug)) {
1089 Devmapper::destroy(idHash);
1117 char idHash[33];
1118 if (!asecHash(id, idHash, sizeof(idHash))) {
1123 if (Loop::lookupActive(idHash, loopDevice, sizeof(loopDevice))) {
1182 char idHash[33];
1183 if (!asecHash(id, idHash, sizeof(idHash))) {
1188 if (Loop::lookupActive(idHash, loopDevice, sizeof(loopDevice))) {
1381 char idHash[33];
1382 if (!asecHash(id, idHash, sizeof(idHash))) {
1387 return unmountLoopImage(id, idHash, asecFileName, mountPoint, force);
1393 char idHash[33];
1394 if (!asecHash(fileName, idHash, sizeof(idHash))) {
1399 int written = snprintf(mountPoint, sizeof(mountPoint), "%s/%s", VolumeManager::LOOPDIR, idHash);
1405 return unmountLoopImage(fileName, idHash, fileName, mountPoint, force);
1408 int VolumeManager::unmountLoopImage(const char *id, const char *idHash,
1465 if (Devmapper::destroy(idHash) && errno != ENXIO) {
1475 if (!Loop::lookupActive(idHash, loopDevice, sizeof(loopDevice))) {
1655 char idHash[33];
1656 if (!asecHash(id, idHash, sizeof(idHash))) {
1662 if (setupLoopDevice(loopDevice, sizeof(loopDevice), asecFileName, idHash, mDebug))
1686 if (setupDevMapperDevice(dmDevice, sizeof(dmDevice), loopDevice, asecFileName, key, idHash , nr_sec, &cleanupDm, mDebug)) {
1695 Devmapper::destroy(idHash);
1719 Devmapper::destroy(idHash);
1738 char idHash[33];
1739 if (!asecHash(img, idHash, sizeof(idHash))) {
1744 int written = snprintf(mountPoint, sizeof(mountPoint), "%s/%s", VolumeManager::LOOPDIR, idHash);
1757 if (setupLoopDevice(loopDevice, sizeof(loopDevice), img, idHash, mDebug))
1781 if (setupDevMapperDevice(dmDevice, sizeof(loopDevice), loopDevice, img,key, idHash, nr_sec, &cleanupDm, mDebug)) {
1790 Devmapper::destroy(idHash);
1806 Devmapper::destroy(idHash);