summaryrefslogtreecommitdiffstats
path: root/ui/twin/main-generic.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-04-10 12:19:13 +1000
committerGeoff Levand <geoff@infradead.org>2013-04-10 10:49:20 -0700
commit37428306a270088bfcb1f94362a0fe5b7a5a888e (patch)
tree5d1aeca3eca44b68a8f8939e3bea44709a953aa9 /ui/twin/main-generic.c
parentee86a0bd989511319adf3467b41b5b2e1f486aa6 (diff)
downloadtalos-petitboot-37428306a270088bfcb1f94362a0fe5b7a5a888e.tar.gz
talos-petitboot-37428306a270088bfcb1f94362a0fe5b7a5a888e.zip
waiter: Don't rely on global variables to keep waiter state
Rather than defining the set of waiters (and pollfds) in waiter.c, add a struct waitset to contain these. A waitset is created with waitset_create, which is passed to the waiter_* functions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'ui/twin/main-generic.c')
-rw-r--r--ui/twin/main-generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/twin/main-generic.c b/ui/twin/main-generic.c
index 91a525b..8ed46b7 100644
--- a/ui/twin/main-generic.c
+++ b/ui/twin/main-generic.c
@@ -215,7 +215,7 @@ static int kexec_cb(struct pbt_client *client, struct pb_opt_data *opt_data)
static int run(struct pbt_client *client)
{
while (1) {
- int result = waiter_poll();
+ int result = waiter_poll(client->waitset);
if (result < 0 && errno != EINTR) {
pb_log("%s: poll: %s\n", __func__, strerror(errno));
OpenPOWER on IntegriCloud