You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/26 13:19:06 UTC

[GitHub] [incubator-nuttx] jlaitine opened a new pull request, #7189: Fixes for GPT partition parsing

jlaitine opened a new pull request, #7189:
URL: https://github.com/apache/incubator-nuttx/pull/7189

   1. Don't handle invalid or empty pte entries
   
   num_partition_entries field in GPT typically means number of maximum entries and not the number of used entries. Empty entries are indentified with "0" partition type guid. Loop through all the entries
   
   2. Fix the GPT partition size calculation
   
   "ending_lba" is included in the partition, it is not the start of the next one. Thus the correct size of the partition is end-start+1
   
   Signed-off-by: Jukka Laitinen <ju...@ssrc.tii.ae>
   
   ## Summary
   
   ## Impact
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] jlaitine commented on a diff in pull request #7189: Fixes for GPT partition parsing

Posted by GitBox <gi...@apache.org>.
jlaitine commented on code in PR #7189:
URL: https://github.com/apache/incubator-nuttx/pull/7189#discussion_r980499891


##########
fs/partition/fs_gpt.c:
##########
@@ -393,6 +393,7 @@ int parse_gpt_partition(FAR struct partition_state_s *state,
   int nb_part;
   int count;
   int ret;
+  blkcnt_t lastlba = gpt_last_lba(state);

Review Comment:
   Sure. I also initialize it close to where it is used, looks cleaner that way imho.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #7189: Fixes for GPT partition parsing

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7189:
URL: https://github.com/apache/incubator-nuttx/pull/7189


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7189: Fixes for GPT partition parsing

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7189:
URL: https://github.com/apache/incubator-nuttx/pull/7189#discussion_r980035669


##########
fs/partition/fs_gpt.c:
##########
@@ -393,6 +393,7 @@ int parse_gpt_partition(FAR struct partition_state_s *state,
   int nb_part;
   int count;
   int ret;
+  blkcnt_t lastlba = gpt_last_lba(state);

Review Comment:
   move before line 393?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org