grub-devel
[Top][All Lists]
Advanced

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

[PATCH 6/7] android_bootimg: style fixes


From: Shea Levy
Subject: [PATCH 6/7] android_bootimg: style fixes
Date: Tue, 26 Jan 2016 13:51:21 -0500

---
 grub-core/fs/android_bootimg.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/grub-core/fs/android_bootimg.c b/grub-core/fs/android_bootimg.c
index 13d77fd..37d7ff7 100644
--- a/grub-core/fs/android_bootimg.c
+++ b/grub-core/fs/android_bootimg.c
@@ -64,13 +64,14 @@ typedef enum
     NOT_FOUND,
     BAD_NAME
   }
-bootimg_file_t;
+grub_android_bootimg_filename_t;
 
-static bootimg_file_t
-grub_android_bootimg_handle_path (const char *path)
+static grub_android_bootimg_filename_t
+handle_path (const char *path)
 {
   if (!path || path[0] != '/')
     return BAD_NAME;
+
   const char *path_iter;
   for (path_iter = path + 1; *path_iter; ++path_iter) {
     if (*path_iter == '/')
@@ -97,7 +98,7 @@ grub_android_bootimg_handle_path (const char *path)
 }
 
 static grub_err_t
-grub_android_bootimg_hdr (grub_disk_t disk, struct boot_img_hdr *hd)
+read_hdr (grub_disk_t disk, struct boot_img_hdr *hd)
 {
   if (grub_disk_read (disk, 0, 0, sizeof *hd, hd))
     goto fail;
@@ -121,10 +122,10 @@ grub_android_bootimg_dir (grub_device_t device, const 
char *path,
 {
   struct boot_img_hdr hd;
 
-  if (grub_android_bootimg_hdr (device->disk, &hd))
+  if (read_hdr (device->disk, &hd))
     return grub_errno;
 
-  bootimg_file_t file = grub_android_bootimg_handle_path (path);
+  grub_android_bootimg_filename_t file = handle_path (path);
   if (file == NOT_FOUND)
     return grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("directory `%s' not found"),
                        path);
@@ -172,12 +173,12 @@ grub_android_bootimg_open (grub_file_t file, const char 
*name)
 {
   struct boot_img_hdr hd;
 
-  if (grub_android_bootimg_hdr (file->device->disk, &hd))
+  if (read_hdr (file->device->disk, &hd))
     return grub_errno;
 
   grub_off_t *begin_offset;
 
-  bootimg_file_t fn = grub_android_bootimg_handle_path (name);
+  grub_android_bootimg_filename_t fn = handle_path (name);
   switch (fn)
     {
     case NOT_FOUND:
-- 
2.7.0




reply via email to

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