qemu-io-cmds.c (cfe6c547690b06fbce54a6d0f7b05dd7f18e36ea) | qemu-io-cmds.c (1bf6e9ca9234e1dbcaa18baa06eca9d55cc2dbbb) |
---|---|
1/* 2 * Command line utility to exercise the QEMU I/O path. 3 * 4 * Copyright (C) 2009-2016 Red Hat, Inc. 5 * Copyright (c) 2003-2005 Silicon Graphics, Inc. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. --- 1647 unchanged lines hidden (view full) --- 1656}; 1657 1658 1659static int info_f(BlockBackend *blk, int argc, char **argv) 1660{ 1661 BlockDriverState *bs = blk_bs(blk); 1662 BlockDriverInfo bdi; 1663 ImageInfoSpecific *spec_info; | 1/* 2 * Command line utility to exercise the QEMU I/O path. 3 * 4 * Copyright (C) 2009-2016 Red Hat, Inc. 5 * Copyright (c) 2003-2005 Silicon Graphics, Inc. 6 * 7 * This work is licensed under the terms of the GNU GPL, version 2 or later. 8 * See the COPYING file in the top-level directory. --- 1647 unchanged lines hidden (view full) --- 1656}; 1657 1658 1659static int info_f(BlockBackend *blk, int argc, char **argv) 1660{ 1661 BlockDriverState *bs = blk_bs(blk); 1662 BlockDriverInfo bdi; 1663 ImageInfoSpecific *spec_info; |
1664 Error *local_err = NULL; |
|
1664 char s1[64], s2[64]; 1665 int ret; 1666 1667 if (bs->drv && bs->drv->format_name) { 1668 printf("format name: %s\n", bs->drv->format_name); 1669 } 1670 if (bs->drv && bs->drv->protocol_name) { 1671 printf("format name: %s\n", bs->drv->protocol_name); --- 5 unchanged lines hidden (view full) --- 1677 } 1678 1679 cvtstr(bdi.cluster_size, s1, sizeof(s1)); 1680 cvtstr(bdi.vm_state_offset, s2, sizeof(s2)); 1681 1682 printf("cluster size: %s\n", s1); 1683 printf("vm state offset: %s\n", s2); 1684 | 1665 char s1[64], s2[64]; 1666 int ret; 1667 1668 if (bs->drv && bs->drv->format_name) { 1669 printf("format name: %s\n", bs->drv->format_name); 1670 } 1671 if (bs->drv && bs->drv->protocol_name) { 1672 printf("format name: %s\n", bs->drv->protocol_name); --- 5 unchanged lines hidden (view full) --- 1678 } 1679 1680 cvtstr(bdi.cluster_size, s1, sizeof(s1)); 1681 cvtstr(bdi.vm_state_offset, s2, sizeof(s2)); 1682 1683 printf("cluster size: %s\n", s1); 1684 printf("vm state offset: %s\n", s2); 1685 |
1685 spec_info = bdrv_get_specific_info(bs); | 1686 spec_info = bdrv_get_specific_info(bs, &local_err); 1687 if (local_err) { 1688 error_report_err(local_err); 1689 return -EIO; 1690 } |
1686 if (spec_info) { 1687 printf("Format specific information:\n"); 1688 bdrv_image_info_specific_dump(fprintf, stdout, spec_info); 1689 qapi_free_ImageInfoSpecific(spec_info); 1690 } 1691 1692 return 0; 1693} --- 703 unchanged lines hidden --- | 1691 if (spec_info) { 1692 printf("Format specific information:\n"); 1693 bdrv_image_info_specific_dump(fprintf, stdout, spec_info); 1694 qapi_free_ImageInfoSpecific(spec_info); 1695 } 1696 1697 return 0; 1698} --- 703 unchanged lines hidden --- |