summaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
blob: 8278a4fc7c5b01eb032c25820852c41a98e97051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- a/ubi-utils/libubi.c	2012-05-01 01:57:51.000000000 +0200
+++ b/ubi-utils/libubi.c	2012-05-01 01:55:14.000000000 +0200
@@ -382,8 +402,8 @@
 		return errmsg("\"%s\" is not a character device", node);
 	}
 
-	major = major(st.st_rdev);
-	minor = minor(st.st_rdev);
+	major = __major(st.st_rdev);
+	minor = __minor(st.st_rdev);
 
 	if (minor == 0) {
 		errno = EINVAL;
@@ -448,8 +468,8 @@
 		return errmsg("\"%s\" is not a character device", node);
 	}
 
-	major = major(st.st_rdev);
-	minor = minor(st.st_rdev);
+	major = __major(st.st_rdev);
+	minor = __minor(st.st_rdev);
 
 	if (minor != 0) {
 		errno = EINVAL;
@@ -686,7 +706,7 @@
  * success and %-1 in case of failure. @r->ubi_num contains newly created UBI
  * device number.
  */
-static int do_attach(const char *node, const struct ubi_attach_req *r)
+static int do_attach(const char *node, struct ubi_attach_req *r)
 {
 	int fd, ret;
 
@@ -757,8 +777,8 @@
 				  mtd_dev_node);
 	}
 
-	major = major(sb.st_rdev);
-	minor = minor(sb.st_rdev);
+	major = __major(sb.st_rdev);
+	minor = __minor(sb.st_rdev);
 
 	if (major != MTD_CHAR_MAJOR) {
 		errno = EINVAL;
@@ -866,8 +886,8 @@
 		return -1;
 	}
 
-	major = major(st.st_rdev);
-	minor = minor(st.st_rdev);
+	major = __major(st.st_rdev);
+	minor = __minor(st.st_rdev);
 
 	if (ubi_get_info((libubi_t *)lib, &info))
 		return -1;