1*f364ec65SWenchao Xia /* 2*f364ec65SWenchao Xia * Block layer qmp and info dump related functions 3*f364ec65SWenchao Xia * 4*f364ec65SWenchao Xia * Copyright (c) 2003-2008 Fabrice Bellard 5*f364ec65SWenchao Xia * 6*f364ec65SWenchao Xia * Permission is hereby granted, free of charge, to any person obtaining a copy 7*f364ec65SWenchao Xia * of this software and associated documentation files (the "Software"), to deal 8*f364ec65SWenchao Xia * in the Software without restriction, including without limitation the rights 9*f364ec65SWenchao Xia * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10*f364ec65SWenchao Xia * copies of the Software, and to permit persons to whom the Software is 11*f364ec65SWenchao Xia * furnished to do so, subject to the following conditions: 12*f364ec65SWenchao Xia * 13*f364ec65SWenchao Xia * The above copyright notice and this permission notice shall be included in 14*f364ec65SWenchao Xia * all copies or substantial portions of the Software. 15*f364ec65SWenchao Xia * 16*f364ec65SWenchao Xia * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17*f364ec65SWenchao Xia * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18*f364ec65SWenchao Xia * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19*f364ec65SWenchao Xia * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20*f364ec65SWenchao Xia * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21*f364ec65SWenchao Xia * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22*f364ec65SWenchao Xia * THE SOFTWARE. 23*f364ec65SWenchao Xia */ 24*f364ec65SWenchao Xia 25*f364ec65SWenchao Xia #ifndef BLOCK_QAPI_H 26*f364ec65SWenchao Xia #define BLOCK_QAPI_H 27*f364ec65SWenchao Xia 28*f364ec65SWenchao Xia #include "qapi-types.h" 29*f364ec65SWenchao Xia #include "block/block.h" 30*f364ec65SWenchao Xia #include "block/snapshot.h" 31*f364ec65SWenchao Xia 32*f364ec65SWenchao Xia void bdrv_collect_snapshots(BlockDriverState *bs , ImageInfo *info); 33*f364ec65SWenchao Xia void bdrv_collect_image_info(BlockDriverState *bs, 34*f364ec65SWenchao Xia ImageInfo *info, 35*f364ec65SWenchao Xia const char *filename); 36*f364ec65SWenchao Xia BlockInfo *bdrv_query_info(BlockDriverState *s); 37*f364ec65SWenchao Xia BlockStats *bdrv_query_stats(const BlockDriverState *bs); 38*f364ec65SWenchao Xia 39*f364ec65SWenchao Xia char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn); 40*f364ec65SWenchao Xia void bdrv_image_info_dump(ImageInfo *info); 41*f364ec65SWenchao Xia #endif 42