For example:
# ./rbd map -o share,noshare foo
rbd: warning: redefining map option share: 'share' -> 'noshare'
/dev/rbd0
mount(8) doesn't do this and it's a bit silly to begin with. Drop this
in preparation for adding rbd default map options config option.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
static void put_map_option(const string key, string val)
{
- map<string, string>::const_iterator it = map_options.find(key);
- if (it != map_options.end()) {
- cerr << "rbd: warning: redefining map option " << key << ": '"
- << it->second << "' -> '" << val << "'" << std::endl;
- }
map_options[key] = val;
}