Skip to content
Snippets Groups Projects
Commit e4d484cf authored by Ronny Nilsson's avatar Ronny Nilsson
Browse files

brcm_fw_tool: comments

parent c6498b82
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ struct metaInfo_t { ...@@ -75,7 +75,7 @@ struct metaInfo_t {
char *nodePath; // UBI node character device path. char *nodePath; // UBI node character device path.
char *volPath; // UBI volume character device path. char *volPath; // UBI volume character device path.
int seqNo; // Broadcom sequence number. int seqNo; // Broadcom sequence number.
int committed; // True when volume is "commited". int committed; // True when volume is "committed".
struct ubi_vol_info volInfo; struct ubi_vol_info volInfo;
}; };
...@@ -509,7 +509,7 @@ static int meta_find_seqno(struct metaInfo_t *metaInfo) ...@@ -509,7 +509,7 @@ static int meta_find_seqno(struct metaInfo_t *metaInfo)
goto out; goto out;
} }
// Is the volume "commited"? // Is the volume "committed"?
if(parse_ubi(NULL, inBuf, 0, 1, metaInfo->volInfo.leb_size, -1, ubiStr1, if(parse_ubi(NULL, inBuf, 0, 1, metaInfo->volInfo.leb_size, -1, ubiStr1,
outBuf, NULL, 0, ubi_read_blk, NULL, NULL, NULL, inFd) == 1 && outBuf, NULL, 0, ubi_read_blk, NULL, NULL, NULL, inFd) == 1 &&
*committed == '1') { *committed == '1') {
...@@ -797,8 +797,9 @@ static int meta_manage_vols(int readonly, int forcedBank) ...@@ -797,8 +797,9 @@ static int meta_manage_vols(int readonly, int forcedBank)
forcedBank = METAVOLID0; forcedBank = METAVOLID0;
} }
/* Decide which old meta volume to erase and which to create fresh. /* Decide with a state machine which old meta volume to
* Either of: "next subsequent" or "user forced". */ * erase and which to create fresh. Either of:
* "next subsequent" or "user forced". */
switch(forcedBank >= 0 ? forcedBank : metaInfos[highMeta].volInfo.vol_id) { switch(forcedBank >= 0 ? forcedBank : metaInfos[highMeta].volInfo.vol_id) {
case METAINVALID: case METAINVALID:
case METAVOLID0: case METAVOLID0:
...@@ -961,6 +962,5 @@ int gen_image_ubi(char *sequence_number) ...@@ -961,6 +962,5 @@ int gen_image_ubi(char *sequence_number)
libubi = NULL; libubi = NULL;
} }
return res; return res;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment