Guard print_error_description() and get_unsupported_features() with
`#ifdef WITH_KRBD` to prevent compiler warnings when KRBD support is
not enabled.
These functions are only called by do_kernel_map(), which is itself
conditionally compiled. When WITH_KRBD is not defined, the compiler
generates unused function warnings for these helper functions.
Fixes warning:
```
/home/kefu/dev/ceph/src/tools/rbd/action/Kernel.cc:305:13: warning: ‘void rbd::action::kernel::print_error_description(const char*, const char*, const char*, const char*, int)’ defined but not used [-Wunused-function]
305 | static void print_error_description(const char *poolname,
| ^~~~~~~~~~~~~~~~~~~~~~~
```
this silences the warning.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
#endif
}
+#ifdef WITH_KRBD
static int get_unsupported_features(librbd::Image &image,
uint64_t *unsupported_features)
{
done:
std::cout << "In some cases useful info is found in syslog - try \"dmesg | tail\"." << std::endl;
}
+#endif
static int do_kernel_map(const char *poolname, const char *nspace_name,
const char *imgname, const char *snapname,