return 0;
}
- engine->mount(mountKey, getOptions());
- mountKey.clear();
+ try {
+ INFO(SINK, "Mount internal storage...");
+ engine->mount(mountKey, getOptions());
+ mountKey.clear();
- context.notify("InternalEncryption::mount");
+ context.notify("InternalEncryption::mount");
- runtime::File("/tmp/.lazy_mount").create(O_WRONLY);
- runtime::File("/tmp/.unlock_mnt").create(O_WRONLY);
+ runtime::File("/tmp/.lazy_mount").create(O_WRONLY);
+ runtime::File("/tmp/.unlock_mnt").create(O_WRONLY);
+ } catch (runtime::Exception &e) {
+ ERROR(SINK, "Mount failed - " + std::string(e.what()));
+ return -1;
+ }
return 0;
}
return 0;
}
- INFO(SINK, "Close all processes using internal storage...");
- stopDependedSystemdServices();
- INFO(SINK, "Umount internal storage...");
- engine->umount();
+ try {
+ INFO(SINK, "Close all processes using internal storage...");
+ stopDependedSystemdServices();
+ INFO(SINK, "Umount internal storage...");
+ engine->umount();
+ } catch (runtime::Exception &e) {
+ ERROR(SINK, "Umount failed - " + std::string(e.what()));
+ return -1;
+ }
return 0;
}