diff options
author | kn <kn@cvs.openbsd.org> | 2020-03-07 18:51:07 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2020-03-07 18:51:07 +0000 |
commit | 1c5e33bbd530aa2fcb4fb3c484ec04b9ad53ac90 (patch) | |
tree | 1b3a7c566b0fc6da6d3be2969fd44c4136d22214 /usr.sbin | |
parent | 0c0e5fb4773da38d5b9945882eea829d59375441 (diff) |
Initialise only the components list for "list-io"
Nothing else is needed and pri_init() actually writes to the PRI file
whereas pri_init_components() only reads (as expected in this code path).
This allows listing IO devices from PRI files that are read-only;
I noticed this by having the "factory-default" configuration protected
with the system immutable flag "schg", see chflags(1).
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ldomctl/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c index c109b6b1818..4b347fcad32 100644 --- a/usr.sbin/ldomctl/config.c +++ b/usr.sbin/ldomctl/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.34 2020/02/21 19:39:28 kn Exp $ */ +/* $OpenBSD: config.c,v 1.35 2020/03/07 18:51:06 kn Exp $ */ /* * Copyright (c) 2012, 2018 Mark Kettenis @@ -2887,7 +2887,7 @@ list_components(void) if (pri == NULL) err(1, "unable to get PRI"); - pri_init(pri); + pri_init_components(pri); TAILQ_FOREACH(component, &components, link) { printf("%s\n", component->path); |