bsdlabel.c (107534) | bsdlabel.c (108650) |
---|---|
1/* 2 * Copyright (c) 1994, 1995 Gordon W. Ross 3 * Copyright (c) 1994 Theo de Raadt 4 * All rights reserved. 5 * Copyright (c) 1987, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 40 unchanged lines hidden (view full) --- 49#ifndef lint 50#if 0 51static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94"; 52/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ 53#endif 54#endif /* not lint */ 55 56#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1994, 1995 Gordon W. Ross 3 * Copyright (c) 1994 Theo de Raadt 4 * All rights reserved. 5 * Copyright (c) 1987, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 40 unchanged lines hidden (view full) --- 49#ifndef lint 50#if 0 51static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94"; 52/* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ 53#endif 54#endif /* not lint */ 55 56#include <sys/cdefs.h> |
57__FBSDID("$FreeBSD: head/sbin/bsdlabel/bsdlabel.c 107534 2002-12-02 23:49:59Z grog $"); | 57__FBSDID("$FreeBSD: head/sbin/bsdlabel/bsdlabel.c 108650 2003-01-04 08:50:48Z nyan $"); |
58 59#include <sys/param.h> 60#include <sys/file.h> 61#include <sys/stat.h> 62#include <sys/wait.h> 63#include <sys/disk.h> 64#define DKTYPENAMES 65#define FSTYPENAMES --- 587 unchanged lines hidden (view full) --- 653 */ 654 if ((tmpbuf = (char *)malloc((int)dp->d_secsize)) == 0) 655 err(4, "%s", xxboot); 656 memcpy((void *)tmpbuf, (void *)boot, (int)dp->d_secsize); 657#endif /* __i386__ */ 658 if (read(b, boot, (int)dp->d_secsize) < 0) 659 err(4, "%s", xxboot); 660 (void)close(b); | 58 59#include <sys/param.h> 60#include <sys/file.h> 61#include <sys/stat.h> 62#include <sys/wait.h> 63#include <sys/disk.h> 64#define DKTYPENAMES 65#define FSTYPENAMES --- 587 unchanged lines hidden (view full) --- 653 */ 654 if ((tmpbuf = (char *)malloc((int)dp->d_secsize)) == 0) 655 err(4, "%s", xxboot); 656 memcpy((void *)tmpbuf, (void *)boot, (int)dp->d_secsize); 657#endif /* __i386__ */ 658 if (read(b, boot, (int)dp->d_secsize) < 0) 659 err(4, "%s", xxboot); 660 (void)close(b); |
661#ifdef __i386__ | 661#ifdef PC98 |
662 for (i = DOSPARTOFF, found = 0; | 662 for (i = DOSPARTOFF, found = 0; |
663 !found && i < (int)(DOSPARTOFF + NDOSPART * sizeof(struct pc98_partition)); 664 i++) 665 found = tmpbuf[i] != 0; 666 if (found) 667 memcpy((void *)&boot[DOSPARTOFF], 668 (void *)&tmpbuf[DOSPARTOFF], 669 NDOSPART * sizeof(struct pc98_partition)); 670 free(tmpbuf); 671#elif defined(__i386__) 672 for (i = DOSPARTOFF, found = 0; |
|
663 !found && i < (int)(DOSPARTOFF + NDOSPART*sizeof(struct dos_partition)); 664 i++) 665 found = tmpbuf[i] != 0; 666 if (found) 667 memcpy((void *)&boot[DOSPARTOFF], 668 (void *)&tmpbuf[DOSPARTOFF], 669 NDOSPART * sizeof(struct dos_partition)); 670 free(tmpbuf); --- 1071 unchanged lines hidden --- | 673 !found && i < (int)(DOSPARTOFF + NDOSPART*sizeof(struct dos_partition)); 674 i++) 675 found = tmpbuf[i] != 0; 676 if (found) 677 memcpy((void *)&boot[DOSPARTOFF], 678 (void *)&tmpbuf[DOSPARTOFF], 679 NDOSPART * sizeof(struct dos_partition)); 680 free(tmpbuf); --- 1071 unchanged lines hidden --- |