You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/07/16 18:05:04 UTC

[incubator-nuttx] branch master updated: partition/gpt: Replace PRI?LBA with PRI?OFF

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new c211954a42 partition/gpt: Replace PRI?LBA with PRI?OFF
c211954a42 is described below

commit c211954a429d1447ed33987b8f17202a147830a0
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Jul 16 21:35:25 2022 +0800

    partition/gpt: Replace PRI?LBA with PRI?OFF
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 fs/partition/fs_gpt.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/fs/partition/fs_gpt.c b/fs/partition/fs_gpt.c
index 90c9ee8dd0..13184e7f2b 100644
--- a/fs/partition/fs_gpt.c
+++ b/fs/partition/fs_gpt.c
@@ -41,15 +41,6 @@
 #define GPT_LBA_TO_BLOCK(lba, blk)      ((le64toh(lba) * 512 + (blk) -1) / (blk))
 #define GPT_MIN(x, y)                   (((x) < (y)) ? (x) : (y))
 
-/* Helper macro for printing lba addresses according to the  sys/types.h */
-#if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
-#define PRIxLBA PRIx64
-#define PRIdLBA PRId64
-#else
-#define PRIxLBA PRIx32
-#define PRIdLBA PRId32
-#endif
-
 /****************************************************************************
  * Private Types
  ****************************************************************************/
@@ -296,7 +287,7 @@ static int gpt_header_is_valid(FAR struct partition_state_s *state,
 
   if (le64toh(gpt->my_lba) != lba)
     {
-      ferr("GPT: my_lba incorrect: %" PRIx64 " != %" PRIxLBA "\n",
+      ferr("GPT: my_lba incorrect: %" PRIx64 " != %" PRIxOFF "\n",
            le64toh(gpt->my_lba), lba);
       return -EINVAL;
     }
@@ -306,14 +297,14 @@ static int gpt_header_is_valid(FAR struct partition_state_s *state,
   lastlba = gpt_last_lba(state);
   if (le64toh(gpt->first_usable_lba) > lastlba)
     {
-      ferr("GPT: first_usable_lba incorrect: %" PRId64 " > %" PRIdLBA "\n",
+      ferr("GPT: first_usable_lba incorrect: %" PRId64 " > %" PRIdOFF "\n",
            le64toh(gpt->first_usable_lba), lastlba);
       return -EINVAL;
     }
 
   if (le64toh(gpt->last_usable_lba) > lastlba)
     {
-      ferr("GPT: last_usable_lba incorrect: %" PRId64 " > %" PRIdLBA "\n",
+      ferr("GPT: last_usable_lba incorrect: %" PRId64 " > %" PRIdOFF "\n",
            le64toh(gpt->last_usable_lba), lastlba);
       return -EINVAL;
     }