Merge "Remove pathconf's dependencies on non-uapi header files."

This commit is contained in:
Elliott Hughes 2013-11-07 01:32:27 +00:00 committed by Gerrit Code Review
commit a034e1d3e0

View File

@ -25,11 +25,10 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <pathconf.h> #include <pathconf.h>
#include <sys/vfs.h> #include <sys/vfs.h>
#include <sys/limits.h> #include <sys/limits.h>
#include <linux/ext2_fs.h>
#include <linux/ext3_fs.h>
#include <errno.h> #include <errno.h>
/* these may not be defined yet by our headers */ /* these may not be defined yet by our headers */
@ -82,14 +81,12 @@ __filesizebits( struct statfs* s )
static long static long
__link_max( struct statfs* s ) __link_max( struct statfs* s )
{ {
/* constant values were taken from official kernel headers. // These constant values were taken from kernel headers.
* I don't think this justified bringing in <linux/minix_fs.h> et al // They're not available in uapi headers.
* into our cleaned-up kernel three
*/
static const struct { uint32_t type; int max; } knownMax[] = static const struct { uint32_t type; int max; } knownMax[] =
{ {
{ EXT2_SUPER_MAGIC, EXT2_LINK_MAX }, { EXT2_SUPER_MAGIC, 32000 },
{ EXT3_SUPER_MAGIC, EXT3_LINK_MAX }, { EXT3_SUPER_MAGIC, 32000 },
{ MINIX_SUPER_MAGIC, 250 }, { MINIX_SUPER_MAGIC, 250 },
{ MINIX2_SUPER_MAGIC, 65530 }, { MINIX2_SUPER_MAGIC, 65530 },
{ REISERFS_SUPER_MAGIC, 0xffff - 1000 }, { REISERFS_SUPER_MAGIC, 0xffff - 1000 },