zephyr/boot_serial_extension: kconfig of custom command for get images status

made he command implementation selectable.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/zephyr/boot_serial_extensions.c b/boot/zephyr/boot_serial_extensions.c
index 88f84ad..3cd801c 100644
--- a/boot/zephyr/boot_serial_extensions.c
+++ b/boot/zephyr/boot_serial_extensions.c
@@ -50,6 +50,7 @@
     return rc;
 }
 
+#ifdef MCUBOOT_MGMT_CUSTOM_IMG_LIST
 static int custom_img_status(int image_index, uint32_t slot,char *buffer,
                         ssize_t len)
 {
@@ -117,6 +118,8 @@
 #ifndef ZEPHYR_MGMT_GRP_BASIC_CMD_IMAGE_LIST
     #define ZEPHYR_MGMT_GRP_BASIC_CMD_IMAGE_LIST 1
 #endif
+#endif /*MCUBOOT_MGMT_CUSTOM_IMG_LIST*/
+
 int bs_peruser_system_specific(const struct nmgr_hdr *hdr, const char *buffer,
                                int len, cbor_state_t *cs)
 {
@@ -128,9 +131,11 @@
                 mgmt_rc = bs_custom_storage_erase(cs);
             }
         } else if (hdr->nh_op == NMGR_OP_READ) {
+#ifdef MCUBOOT_MGMT_CUSTOM_IMG_LIST
             if (hdr->nh_id == ZEPHYR_MGMT_GRP_BASIC_CMD_IMAGE_LIST) {
                 mgmt_rc = bs_custom_img_list(cs);
             }
+#endif
         }
     }