Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gnome-boxes
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GNOME
gnome-boxes
Commits
b4c67e4a
Commit
b4c67e4a
authored
Mar 9, 2023
by
Felipe Borges
Browse files
Options
Downloads
Patches
Plain Diff
vm-configurator: Always enable boot menu
parent
18dd69d4
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/vm-configurator.vala
+3
-16
3 additions, 16 deletions
src/vm-configurator.vala
with
3 additions
and
16 deletions
src/vm-configurator.vala
+
3
−
16
View file @
b4c67e4a
...
...
@@ -261,7 +261,6 @@ public static async void update_existing_domain (Domain domain,
private
static
void
update_domain_devices
(
Domain
domain
)
throws
GLib
.
Error
{
GLib
.
List
<
GVirConfig
.
DomainDevice
>
devices
=
null
;
DomainInterface
iface
=
null
;
bool
supports_alternative_boot_device
=
false
;
foreach
(
var
device
in
domain
.
get_devices
())
{
// Let's always re-create the graphics device, so we can switch from SPICE
// to VNC and back according to SPICE's availability in the build.
...
...
@@ -300,8 +299,6 @@ else if (device is DomainDisk) {
if
(!
FileUtils
.
test
(
domain_disk
.
get_source
(),
FileTest
.
EXISTS
))
{
debug
(
"CDROM media '%s' cannot be found"
,
domain_disk
.
get_source
());
domain_disk
.
set_source
(
""
);
}
else
{
supports_alternative_boot_device
=
true
;
}
}
}
...
...
@@ -337,25 +334,12 @@ else if (device is DomainDisk) {
}
}
enable_boot_menu
(
domain
,
supports_alternative_boot_device
);
devices
.
reverse
();
domain
.
set_devices
(
devices
);
debug
(
"Updating domain devices for %s"
,
domain
.
name
);
}
public
static
void
enable_boot_menu
(
Domain
domain
,
bool
enable
)
{
try
{
var
os
=
new
DomainOs
.
from_xml
(
domain
.
get_os
().
to_xml
());
os
.
enable_boot_menu
(
enable
);
domain
.
set_os
(
os
);
}
catch
(
GLib
.
Error
error
)
{
warning
(
"Failed to enable boot menu\n"
);
}
}
public
static
void
set_target_media_config
(
Domain
domain
,
string
target_path
,
InstallerMedia
install_media
,
...
...
@@ -401,6 +385,7 @@ private static void set_post_install_os_config (Domain domain) {
var
boot_devices
=
old_os
.
get_boot_devices
();
boot_devices
.
remove
(
DomainOsBootDevice
.
CDROM
);
os
.
set_boot_devices
(
boot_devices
);
os
.
enable_boot_menu
(
true
);
os
.
set_arch
(
old_os
.
get_arch
());
os
.
set_machine
(
old_os
.
get_machine
());
...
...
@@ -429,6 +414,8 @@ private static void set_os_config (Domain domain, InstallerMedia install_media,
boot_devices
.
append
(
DomainOsBootDevice
.
HD
);
os
.
set_boot_devices
(
boot_devices
);
os
.
enable_boot_menu
(
true
);
domain
.
set_os
(
os
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment