block.c (8a4266144ebffceb8fda2a5feb03d23c535923d4) block.c (336c1c12551ff0a6e1a2af226d6cbdbadd2e02b5)
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 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

--- 1463 unchanged lines hidden (view full) ---

1472 }
1473 }
1474}
1475
1476int bdrv_has_zero_init(BlockDriverState *bs)
1477{
1478 assert(bs->drv);
1479
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 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

--- 1463 unchanged lines hidden (view full) ---

1472 }
1473 }
1474}
1475
1476int bdrv_has_zero_init(BlockDriverState *bs)
1477{
1478 assert(bs->drv);
1479
1480 if (bs->drv->no_zero_init) {
1481 return 0;
1482 } else if (bs->file) {
1483 return bdrv_has_zero_init(bs->file);
1480 if (bs->drv->bdrv_has_zero_init) {
1481 return bs->drv->bdrv_has_zero_init(bs);
1484 }
1485
1486 return 1;
1487}
1488
1489/*
1490 * Returns true iff the specified sector is present in the disk image. Drivers
1491 * not implementing the functionality are assumed to not support backing files,

--- 1172 unchanged lines hidden ---
1482 }
1483
1484 return 1;
1485}
1486
1487/*
1488 * Returns true iff the specified sector is present in the disk image. Drivers
1489 * not implementing the functionality are assumed to not support backing files,

--- 1172 unchanged lines hidden ---