]>
git.proxmox.com Git - ceph.git/blob - ceph/src/mon/CommandHandler.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2019 Red Hat Ltd
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
16 #ifndef COMMAND_HANDLER_H_
17 #define COMMAND_HANDLER_H_
20 #include <string_view>
26 * Parse true|yes|1 style boolean string from `bool_str`
27 * `result` must be non-null.
28 * `ss` will be populated with error message on error.
30 * @return 0 on success, else -EINVAL
32 int parse_bool(std::string_view str
, bool* result
, std::ostream
& ss
);