Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/arch/hp700/stand Pull up following revision(s) (reque...
details: https://anonhg.NetBSD.org/src/rev/2c0754074e06
branches: netbsd-6
changeset: 773837:2c0754074e06
user: riz <riz%NetBSD.org@localhost>
date: Mon Feb 27 20:13:30 2012 +0000
description:
Pull up following revision(s) (requested by skrll in ticket #53):
sys/arch/hp700/stand/xxboot/readufs.h: revision 1.6
sys/arch/hp700/stand/mkboot/mkboot.c: revision 1.8
sys/arch/hp700/stand/xxboot/iplsum.c: revision 1.6
sys/arch/hp700/stand/xxboot/main.c: revision 1.10
More u_intXX_t -> uintXX_t
Same code before and after.
diffstat:
sys/arch/hp700/stand/mkboot/mkboot.c | 4 ++--
sys/arch/hp700/stand/xxboot/iplsum.c | 26 +++++++++++++-------------
sys/arch/hp700/stand/xxboot/main.c | 10 +++++-----
sys/arch/hp700/stand/xxboot/readufs.h | 18 +++++++++---------
4 files changed, 29 insertions(+), 29 deletions(-)
diffs (174 lines):
diff -r a713395e060a -r 2c0754074e06 sys/arch/hp700/stand/mkboot/mkboot.c
--- a/sys/arch/hp700/stand/mkboot/mkboot.c Mon Feb 27 20:11:56 2012 +0000
+++ b/sys/arch/hp700/stand/mkboot/mkboot.c Mon Feb 27 20:13:30 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkboot.c,v 1.7 2009/03/18 16:00:11 cegger Exp $ */
+/* $NetBSD: mkboot.c,v 1.7.18.1 2012/02/27 20:13:30 riz Exp $ */
/* $OpenBSD: mkboot.c,v 1.9 2001/05/17 00:57:55 pvalchev Exp $ */
@@ -101,7 +101,7 @@
#define N_GETMAGIC(ex) \
((((ex).a_midmag)&0xffff0000) ? \
- (ntohl((u_int32_t)((ex).a_midmag))&0xffff) : ((ex).a_midmag))
+ (ntohl((uint32_t)((ex).a_midmag))&0xffff) : ((ex).a_midmag))
#include <stdio.h>
#include <ctype.h>
diff -r a713395e060a -r 2c0754074e06 sys/arch/hp700/stand/xxboot/iplsum.c
--- a/sys/arch/hp700/stand/xxboot/iplsum.c Mon Feb 27 20:11:56 2012 +0000
+++ b/sys/arch/hp700/stand/xxboot/iplsum.c Mon Feb 27 20:13:30 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iplsum.c,v 1.5 2011/02/21 02:31:57 itohy Exp $ */
+/* $NetBSD: iplsum.c,v 1.5.10.1 2012/02/27 20:13:30 riz Exp $ */
/*
* Calculate 32bit checksum of IPL and store in a certain location
@@ -13,7 +13,7 @@
#include <netinet/in.h>
#ifndef __BIT_TYPES_DEFINED__
-typedef unsigned int u_int32_t;
+typedef unsigned int uint32_t;
#endif
/* see README.ipl */
@@ -27,9 +27,9 @@
#define BOOTSIZE (IPLOFF + IPLSIZE)
#define BOOTBLOCKSIZE 8192
-u_int32_t bootblk[BOOTSIZE / sizeof(u_int32_t) + 1];
+uint32_t bootblk[BOOTSIZE / sizeof(uint32_t) + 1];
-#define SUMOFF ((IPLOFF + 4) / sizeof(u_int32_t))
+#define SUMOFF ((IPLOFF + 4) / sizeof(uint32_t))
#ifdef __STDC__
int main(int, char *[]);
@@ -40,7 +40,7 @@
{
FILE *fp;
int len;
- u_int32_t sum, *p;
+ uint32_t sum, *p;
int iploff, iplsumsize;
if (argc != 3) {
@@ -67,8 +67,8 @@
fprintf(stderr, "%s: bad LIF magic\n", argv[1]);
return 1;
}
- iploff = ntohl(bootblk[0xf0 / sizeof(u_int32_t)]);
- iplsumsize = ntohl(bootblk[0xf4 / sizeof(u_int32_t)]);
+ iploff = ntohl(bootblk[0xf0 / sizeof(uint32_t)]);
+ iplsumsize = ntohl(bootblk[0xf4 / sizeof(uint32_t)]);
printf("%d bytes free, ipl offset = %d, ipl sum size = %d\n",
BOOTSIZE - len, iploff, iplsumsize);
if (iploff != IPLOFF || iplsumsize <= 0 || iplsumsize % 2048 ||
@@ -79,20 +79,20 @@
/* checksum */
sum = 0;
- for (p = bootblk + IPLOFF / sizeof(u_int32_t);
- p < bootblk + (IPLOFF + IPL1SIZE) / sizeof(u_int32_t); p++)
+ for (p = bootblk + IPLOFF / sizeof(uint32_t);
+ p < bootblk + (IPLOFF + IPL1SIZE) / sizeof(uint32_t); p++)
sum += ntohl(*p);
bootblk[SUMOFF] = htonl(ntohl(bootblk[SUMOFF]) - sum);
/* transfer ipl part 2 */
- memcpy(bootblk + IPL2ONDISK / sizeof(u_int32_t),
- bootblk + (IPLOFF + IPL1SIZE) / sizeof(u_int32_t),
+ memcpy(bootblk + IPL2ONDISK / sizeof(uint32_t),
+ bootblk + (IPLOFF + IPL1SIZE) / sizeof(uint32_t),
IPL2SIZE);
/* transfer ipl part 3 */
- memcpy(bootblk + IPL3ONDISK / sizeof(u_int32_t),
- bootblk + (IPLOFF + IPL1SIZE + IPL2SIZE) / sizeof(u_int32_t),
+ memcpy(bootblk + IPL3ONDISK / sizeof(uint32_t),
+ bootblk + (IPLOFF + IPL1SIZE + IPL2SIZE) / sizeof(uint32_t),
IPL3SIZE);
/* write file */
diff -r a713395e060a -r 2c0754074e06 sys/arch/hp700/stand/xxboot/main.c
--- a/sys/arch/hp700/stand/xxboot/main.c Mon Feb 27 20:11:56 2012 +0000
+++ b/sys/arch/hp700/stand/xxboot/main.c Mon Feb 27 20:13:30 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.9 2009/03/18 16:00:11 cegger Exp $ */
+/* $NetBSD: main.c,v 1.9.18.1 2012/02/27 20:13:30 riz Exp $ */
/*
* Copyright (c) 2003 ITOH Yasufumi.
@@ -386,23 +386,23 @@
{
Elf32_Ehdr *e32hdr = buf;
Elf64_Ehdr *e64hdr = buf;
- u_int16_t class_data;
+ uint16_t class_data;
/*
* check ELF header
* (optimized assuming big endian byte order)
*/
/* ELF magic */
- if (*(u_int32_t *)&e32hdr->e_ident[EI_MAG0] !=
+ if (*(uint32_t *)&e32hdr->e_ident[EI_MAG0] !=
(ELFMAG0 << 24 | ELFMAG1 << 16 | ELFMAG2 << 8 | ELFMAG3) ||
e32hdr->e_ident[EI_VERSION] != EV_CURRENT)
return 1; /* Not an ELF */
/* file and machine type */
- if (*(u_int32_t *)&e32hdr->e_type != (ET_EXEC << 16 | EM_PARISC))
+ if (*(uint32_t *)&e32hdr->e_type != (ET_EXEC << 16 | EM_PARISC))
return 1; /* Not an executable / Wrong architecture */
- if ((class_data = *(u_int16_t *)&e32hdr->e_ident[EI_CLASS]) ==
+ if ((class_data = *(uint16_t *)&e32hdr->e_ident[EI_CLASS]) ==
(ELFCLASS32 << 8 | ELFDATA2MSB)) {
/* support one section executable (ld -N) only */
diff -r a713395e060a -r 2c0754074e06 sys/arch/hp700/stand/xxboot/readufs.h
--- a/sys/arch/hp700/stand/xxboot/readufs.h Mon Feb 27 20:11:56 2012 +0000
+++ b/sys/arch/hp700/stand/xxboot/readufs.h Mon Feb 27 20:13:30 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: readufs.h,v 1.5 2011/02/21 02:31:57 itohy Exp $ */
+/* $NetBSD: readufs.h,v 1.5.10.1 2012/02/27 20:13:30 riz Exp $ */
/* from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp */
/*
@@ -76,9 +76,9 @@
#endif
/* superblock information */
- u_int32_t bsize; /* fs block size */
- u_int32_t nindir; /* # indirect per block */
- u_int32_t fsbtodb; /* block -> sector shift count */
+ uint32_t bsize; /* fs block size */
+ uint32_t nindir; /* # indirect per block */
+ uint32_t fsbtodb; /* block -> sector shift count */
union {
#ifdef USE_FFS
struct {
@@ -94,14 +94,14 @@
#endif
#ifdef USE_LFS
struct {
- u_int32_t version; /* LFS version # */
+ uint32_t version; /* LFS version # */
daddr_t idaddr; /* ifile inode disk address */
- u_int32_t inopb; /* inodes per block (v1) */
+ uint32_t inopb; /* inodes per block (v1) */
/* inodes per frag (v2) */
- u_int32_t ifpb; /* inode addrs / ifile block */
- u_int32_t ioffset; /* start of inode in ifile */
+ uint32_t ifpb; /* inode addrs / ifile block */
+ uint32_t ioffset; /* start of inode in ifile */
/* (in sector) */
- u_int32_t ibsize; /* size of inode block */
+ uint32_t ibsize; /* size of inode block */
} u_lfs;
#endif
} fs_u;
Home |
Main Index |
Thread Index |
Old Index