qapi.c (1b507e55f8199eaad99744613823f6929e4d57c6) | qapi.c (307261b243df2edde538f3ed5c9d80e168529355) |
---|---|
1/* 2 * Block layer qmp and info dump related functions 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 45 unchanged lines hidden (view full) --- 54 error_setg(errp, "Block device %s is ejected", bs->node_name); 55 return NULL; 56 } 57 58 bdrv_refresh_filename(bs); 59 60 info = g_malloc0(sizeof(*info)); 61 info->file = g_strdup(bs->filename); | 1/* 2 * Block layer qmp and info dump related functions 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 45 unchanged lines hidden (view full) --- 54 error_setg(errp, "Block device %s is ejected", bs->node_name); 55 return NULL; 56 } 57 58 bdrv_refresh_filename(bs); 59 60 info = g_malloc0(sizeof(*info)); 61 info->file = g_strdup(bs->filename); |
62 info->ro = bs->read_only; | 62 info->ro = bdrv_is_read_only(bs); |
63 info->drv = g_strdup(bs->drv->format_name); 64 info->encrypted = bs->encrypted; 65 66 info->cache = g_new(BlockdevCacheInfo, 1); 67 *info->cache = (BlockdevCacheInfo) { 68 .writeback = blk ? blk_enable_write_cache(blk) : true, 69 .direct = !!(bs->open_flags & BDRV_O_NOCACHE), 70 .no_flush = !!(bs->open_flags & BDRV_O_NO_FLUSH), --- 805 unchanged lines hidden --- | 63 info->drv = g_strdup(bs->drv->format_name); 64 info->encrypted = bs->encrypted; 65 66 info->cache = g_new(BlockdevCacheInfo, 1); 67 *info->cache = (BlockdevCacheInfo) { 68 .writeback = blk ? blk_enable_write_cache(blk) : true, 69 .direct = !!(bs->open_flags & BDRV_O_NOCACHE), 70 .no_flush = !!(bs->open_flags & BDRV_O_NO_FLUSH), --- 805 unchanged lines hidden --- |