You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/04/13 05:13:05 UTC

[GitHub] mkiiskila commented on issue #142: semver reporting in image list is not consistent

mkiiskila commented on issue #142: semver reporting in image list is not consistent
URL: https://github.com/apache/mynewt-newt/issues/142#issuecomment-381025789
 
 
   
   
   > On Apr 12, 2018, at 9:04 PM, ccollins476ad <no...@github.com> wrote:
   > 
   > When constructing the version string, the firmware intentionally excludes the build ID if it is 0:
   > 
   > int
   > imgr_ver_str(struct image_version *ver, char *dst)
   > {
   >     if (ver->iv_build_num) {
   >         return sprintf(dst, "%u.%u.%u.%lu",
   >           ver->iv_major, ver->iv_minor, ver->iv_revision,
   >           (unsigned long)ver->iv_build_num);
   >     } else {
   >         return sprintf(dst, "%u.%u.%u",
   >           ver->iv_major, ver->iv_minor, ver->iv_revision);
   >     }
   > }
   > @mkiiskila <https://github.com/mkiiskila> , I know it has been a while, but do you recall the reason for doing this? Any reason it would be a bad idea to change this to always generate a uniform #.#.#.# string?
   > 
   
   I assumed that not everyone will want to use build numbers within the versions, so
   I made it’s appearance here optional. Totally reversible decision.
   I doubt there’s anything which’ll break if ppl want to see the ‘0’ there in the end.
   
   Hope this helps.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services