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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
--- ufsutils-8.2.orig/lib/libufs/type.c
+++ ufsutils-8.2/lib/libufs/type.c
@@ -39,7 +39,9 @@
#include <errno.h>
#include <fcntl.h>
-#include <fstab.h>
+#ifndef __UCLIBC__
+# include <fstab.h>
+#endif
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
@@ -86,7 +88,9 @@
ufs_disk_fillout_blank(struct uufsd *disk, const char *name)
{
struct stat st;
+#ifndef __UCLIBC__
struct fstab *fs;
+#endif
struct statfs sfs;
const char *oname;
char dev[MAXPATHLEN];
@@ -114,6 +118,7 @@
} else if (ret >= 0 && (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))) {
/* This is what we need, do nothing. */
;
+#ifndef __UCLIBC__
} else if ((fs = getfsfile(name)) != NULL) {
/*
* The given mount point is listed in /etc/fstab.
@@ -125,6 +130,7 @@
* statfs(2) will point us at different file system.
*/
name = fs->fs_spec;
+#endif
} else if (ret >= 0 && S_ISDIR(st.st_mode)) {
/*
* The mount point is not listed in /etc/fstab, so it may be
--- ufsutils-8.2.orig/sbin/dumpfs/dumpfs.c
+++ ufsutils-8.2/sbin/dumpfs/dumpfs.c
@@ -66,7 +66,6 @@
#include <err.h>
#include <errno.h>
#include <fcntl.h>
-#include <fstab.h>
#include <libufs.h>
#include <time.h>
#include <stdint.h>
--- ufsutils-8.2.orig/sbin/fsck_ffs/fsutil.c
+++ ufsutils-8.2/sbin/fsck_ffs/fsutil.c
@@ -53,7 +53,6 @@
#include <errno.h>
#include <string.h>
#include <ctype.h>
-#include <fstab.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
--- ufsutils-8.2.orig/sbin/fsck_ffs/main.c
+++ ufsutils-8.2/sbin/fsck_ffs/main.c
@@ -64,7 +64,9 @@
#include <err.h>
#include <errno.h>
-#include <fstab.h>
+#ifndef __UCLIBC__
+# include <fstab.h>
+#endif
#include <grp.h>
#include <mntopts.h>
#include <paths.h>
--- ufsutils-8.2.orig/sbin/fsck_ffs/utilities.c
+++ ufsutils-8.2/sbin/fsck_ffs/utilities.c
@@ -47,7 +47,9 @@
#include <errno.h>
#include <string.h>
#include <ctype.h>
-#include <fstab.h>
+#ifndef __UCLIBC__
+# include <fstab.h>
+#endif
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
@@ -61,7 +63,9 @@
{
struct stat stblock;
char *newname, *cp;
+#ifndef __UCLIBC__
struct fstab *fsinfo;
+#endif
int retried = 0, len;
static char device[MAXPATHLEN];
@@ -91,6 +95,7 @@
if (len > 0 && origname[len] == '/')
/* remove trailing slash */
origname[len] = '\0';
+#ifndef __UCLIBC__
if ((fsinfo = getfsfile(origname)) == NULL) {
printf(
"Can't resolve %s to character special device.\n",
@@ -98,6 +103,9 @@
return (origname);
}
newname = fsinfo->fs_spec;
+#else
+ return (origname);
+#endif
retried++;
goto retry;
}
--- ufsutils-8.2.orig/sbin/tunefs/tunefs.c
+++ ufsutils-8.2/sbin/tunefs/tunefs.c
@@ -63,7 +63,6 @@
#include <ctype.h>
#include <err.h>
#include <fcntl.h>
-#include <fstab.h>
#include <libufs.h>
#include <paths.h>
#include <stdio.h>
|