Changeset 55f8c6e7 in mainline for uspace/lib/label/src/mbr.c
- Timestamp:
- 2015-10-29T17:10:30Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dc2d582
- Parents:
- 03661d19
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/label/src/mbr.c
r03661d19 r55f8c6e7 486 486 } 487 487 488 #include <io/log.h>489 488 static void mbr_part_get_info(label_part_t *part, label_part_info_t *pinfo) 490 489 { … … 493 492 pinfo->nblocks = part->nblocks; 494 493 495 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_part_get_info: index=%d ptype=%d",496 (int)part->index, (int)part->ptype.t.num);497 494 if (link_used(&part->llog)) 498 495 pinfo->pkind = lpk_logical; … … 512 509 int rc; 513 510 514 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_part_create");515 511 if (pspec->ptype.fmt != lptf_num) 516 512 return EINVAL; … … 621 617 } 622 618 623 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_part_create success");624 619 *rpart = part; 625 620 return EOK; … … 756 751 return EINVAL; 757 752 758 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_part_to_pte: a0=%" PRIu64759 " len=%" PRIu64 " ptype=%d", part->block0, part->nblocks,760 (int)part->ptype.t.num);761 753 memset(pte, 0, sizeof(mbr_pte_t)); 762 754 pte->ptype = part->ptype.t.num; … … 949 941 ba = part->block0 - part->hdr_blocks; 950 942 951 log_msg(LOG_DEFAULT, LVL_NOTE, "Write EBR to ba=%" PRIu64, ba);952 943 rc = block_write_direct(label->svc_id, ba, 1, br); 953 944 if (rc != EOK) { … … 998 989 ba = part->block0 - part->hdr_blocks; 999 990 1000 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_ebr_update_next ba=%" PRIu64,1001 ba);1002 1003 991 br = calloc(1, label->block_size); 1004 992 if (br == NULL) 1005 993 return ENOMEM; 1006 994 1007 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_ebr_update_next read ba=%" PRIu64,1008 ba);1009 1010 995 rc = block_read_direct(label->svc_id, ba, 1, br); 1011 996 if (rc != EOK) { … … 1017 1002 sgn = uint16_t_le2host(br->signature); 1018 1003 if (sgn != mbr_br_signature) { 1019 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_ebr_update_next signature error");1020 1004 rc = EIO; 1021 1005 goto error; … … 1024 1008 mbr_log_part_to_ptes(part, NULL, &br->pte[mbr_ebr_pte_next]); 1025 1009 1026 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_ebr_update_next write ba=%" PRIu64,1027 ba);1028 1029 1010 rc = block_write_direct(label->svc_id, ba, 1, br); 1030 1011 if (rc != EOK) { … … 1032 1013 goto error; 1033 1014 } 1034 1035 log_msg(LOG_DEFAULT, LVL_NOTE, "mbr_ebr_update_next success");1036 1015 1037 1016 free(br);
Note:
See TracChangeset
for help on using the changeset viewer.