qcow2-refcount.c (1869a65385e9d81f490b4203dd070cc49b7749c9) | qcow2-refcount.c (a1c7273b82dc084d85e2344e0562f5ee4e414d59) |
---|---|
1/* 2 * Block driver for the QCOW version 2 format 3 * 4 * Copyright (c) 2004-2006 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 --- 1049 unchanged lines hidden (view full) --- 1058 qemu_free(l1_table); 1059 return -EIO; 1060} 1061 1062/* 1063 * Checks an image for refcount consistency. 1064 * 1065 * Returns 0 if no errors are found, the number of errors in case the image is | 1/* 2 * Block driver for the QCOW version 2 format 3 * 4 * Copyright (c) 2004-2006 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 --- 1049 unchanged lines hidden (view full) --- 1058 qemu_free(l1_table); 1059 return -EIO; 1060} 1061 1062/* 1063 * Checks an image for refcount consistency. 1064 * 1065 * Returns 0 if no errors are found, the number of errors in case the image is |
1066 * detected as corrupted, and -errno when an internal error occured. | 1066 * detected as corrupted, and -errno when an internal error occurred. |
1067 */ 1068int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res) 1069{ 1070 BDRVQcowState *s = bs->opaque; 1071 int64_t size; 1072 int nb_clusters, refcount1, refcount2, i; 1073 QCowSnapshot *sn; 1074 uint16_t *refcount_table; --- 92 unchanged lines hidden --- | 1067 */ 1068int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res) 1069{ 1070 BDRVQcowState *s = bs->opaque; 1071 int64_t size; 1072 int nb_clusters, refcount1, refcount2, i; 1073 QCowSnapshot *sn; 1074 uint16_t *refcount_table; --- 92 unchanged lines hidden --- |