Skip to content

Commit

Permalink
fsm: Add ni_ifworker_is_factory_device() function
Browse files Browse the repository at this point in the history
This function is supposed to tell whether ifworker
reflects factory device not created yet.
  • Loading branch information
wipawel committed Jun 6, 2014
1 parent 6715768 commit db0a792
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/wicked/fsm.h
Expand Up @@ -388,4 +388,11 @@ ni_ifworker_is_valid_state(ni_fsm_state_t state)
state < __NI_FSM_STATE_MAX;
}

static inline ni_bool_t
ni_ifworker_is_factory_device(ni_ifworker_t *w)
{
return !w->device && (w->device_api.factory_service &&
w->device_api.factory_method);
}

#endif /* __CLIENT_FSM_H__ */

0 comments on commit db0a792

Please sign in to comment.