Author: marcel
Date: Sun Jun 13 23:37:16 2010
New Revision: 209143
URL: http://svn.freebsd.org/changeset/base/209143

Log:
  Fix build breakages on ia64 introduced some commits ago.

Modified:
  head/usr.sbin/sysinstall/disks.c
  head/usr.sbin/sysinstall/install.c

Modified: head/usr.sbin/sysinstall/disks.c
==============================================================================
--- head/usr.sbin/sysinstall/disks.c    Sun Jun 13 21:04:09 2010        
(r209142)
+++ head/usr.sbin/sysinstall/disks.c    Sun Jun 13 23:37:16 2010        
(r209143)
@@ -79,7 +79,6 @@ static struct chunk *chunk_info[CHUNK_IN
 static int current_chunk;
 
 static void    diskPartitionNonInteractive(Device *dev);
-static u_char *        bootalloc(char *name, size_t *size);
 
 static void
 record_chunks(Disk *d)
@@ -217,6 +216,41 @@ print_command_summary(void)
     move(0, 0);
 }
 
+#if !defined(__ia64__)
+static u_char *
+bootalloc(char *name, size_t *size)
+{
+    char buf[FILENAME_MAX];
+    struct stat sb;
+
+    snprintf(buf, sizeof buf, "/boot/%s", name);
+    if (stat(buf, &sb) != -1) {
+       int fd;
+
+       fd = open(buf, O_RDONLY);
+       if (fd != -1) {
+           u_char *cp;
+
+           cp = malloc(sb.st_size);
+           if (read(fd, cp, sb.st_size) != sb.st_size) {
+               free(cp);
+               close(fd);
+               msgDebug("bootalloc: couldn't read %ld bytes from %s\n", 
(long)sb.st_size, buf);
+               return NULL;
+           }
+           close(fd);
+           if (size != NULL)
+               *size = sb.st_size;
+           return cp;
+       }
+       msgDebug("bootalloc: couldn't open %s\n", buf);
+    }
+    else
+       msgDebug("bootalloc: can't stat %s\n", buf);
+    return NULL;
+}
+#endif
+
 #ifdef PC98
 static void
 getBootMgr(char *dname, u_char **bootipl, size_t *bootipl_size,
@@ -732,39 +766,6 @@ diskPartition(Device *dev)
 }
 #endif /* WITH_SLICES */
 
-static u_char *
-bootalloc(char *name, size_t *size)
-{
-    char buf[FILENAME_MAX];
-    struct stat sb;
-
-    snprintf(buf, sizeof buf, "/boot/%s", name);
-    if (stat(buf, &sb) != -1) {
-       int fd;
-
-       fd = open(buf, O_RDONLY);
-       if (fd != -1) {
-           u_char *cp;
-
-           cp = malloc(sb.st_size);
-           if (read(fd, cp, sb.st_size) != sb.st_size) {
-               free(cp);
-               close(fd);
-               msgDebug("bootalloc: couldn't read %ld bytes from %s\n", 
(long)sb.st_size, buf);
-               return NULL;
-           }
-           close(fd);
-           if (size != NULL)
-               *size = sb.st_size;
-           return cp;
-       }
-       msgDebug("bootalloc: couldn't open %s\n", buf);
-    }
-    else
-       msgDebug("bootalloc: can't stat %s\n", buf);
-    return NULL;
-}
-
 #ifdef WITH_SLICES 
 static int
 partitionHook(dialogMenuItem *selected)
@@ -874,7 +875,9 @@ diskPartitionWrite(dialogMenuItem *self)
        msgDebug("diskPartitionWrite: Examining %d devices\n", 
deviceCount(devs));
     for (i = 0; devs[i]; i++) {
        Disk *d = (Disk *)devs[i]->private;
+#if !defined(__ia64__)
        static u_char *boot1;
+#endif
 #if defined(__i386__) || defined(__amd64__)
        static u_char *boot2;
 #endif

Modified: head/usr.sbin/sysinstall/install.c
==============================================================================
--- head/usr.sbin/sysinstall/install.c  Sun Jun 13 21:04:09 2010        
(r209142)
+++ head/usr.sbin/sysinstall/install.c  Sun Jun 13 23:37:16 2010        
(r209143)
@@ -1191,9 +1191,7 @@ installFilesystems(dialogMenuItem *self)
            }
 #if defined(__ia64__)
            else if (c1->type == efi && c1->private_data) {
-               char bootdir[FILENAME_MAX];
                PartInfo *pi = (PartInfo *)c1->private_data;
-               char *p;
 
                sprintf(dname, "%s/dev/%s", RunningAsInit ? "/mnt" : "",
                    c1->name);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to