Changeset 3b3e776 in mainline for uspace/srv/bd/part/mbr_part/mbr_part.c
- Timestamp:
- 2010-02-05T10:57:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0358da0
- Parents:
- 3f085132 (diff), b4cbef1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/part/mbr_part/mbr_part.c
r3f085132 r3b3e776 61 61 #include <async.h> 62 62 #include <as.h> 63 #include <fibril_sync .h>63 #include <fibril_synch.h> 64 64 #include <devmap.h> 65 65 #include <sys/types.h> 66 #include <sys/typefmt.h> 67 #include <inttypes.h> 66 68 #include <libblock.h> 67 69 #include <devmap.h> … … 247 249 size_mb = (part->length * block_size + 1024 * 1024 - 1) 248 250 / (1024 * 1024); 249 printf(NAME ": Registered device %s: % llu blocks %llu MB.\n",250 name, part->length, size_mb);251 printf(NAME ": Registered device %s: %" PRIuBN " blocks " 252 "%" PRIu64 " MB.\n", name, part->length, size_mb); 251 253 252 254 part->dev = dev; … … 274 276 if (brb == NULL) { 275 277 printf(NAME ": Failed allocating memory.\n"); 276 return ENOMEM; 278 return ENOMEM; 277 279 } 278 280 … … 289 291 sgn = uint16_t_le2host(brb->signature); 290 292 if (sgn != BR_SIGNATURE) { 291 printf(NAME ": Invalid boot record signature 0x%04X.\n", sgn); 293 printf(NAME ": Invalid boot record signature 0x%04" PRIX16 294 ".\n", sgn); 292 295 return EINVAL; 293 296 } … … 333 336 rc = block_read_direct(indev_handle, ba, 1, brb); 334 337 if (rc != EOK) { 335 printf(NAME ": Failed reading EBR block at %u.\n", ba); 338 printf(NAME ": Failed reading EBR block at %" 339 PRIu32 ".\n", ba); 336 340 return rc; 337 341 } … … 339 343 sgn = uint16_t_le2host(brb->signature); 340 344 if (sgn != BR_SIGNATURE) { 341 printf(NAME ": Invalid boot record signature 0x%04 X"342 " in EBR at %u.\n", sgn, ba);345 printf(NAME ": Invalid boot record signature 0x%04" 346 PRIX16 " in EBR at %" PRIu32 ".\n", sgn, ba); 343 347 return EINVAL; 344 348 } … … 463 467 ipc_answer_1(callid, EOK, block_size); 464 468 continue; 465 469 case BD_GET_NUM_BLOCKS: 470 ipc_answer_2(callid, EOK, LOWER32(part->length), 471 UPPER32(part->length)); 472 continue; 466 473 default: 467 474 retval = EINVAL;
Note:
See TracChangeset
for help on using the changeset viewer.