xref: /OK3568_Linux_fs/buildroot/package/sp-oops-extract/0002-stdint-cleanup.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunconsolidate use of stdint types
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunChange u_int*_t to uint*_t for compatibility with a larger number of C
4*4882a593Smuzhiyunlibraries.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunSigned-off-by: Doug Kehn <rdkehn@yahoo.com>
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunIndex: sp-oops-extract-0.0.7-1/src/oopslog.c
9*4882a593Smuzhiyun===================================================================
10*4882a593Smuzhiyun--- sp-oops-extract-0.0.7-1.orig/src/oopslog.c
11*4882a593Smuzhiyun+++ sp-oops-extract-0.0.7-1/src/oopslog.c
12*4882a593Smuzhiyun@@ -64,8 +64,8 @@ static int try_to_check_for_bad_blocks(v
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun int main(const int argc, const char *argv[])
15*4882a593Smuzhiyun {
16*4882a593Smuzhiyun-	u_int32_t *count, maxcount = 0xffffffff;
17*4882a593Smuzhiyun-	u_int32_t *magic_ptr, magic_value = 0x5d005d00;
18*4882a593Smuzhiyun+	uint32_t *count, maxcount = 0xffffffff;
19*4882a593Smuzhiyun+	uint32_t *magic_ptr, magic_value = 0x5d005d00;
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun 	unsigned char *charbuf;
22*4882a593Smuzhiyun 	unsigned long size;
23*4882a593Smuzhiyun@@ -137,8 +137,8 @@ int main(const int argc, const char *arg
24*4882a593Smuzhiyun 		errx(-1, "%s is something weird", device);
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun 	charbuf = buf;
27*4882a593Smuzhiyun-	count = (u_int32_t *) buf;
28*4882a593Smuzhiyun-	magic_ptr = (u_int32_t *) (buf + sizeof(u_int32_t));
29*4882a593Smuzhiyun+	count = (uint32_t *) buf;
30*4882a593Smuzhiyun+	magic_ptr = (uint32_t *) (buf + sizeof(uint32_t));
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun 	for (i = 0; i < (size / OOPS_PAGE_SIZE); i++) {
33*4882a593Smuzhiyun 		pread(fd, buf, OOPS_PAGE_SIZE, i * OOPS_PAGE_SIZE);
34