1f364ec65SWenchao Xia /* 2f364ec65SWenchao Xia * Block layer qmp and info dump related functions 3f364ec65SWenchao Xia * 4f364ec65SWenchao Xia * Copyright (c) 2003-2008 Fabrice Bellard 5f364ec65SWenchao Xia * 6f364ec65SWenchao Xia * Permission is hereby granted, free of charge, to any person obtaining a copy 7f364ec65SWenchao Xia * of this software and associated documentation files (the "Software"), to deal 8f364ec65SWenchao Xia * in the Software without restriction, including without limitation the rights 9f364ec65SWenchao Xia * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10f364ec65SWenchao Xia * copies of the Software, and to permit persons to whom the Software is 11f364ec65SWenchao Xia * furnished to do so, subject to the following conditions: 12f364ec65SWenchao Xia * 13f364ec65SWenchao Xia * The above copyright notice and this permission notice shall be included in 14f364ec65SWenchao Xia * all copies or substantial portions of the Software. 15f364ec65SWenchao Xia * 16f364ec65SWenchao Xia * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17f364ec65SWenchao Xia * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18f364ec65SWenchao Xia * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19f364ec65SWenchao Xia * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20f364ec65SWenchao Xia * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21f364ec65SWenchao Xia * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22f364ec65SWenchao Xia * THE SOFTWARE. 23f364ec65SWenchao Xia */ 24f364ec65SWenchao Xia 25f364ec65SWenchao Xia #ifndef BLOCK_QAPI_H 26f364ec65SWenchao Xia #define BLOCK_QAPI_H 27f364ec65SWenchao Xia 28f364ec65SWenchao Xia #include "block/snapshot.h" 29e2c1c34fSMarkus Armbruster #include "qapi/qapi-types-block-core.h" 30f364ec65SWenchao Xia 31c83f9fbaSKevin Wolf BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, 32facda544SPeter Krempa BlockDriverState *bs, 33facda544SPeter Krempa bool flat, 34facda544SPeter Krempa Error **errp); 35fb0ed453SWenchao Xia int bdrv_query_snapshot_info_list(BlockDriverState *bs, 36fb0ed453SWenchao Xia SnapshotInfoList **p_list, 37fb0ed453SWenchao Xia Error **errp); 3843526ec8SWenchao Xia void bdrv_query_image_info(BlockDriverState *bs, 3943526ec8SWenchao Xia ImageInfo **p_info, 4043526ec8SWenchao Xia Error **errp); 41f364ec65SWenchao Xia 42e1ce7d74SMarkus Armbruster void bdrv_snapshot_dump(QEMUSnapshotInfo *sn); 43*3716470bSHanna Reitz void bdrv_image_info_specific_dump(ImageInfoSpecific *info_spec, 44*3716470bSHanna Reitz const char *prefix); 45e1ce7d74SMarkus Armbruster void bdrv_image_info_dump(ImageInfo *info); 46f364ec65SWenchao Xia #endif 47