Changeset 363a504 in mainline
- Timestamp:
- 2015-11-17T10:49:42Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f97f5cc2
- Parents:
- f63a0073
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/volsrv/empty.c
rf63a0073 r363a504 43 43 #include "empty.h" 44 44 45 /* 46 * The partition will be considered empty if at least a minimum number of 47 * bytes *and* blocks (whichever is larger) at the beginning and end of 48 * the partition is zero. 49 */ 50 enum { 51 min_empty_bytes = 16384, 52 /* 53 * First block in ISO 9660 that cannot be empty is the first 54 * volume descriptor at LBA 16 55 */ 56 min_empty_blocks = 17 57 }; 58 45 59 static bool mem_is_zero(void *buf, size_t size) 46 60 { … … 72 86 73 87 /* Check first 16 kiB / 16 blocks, whichever is more */ 74 n = ( 16384+ block_size - 1) / block_size;75 if (n < 16)76 n = 16;88 n = (min_empty_bytes + block_size - 1) / block_size; 89 if (n < min_empty_blocks) 90 n = min_empty_blocks; 77 91 /* 78 92 * Limit to half of the device so we do not process the same blocks
Note:
See TracChangeset
for help on using the changeset viewer.