From c8717ca88cbe666311b0cd8e5c422b903b3030e7 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Sat, 3 Jun 2017 10:34:17 +0200 Subject: [PATCH] librbd: remove unused rbd_image_options_t ostream operator This fixes librbd crashes currently observed on master, when debug is on, because `rbd_image_options_t` is typedef-ed `void *` and it's operator is used when attempting to print out an address (`void *`) of any object. Signed-off-by: Mykola Golub --- src/librbd/internal.cc | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 00606fcd2e6d8..40931127bd1ac 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -327,22 +327,6 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) { } } - std::ostream &operator<<(std::ostream &os, const rbd_image_options_t &opts) { - image_options_ref* opts_ = static_cast(opts); - - os << "["; - - for (image_options_t::const_iterator i = (*opts_)->begin(); - i != (*opts_)->end(); ++i) { - os << (i == (*opts_)->begin() ? "" : ", ") << image_option_name(i->first) - << "=" << i->second; - } - - os << "]"; - - return os; - } - std::ostream &operator<<(std::ostream &os, const ImageOptions &opts) { os << "["; -- 2.39.5