HomeClusterLabs Projects

Refactor: fencer: Best practices in get_stonith_flag()

Description

Refactor: fencer: Best practices in get_stonith_flag()

  • Add Doxygen.
  • Return an enum value rather than a uint64_t value.
  • Rename to fenced_parse_notify_flag() in accordance with our current convention for flag parsing functions.
  • Rename "name" argument to "type".
  • Replace "else if" with "if" where possible.
  • Match case-sensitively. STONITH_OP_DEVICE_ADD and STONITH_OP_DEVICE_DEL may be coming from an arbitrary request. However, if the user is making the request via the stonith API functions (as any sane user should be), then the case will always match exactly.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Thu, Apr 10, 2:47 AM
Parents
rPb88c65dc9c2f: Refactor: fencer: New fenced_nf_history_synced flag
Branches
Unknown
Tags
Unknown