From owner-svn-src-all@FreeBSD.ORG Sun Jun 13 23:37:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97FC710656C3; Sun, 13 Jun 2010 23:37:17 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 331458FC0A; Sun, 13 Jun 2010 23:37:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5DNbHao078249; Sun, 13 Jun 2010 23:37:17 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5DNbHdB078246; Sun, 13 Jun 2010 23:37:17 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006132337.o5DNbHdB078246@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 13 Jun 2010 23:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209143 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2010 23:37:18 -0000 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);