diff --git a/src/libcalamares/partition/AutoMount.cpp b/src/libcalamares/partition/AutoMount.cpp index 29fbfea5f..984662960 100644 --- a/src/libcalamares/partition/AutoMount.cpp +++ b/src/libcalamares/partition/AutoMount.cpp @@ -68,12 +68,12 @@ querySolidAutoMount( QDBusConnection& dbus, AutoMountInfo& info ) } std::unique_ptr< AutoMountInfo > -automountDisable() +automountDisable( bool disable ) { auto u = std::make_unique< AutoMountInfo >(); QDBusConnection dbus = QDBusConnection::sessionBus(); querySolidAutoMount( dbus, *u ); - enableSolidAutoMount( dbus, false ); + enableSolidAutoMount( dbus, !disable ); return u; } diff --git a/src/libcalamares/partition/AutoMount.h b/src/libcalamares/partition/AutoMount.h index ecb1780a0..b77bdbae6 100644 --- a/src/libcalamares/partition/AutoMount.h +++ b/src/libcalamares/partition/AutoMount.h @@ -30,10 +30,13 @@ struct AutoMountInfo; * steps (create table, create partition, set partition flags) which are * blocked if the partition gets mounted partway through the operation. * + * @param disable set this to false to reverse the sense of the function + * call and force *enabling* automount, instead. + * * Returns an opaque structure which can be passed to automountRestore() * to return the system to the previously-configured automount settings. */ -DLLEXPORT std::unique_ptr< AutoMountInfo > automountDisable(); +DLLEXPORT std::unique_ptr< AutoMountInfo > automountDisable( bool disable = true ); /** @brief Restore automount settings *