Author: imp
Date: Wed Jun  5 02:34:58 2019
New Revision: 348678
URL: https://svnweb.freebsd.org/changeset/base/348678

Log:
  Eliminate unused uuid parameters from gptread and gptread_table.  We
  only need it for the gptfind() function, where it's used.

Modified:
  head/stand/i386/gptboot/gptboot.c
  head/stand/libsa/gpt.c
  head/stand/libsa/gpt.h

Modified: head/stand/i386/gptboot/gptboot.c
==============================================================================
--- head/stand/i386/gptboot/gptboot.c   Wed Jun  5 00:55:22 2019        
(r348677)
+++ head/stand/i386/gptboot/gptboot.c   Wed Jun  5 02:34:58 2019        
(r348678)
@@ -232,7 +232,7 @@ static int
 gptinit(void)
 {
 
-       if (gptread(&freebsd_ufs_uuid, &gdsk.dsk, dmadat->secbuf) == -1) {
+       if (gptread(&gdsk.dsk, dmadat->secbuf) == -1) {
                printf("%s: unable to load GPT\n", BOOTPROG);
                return (-1);
        }

Modified: head/stand/libsa/gpt.c
==============================================================================
--- head/stand/libsa/gpt.c      Wed Jun  5 00:55:22 2019        (r348677)
+++ head/stand/libsa/gpt.c      Wed Jun  5 02:34:58 2019        (r348678)
@@ -275,8 +275,8 @@ gptbootconv(const char *which, struct dsk *dskp, struc
 }
 
 static int
-gptread_table(const char *which, const uuid_t *uuid, struct dsk *dskp,
-    struct gpt_hdr *hdr, struct gpt_ent *table)
+gptread_table(const char *which, struct dsk *dskp, struct gpt_hdr *hdr,
+    struct gpt_ent *table)
 {
        struct gpt_ent *ent;
        int entries_per_sec;
@@ -313,7 +313,7 @@ gptread_table(const char *which, const uuid_t *uuid, s
 }
 
 int
-gptread(const uuid_t *uuid, struct dsk *dskp, char *buf)
+gptread(struct dsk *dskp, char *buf)
 {
        uint64_t altlba;
 
@@ -328,8 +328,7 @@ gptread(const uuid_t *uuid, struct dsk *dskp, char *bu
        dskp->start = 0;
 
        if (gptread_hdr("primary", dskp, &hdr_primary, 1) == 0 &&
-           gptread_table("primary", uuid, dskp, &hdr_primary,
-           table_primary) == 0) {
+           gptread_table("primary", dskp, &hdr_primary, table_primary) == 0) {
                hdr_primary_lba = hdr_primary.hdr_lba_self;
                gpthdr = &hdr_primary;
                gpttable = table_primary;
@@ -349,8 +348,7 @@ gptread(const uuid_t *uuid, struct dsk *dskp, char *bu
        if (altlba == 0)
                printf("%s: unable to locate backup GPT header\n", BOOTPROG);
        else if (gptread_hdr("backup", dskp, &hdr_backup, altlba) == 0 &&
-           gptread_table("backup", uuid, dskp, &hdr_backup,
-           table_backup) == 0) {
+           gptread_table("backup", dskp, &hdr_backup, table_backup) == 0) {
                hdr_backup_lba = hdr_backup.hdr_lba_self;
                if (hdr_primary_lba == 0) {
                        gpthdr = &hdr_backup;

Modified: head/stand/libsa/gpt.h
==============================================================================
--- head/stand/libsa/gpt.h      Wed Jun  5 00:55:22 2019        (r348677)
+++ head/stand/libsa/gpt.h      Wed Jun  5 02:34:58 2019        (r348678)
@@ -34,7 +34,7 @@
 
 #define        MAXTBLENTS      128
 
-int gptread(const uuid_t *uuid, struct dsk *dskp, char *buf);
+int gptread(struct dsk *dskp, char *buf);
 int gptfind(const uuid_t *uuid, struct dsk *dskp, int part);
 void gptbootfailed(struct dsk *dskp);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to