This will be useful when we want to issue a resize operation right when
activating, where the HomeSetup object should be destroyed only after
both activation is done.
if (r < 0)
return r;
- r = home_setup_done(setup);
- if (r < 0)
- return r;
+ if (!FLAGS_SET(flags, HOME_SETUP_RESIZE_DONT_UNDO)) {
+ r = home_setup_done(setup);
+ if (r < 0)
+ return r;
+ }
log_info("Everything completed.");
HOME_SETUP_RESIZE_MINIMIZE = 1 << 3, /* Shrink to minimal size */
HOME_SETUP_RESIZE_DONT_GROW = 1 << 4, /* If the resize would grow, gracefully terminate operation */
HOME_SETUP_RESIZE_DONT_SHRINK = 1 << 5, /* If the resize would shrink, gracefully terminate operation */
+ HOME_SETUP_RESIZE_DONT_UNDO = 1 << 6, /* Leave loopback/DM device context open after successful operation */
} HomeSetupFlags;
int home_setup_done(HomeSetup *setup);