Changeset eabc094c in mainline
- Timestamp:
- 2025-06-09T21:11:16Z (3 days ago)
- Children:
- 0fce1a6
- Parents:
- f34568c
- Location:
- uspace/srv/bd/hr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/metadata/native.c
rf34568c reabc094c 60 60 static errno_t meta_native_get_block(service_id_t, void **); 61 61 static errno_t meta_native_write_block(service_id_t, const void *); 62 static errno_t meta_native_erase_block(service_id_t); 62 63 static bool meta_native_has_valid_magic(const void *); 63 64 static bool meta_native_compare_uuids(const void *, const void *); … … 80 81 .get_block = meta_native_get_block, 81 82 .write_block = meta_native_write_block, 83 .erase_block = meta_native_erase_block, 82 84 .has_valid_magic = meta_native_has_valid_magic, 83 85 .compare_uuids = meta_native_compare_uuids, … … 322 324 } 323 325 326 static errno_t meta_native_erase_block(service_id_t dev) 327 { 328 HR_DEBUG("%s()", __func__); 329 330 errno_t rc; 331 size_t bsize; 332 333 rc = block_get_bsize(dev, &bsize); 334 if (rc != EOK) 335 return rc; 336 337 void *zero_block = calloc(1, bsize); 338 if (zero_block == NULL) 339 return ENOMEM; 340 341 rc = meta_native_write_block(dev, zero_block); 342 return rc; 343 } 344 324 345 static bool meta_native_has_valid_magic(const void *md_v) 325 346 { -
uspace/srv/bd/hr/superblock.h
rf34568c reabc094c 51 51 errno_t (*get_block)(service_id_t, void **); 52 52 errno_t (*write_block)(service_id_t, const void *); 53 errno_t (*erase_block)(service_id_t); 53 54 bool (*has_valid_magic)(const void *); 54 55 bool (*compare_uuids)(const void *, const void *);
Note:
See TracChangeset
for help on using the changeset viewer.