From owner-p4-projects Tue Apr 16 23:34:54 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D3E3B37B405; Tue, 16 Apr 2002 23:34:48 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2AD5E37B42A for ; Tue, 16 Apr 2002 23:34:45 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3H6Yie68545 for perforce@freebsd.org; Tue, 16 Apr 2002 23:34:44 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Tue, 16 Apr 2002 23:34:44 -0700 (PDT) Message-Id: <200204170634.g3H6Yie68545@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 9894 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9894 Change 9894 by peter@peter_thunder on 2002/04/16 23:34:14 OK, this is pretty gross, but teach fdisk(8) how to initialize an mbr without having to read /boot/mbr (which does not exist on ia64 - it has no bootblocks at all) Affected files ... ... //depot/projects/ia64/sbin/fdisk/fdisk.c#4 edit Differences ... ==== //depot/projects/ia64/sbin/fdisk/fdisk.c#4 (text+ko) ==== @@ -471,6 +471,7 @@ static void init_boot(void) { +#ifndef __ia64__ const char *fname; int fdesc, n; struct stat sb; @@ -490,6 +491,15 @@ err(1, "%s", fname); if (n != mboot.bootinst_size) errx(1, "%s: short read", fname); +#else + if (mboot.bootinst != NULL) + free(mboot.bootinst); + mboot.bootinst_size = secsize; + if ((mboot.bootinst = malloc(mboot.bootinst_size)) == NULL) + errx(1, "unable to allocate boot block buffer"); + memset(mboot.bootinst, 0, mboot.bootinst_size); + *(uint16_t *)&mboot.bootinst[MBRSIGOFF] = BOOT_MAGIC; +#endif } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message