Date: Tue, 16 Apr 2002 23:34:44 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 9894 for review Message-ID: <200204170634.g3H6Yie68545@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204170634.g3H6Yie68545>