grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/4] fs/hfsplus: Mark error strings for translation


From: Lidong Chen
Subject: [PATCH 4/4] fs/hfsplus: Mark error strings for translation
Date: Thu, 20 Apr 2023 17:59:39 +0000

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
---
 grub-core/fs/hfsplus.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
index cf13e8a63..f91af1477 100644
--- a/grub-core/fs/hfsplus.c
+++ b/grub-core/fs/hfsplus.c
@@ -179,7 +179,7 @@ grub_hfsplus_read_block (grub_fshelp_node_t node, 
grub_disk_addr_t fileblock)
       if (node->fileid == GRUB_HFSPLUS_FILEID_OVERFLOW)
        {
          grub_error (GRUB_ERR_READ_ERROR,
-                     "extra extents found in an extend overflow file");
+                     N_("extra extents found in an extend overflow file"));
          break;
        }
 
@@ -190,7 +190,7 @@ grub_hfsplus_read_block (grub_fshelp_node_t node, 
grub_disk_addr_t fileblock)
       if (!node->data->extoverflow_tree_ready)
        {
          grub_error (GRUB_ERR_BAD_FS,
-                     "attempted to read extent overflow tree before loading");
+                     N_("attempted to read extent overflow tree before 
loading"));
          break;
        }
 
@@ -205,8 +205,8 @@ grub_hfsplus_read_block (grub_fshelp_node_t node, 
grub_disk_addr_t fileblock)
          || !nnode)
        {
          grub_error (GRUB_ERR_READ_ERROR,
-                     "no block found for the file id 0x%x and the block"
-                     " offset 0x%" PRIuGRUB_UINT64_T,
+                     N_("no block found for the file id 0x%x and the block"
+                     " offset 0x%" PRIuGRUB_UINT64_T),
                      node->fileid, fileblock);
          break;
        }
@@ -277,7 +277,7 @@ grub_hfsplus_mount (grub_disk_t disk)
       /* See if there's an embedded HFS+ filesystem.  */
       if (grub_be_to_cpu16 (volheader.hfs.embed_sig) != GRUB_HFSPLUS_MAGIC)
        {
-         grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
+         grub_error (GRUB_ERR_BAD_FS, N_("not a HFS+ filesystem"));
          goto fail;
        }
 
@@ -303,7 +303,7 @@ grub_hfsplus_mount (grub_disk_t disk)
       || ((volheader.hfsplus.blksize & (volheader.hfsplus.blksize - 1)) != 0)
       || grub_be_to_cpu32 (volheader.hfsplus.blksize) < GRUB_DISK_SECTOR_SIZE)
     {
-      grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
+      grub_error (GRUB_ERR_BAD_FS, N_("not a HFS+ filesystem"));
       goto fail;
     }
 
@@ -358,7 +358,7 @@ grub_hfsplus_mount (grub_disk_t disk)
 
   if (data->catalog_tree.nodesize < 2)
     {
-      grub_error (GRUB_ERR_BAD_FS, "invalid catalog node size");
+      grub_error (GRUB_ERR_BAD_FS, N_("invalid catalog node size"));
       goto fail;
     }
 
@@ -378,7 +378,7 @@ grub_hfsplus_mount (grub_disk_t disk)
 
   if (data->extoverflow_tree.nodesize < 2)
     {
-      grub_error (GRUB_ERR_BAD_FS, "invalid extents overflow node size");
+      grub_error (GRUB_ERR_BAD_FS, N_("invalid extents overflow node size"));
       goto fail;
     }
 
@@ -406,7 +406,7 @@ grub_hfsplus_mount (grub_disk_t disk)
  fail:
 
   if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
-    grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
+    grub_error (GRUB_ERR_BAD_FS, N_("not a HFS+ filesystem"));
 
   grub_free (data);
   return 0;
@@ -550,7 +550,7 @@ grub_hfsplus_btree_iterate_node (struct grub_hfsplus_btree 
*btree,
 
       if (node_count && first_node->next == saved_node)
        {
-         grub_error (GRUB_ERR_BAD_FS, "HFS+ btree loop");
+         grub_error (GRUB_ERR_BAD_FS, N_("HFS+ btree loop"));
          return 0;
        }
       if (!(node_count & (node_count - 1)))
@@ -598,7 +598,7 @@ grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
 
   if (btree->nodesize < HFSPLUS_BTNODE_MINSZ ||
       btree->nodesize > HFSPLUS_BTNODE_MAXSZ)
-    return grub_error (GRUB_ERR_BAD_FS, "invalid HFS+ btree node size");
+    return grub_error (GRUB_ERR_BAD_FS, N_("invalid HFS+ btree node size"));
 
   node = grub_malloc (btree->nodesize);
   if (! node)
@@ -613,7 +613,7 @@ grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
       if (save_node == currnode)
        {
          grub_free (node);
-         return grub_error (GRUB_ERR_BAD_FS, "HFS+ btree loop");
+         return grub_error (GRUB_ERR_BAD_FS, N_("HFS+ btree loop"));
        }
       if (!(node_count & (node_count - 1)))
        save_node = currnode;
@@ -626,7 +626,7 @@ grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
                                  btree->nodesize, (char *) node) <= 0)
        {
          grub_free (node);
-         return grub_error (GRUB_ERR_BAD_FS, "couldn't read i-node");
+         return grub_error (GRUB_ERR_BAD_FS, N_("couldn't read i-node"));
        }
 
       nodedesc = (struct grub_hfsplus_btnode *) node;
@@ -668,7 +668,7 @@ grub_hfsplus_btree_search (struct grub_hfsplus_btree *btree,
                         + 2);
 
              if ((char *) pointer > node + btree->nodesize - 2)
-               return grub_error (GRUB_ERR_BAD_FS, "HFS+ key beyond end of 
node");
+               return grub_error (GRUB_ERR_BAD_FS, N_("HFS+ key beyond end of 
node"));
 
              currnode = grub_be_to_cpu32 (grub_get_unaligned32 (pointer));
              match = 1;
@@ -711,7 +711,7 @@ list_nodes (void *record, void *hook_arg)
   if (grub_be_to_cpu16 (catkey->keylen) < HFSPLUS_CATKEY_MIN_LEN ||
       grub_be_to_cpu16 (catkey->keylen) > HFSPLUS_CATKEY_MAX_LEN)
     {
-      grub_error (GRUB_ERR_BAD_FS, "catalog key length is out of range");
+      grub_error (GRUB_ERR_BAD_FS, N_("catalog key length is out of range"));
       return 1;
     }
 
-- 
2.39.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]