diff options
-rw-r--r-- | docs/busybox.net/FAQ.html | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/docs/busybox.net/FAQ.html b/docs/busybox.net/FAQ.html index aa2a5f772..ac4e90a41 100644 --- a/docs/busybox.net/FAQ.html +++ b/docs/busybox.net/FAQ.html | |||
@@ -802,7 +802,7 @@ file is at least worth a look. Special-case code in the body of an applet is | |||
802 | something we're trying to avoid.</p> | 802 | something we're trying to avoid.</p> |
803 | 803 | ||
804 | <hr /> | 804 | <hr /> |
805 | <h2><a name="tips" />Programming tips and tricks.</a></h2> | 805 | <h2><a name="tips">Programming tips and tricks.</a></h2> |
806 | 806 | ||
807 | <p>Various things busybox uses that aren't particularly well documented | 807 | <p>Various things busybox uses that aren't particularly well documented |
808 | elsewhere.</p> | 808 | elsewhere.</p> |
@@ -1040,7 +1040,8 @@ to measure).</p> | |||
1040 | <hr /> | 1040 | <hr /> |
1041 | <h2><a name="tips_kernel_headers"></a>Including kernel headers</h2> | 1041 | <h2><a name="tips_kernel_headers"></a>Including kernel headers</h2> |
1042 | 1042 | ||
1043 | <p>The "linux" or "asm" directories of /usr/include contain Linux kernel | 1043 | <p>The "linux" or "asm" directories of /usr/include |
1044 | contain Linux kernel | ||
1044 | headers, so that the C library can talk directly to the Linux kernel. In | 1045 | headers, so that the C library can talk directly to the Linux kernel. In |
1045 | a perfect world, applications shouldn't include these headers directly, but | 1046 | a perfect world, applications shouldn't include these headers directly, but |
1046 | we don't live in a perfect world.</p> | 1047 | we don't live in a perfect world.</p> |
@@ -1050,7 +1051,7 @@ we don't live in a perfect world.</p> | |||
1050 | Attempts to cut and paste the information into a local busybox header file | 1051 | Attempts to cut and paste the information into a local busybox header file |
1051 | proved incredibly painful, because portions of the loop_info structure vary by | 1052 | proved incredibly painful, because portions of the loop_info structure vary by |
1052 | architecture, namely the type __kernel_dev_t has different sizes on alpha, | 1053 | architecture, namely the type __kernel_dev_t has different sizes on alpha, |
1053 | arm, x86, and so on. Meaning we either #include <linux/posix_types.h> or | 1054 | arm, x86, and so on. Meaning we either #include <linux/posix_types.h> or |
1054 | we hardwire #ifdefs to check what platform we're building on and define this | 1055 | we hardwire #ifdefs to check what platform we're building on and define this |
1055 | type appropriately for every single hardware architecture supported by | 1056 | type appropriately for every single hardware architecture supported by |
1056 | Linux, which is simply unworkable.</p> | 1057 | Linux, which is simply unworkable.</p> |
@@ -1058,7 +1059,8 @@ Linux, which is simply unworkable.</p> | |||
1058 | <p>This is aside from the fact that the relevant type defined in | 1059 | <p>This is aside from the fact that the relevant type defined in |
1059 | posix_types.h was renamed to __kernel_old_dev_t during the 2.5 series, so | 1060 | posix_types.h was renamed to __kernel_old_dev_t during the 2.5 series, so |
1060 | to cut and paste the structure into our header we have to #include | 1061 | to cut and paste the structure into our header we have to #include |
1061 | <linux/version.h> to figure out which name to use. (What we actually do is | 1062 | <linux/version.h> to figure out which name to use. (What we actually |
1063 | do is | ||
1062 | check if we're building on 2.6, and if so just use the new 64 bit structure | 1064 | check if we're building on 2.6, and if so just use the new 64 bit structure |
1063 | instead to avoid the rename entirely.) But we still need the version | 1065 | instead to avoid the rename entirely.) But we still need the version |
1064 | check, since 2.4 didn't have the 64 bit structure.</p> | 1066 | check, since 2.4 didn't have the 64 bit structure.</p> |
@@ -1067,8 +1069,9 @@ check, since 2.4 didn't have the 64 bit structure.</p> | |||
1067 | out a clean way to do all this. There isn't one. The losetup in the | 1069 | out a clean way to do all this. There isn't one. The losetup in the |
1068 | util-linux package from kernel.org isn't doing it cleanly either, they just | 1070 | util-linux package from kernel.org isn't doing it cleanly either, they just |
1069 | hide the ugliness by nesting #include files. Their mount/loop.h | 1071 | hide the ugliness by nesting #include files. Their mount/loop.h |
1070 | #includes "my_dev_t.h", which #includes <linux/posix_types.h> and | 1072 | #includes "my_dev_t.h", which #includes <linux/posix_types.h> |
1071 | <linux/version.h> just like we do. There simply is no alternative.</p> | 1073 | and <linux/version.h> just like we do. There simply is no alternative. |
1074 | </p> | ||
1072 | 1075 | ||
1073 | <p>Just because directly #including kernel headers is sometimes | 1076 | <p>Just because directly #including kernel headers is sometimes |
1074 | unavoidable doesn't me we should include them when there's a better | 1077 | unavoidable doesn't me we should include them when there's a better |
@@ -1109,8 +1112,8 @@ vda :Denys Vlasenko - BusyBox maintainer | |||
1109 | </pre> | 1112 | </pre> |
1110 | 1113 | ||
1111 | <p>The following accounts used to exist on busybox.net, but don't anymore so | 1114 | <p>The following accounts used to exist on busybox.net, but don't anymore so |
1112 | I can't ask /etc/passwd for their names. Rob Wentworth <robwen at gmail.com> | 1115 | I can't ask /etc/passwd for their names. Rob Wentworth |
1113 | asked Google and recovered the names:</p> | 1116 | <robwen at gmail.com> asked Google and recovered the names:</p> |
1114 | 1117 | ||
1115 | <pre> | 1118 | <pre> |
1116 | aaronl :Aaron Lehmann | 1119 | aaronl :Aaron Lehmann |