# 1 "unix.c" # 1 "" #define __STDC__ 1 # 1 "" #define __STDC_HOSTED__ 1 # 1 "" #define __GNUC__ 4 # 1 "" #define __GNUC_MINOR__ 1 # 1 "" #define __GNUC_PATCHLEVEL__ 2 # 1 "" #define __SIZE_TYPE__ unsigned int # 1 "" #define __PTRDIFF_TYPE__ int # 1 "" #define __WCHAR_TYPE__ long int # 1 "" #define __WINT_TYPE__ unsigned int # 1 "" #define __INTMAX_TYPE__ long long int # 1 "" #define __UINTMAX_TYPE__ long long unsigned int # 1 "" #define __GXX_ABI_VERSION 1002 # 1 "" #define __SCHAR_MAX__ 127 # 1 "" #define __SHRT_MAX__ 32767 # 1 "" #define __INT_MAX__ 2147483647 # 1 "" #define __LONG_MAX__ 2147483647L # 1 "" #define __LONG_LONG_MAX__ 9223372036854775807LL # 1 "" #define __WCHAR_MAX__ 2147483647 # 1 "" #define __CHAR_BIT__ 8 # 1 "" #define __INTMAX_MAX__ 9223372036854775807LL # 1 "" #define __FLT_EVAL_METHOD__ 2 # 1 "" #define __FLT_RADIX__ 2 # 1 "" #define __FLT_MANT_DIG__ 24 # 1 "" #define __FLT_DIG__ 6 # 1 "" #define __FLT_MIN_EXP__ (-125) # 1 "" #define __FLT_MIN_10_EXP__ (-37) # 1 "" #define __FLT_MAX_EXP__ 128 # 1 "" #define __FLT_MAX_10_EXP__ 38 # 1 "" #define __FLT_MAX__ 3.40282347e+38F # 1 "" #define __FLT_MIN__ 1.17549435e-38F # 1 "" #define __FLT_EPSILON__ 1.19209290e-7F # 1 "" #define __FLT_DENORM_MIN__ 1.40129846e-45F # 1 "" #define __FLT_HAS_INFINITY__ 1 # 1 "" #define __FLT_HAS_QUIET_NAN__ 1 # 1 "" #define __DBL_MANT_DIG__ 53 # 1 "" #define __DBL_DIG__ 15 # 1 "" #define __DBL_MIN_EXP__ (-1021) # 1 "" #define __DBL_MIN_10_EXP__ (-307) # 1 "" #define __DBL_MAX_EXP__ 1024 # 1 "" #define __DBL_MAX_10_EXP__ 308 # 1 "" #define __DBL_MAX__ 1.7976931348623157e+308 # 1 "" #define __DBL_MIN__ 2.2250738585072014e-308 # 1 "" #define __DBL_EPSILON__ 2.2204460492503131e-16 # 1 "" #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 # 1 "" #define __DBL_HAS_INFINITY__ 1 # 1 "" #define __DBL_HAS_QUIET_NAN__ 1 # 1 "" #define __LDBL_MANT_DIG__ 64 # 1 "" #define __LDBL_DIG__ 18 # 1 "" #define __LDBL_MIN_EXP__ (-16381) # 1 "" #define __LDBL_MIN_10_EXP__ (-4931) # 1 "" #define __LDBL_MAX_EXP__ 16384 # 1 "" #define __LDBL_MAX_10_EXP__ 4932 # 1 "" #define __DECIMAL_DIG__ 21 # 1 "" #define __LDBL_MAX__ 1.18973149535723176502e+4932L # 1 "" #define __LDBL_MIN__ 3.36210314311209350626e-4932L # 1 "" #define __LDBL_EPSILON__ 1.08420217248550443401e-19L # 1 "" #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L # 1 "" #define __LDBL_HAS_INFINITY__ 1 # 1 "" #define __LDBL_HAS_QUIET_NAN__ 1 # 1 "" #define __REGISTER_PREFIX__ # 1 "" #define __USER_LABEL_PREFIX__ # 1 "" #define __VERSION__ "4.1.2 (Gentoo 4.1.2 p1.0.2)" # 1 "" #define __OPTIMIZE__ 1 # 1 "" #define __FINITE_MATH_ONLY__ 0 # 1 "" #define __i386 1 # 1 "" #define __i386__ 1 # 1 "" #define i386 1 # 1 "" #define __tune_athlon__ 1 # 1 "" #define __tune_athlon_sse__ 1 # 1 "" #define __MMX__ 1 # 1 "" #define __3dNOW__ 1 # 1 "" #define __3dNOW_A__ 1 # 1 "" #define __SSE__ 1 # 1 "" #define __athlon 1 # 1 "" #define __athlon__ 1 # 1 "" #define __athlon_sse__ 1 # 1 "" #define __gnu_linux__ 1 # 1 "" #define __linux 1 # 1 "" #define __linux__ 1 # 1 "" #define linux 1 # 1 "" #define __unix 1 # 1 "" #define __unix__ 1 # 1 "" #define unix 1 # 1 "" #define __ELF__ 1 # 1 "" #define LOCALEDIR "/usr/share/locale" # 1 "" #define ROOT_SYSCONFDIR "/etc" # 1 "" #define PACKAGE_NAME "" # 1 "" #define PACKAGE_TARNAME "" # 1 "" #define PACKAGE_VERSION "" # 1 "" #define PACKAGE_STRING "" # 1 "" #define PACKAGE_BUGREPORT "" # 1 "" #define STDC_HEADERS 1 # 1 "" #define HAVE_SYS_TYPES_H 1 # 1 "" #define HAVE_SYS_STAT_H 1 # 1 "" #define HAVE_STDLIB_H 1 # 1 "" #define HAVE_STRING_H 1 # 1 "" #define HAVE_MEMORY_H 1 # 1 "" #define HAVE_STRINGS_H 1 # 1 "" #define HAVE_INTTYPES_H 1 # 1 "" #define HAVE_STDINT_H 1 # 1 "" #define HAVE_UNISTD_H 1 # 1 "" #define ENABLE_HTREE 1 # 1 "" #define ENABLE_SWAPFS 1 # 1 "" #define TLS __thread # 1 "" #define USE_UUIDD 1 # 1 "" #define PACKAGE "e2fsprogs" # 1 "" #define VERSION "0.14.1" # 1 "" #define HAVE_LONG_LONG 1 # 1 "" #define HAVE_LONG_DOUBLE 1 # 1 "" #define HAVE_WCHAR_T 1 # 1 "" #define HAVE_WINT_T 1 # 1 "" #define HAVE_INTTYPES_H_WITH_UINTMAX 1 # 1 "" #define HAVE_STDINT_H_WITH_UINTMAX 1 # 1 "" #define HAVE_INTMAX_T 1 # 1 "" #define HAVE_POSIX_PRINTF 1 # 1 "" #define HAVE_ALLOCA_H 1 # 1 "" #define HAVE_ALLOCA 1 # 1 "" #define HAVE_STDLIB_H 1 # 1 "" #define HAVE_UNISTD_H 1 # 1 "" #define HAVE_GETPAGESIZE 1 # 1 "" #define HAVE_MMAP 1 # 1 "" #define INTDIV0_RAISES_SIGFPE 1 # 1 "" #define HAVE_UNSIGNED_LONG_LONG 1 # 1 "" #define HAVE_UINTMAX_T 1 # 1 "" #define HAVE_INTTYPES_H 1 # 1 "" #define HAVE_STDINT_H 1 # 1 "" #define HAVE_STDINT_H 1 # 1 "" #define HAVE_ARGZ_H 1 # 1 "" #define HAVE_LIMITS_H 1 # 1 "" #define HAVE_LOCALE_H 1 # 1 "" #define HAVE_NL_TYPES_H 1 # 1 "" #define HAVE_MALLOC_H 1 # 1 "" #define HAVE_STDDEF_H 1 # 1 "" #define HAVE_STDLIB_H 1 # 1 "" #define HAVE_STRING_H 1 # 1 "" #define HAVE_UNISTD_H 1 # 1 "" #define HAVE_SYS_PARAM_H 1 # 1 "" #define HAVE_ASPRINTF 1 # 1 "" #define HAVE_FWPRINTF 1 # 1 "" #define HAVE_GETCWD 1 # 1 "" #define HAVE_GETEGID 1 # 1 "" #define HAVE_GETEUID 1 # 1 "" #define HAVE_GETGID 1 # 1 "" #define HAVE_GETUID 1 # 1 "" #define HAVE_MEMPCPY 1 # 1 "" #define HAVE_MUNMAP 1 # 1 "" #define HAVE_PUTENV 1 # 1 "" #define HAVE_SETENV 1 # 1 "" #define HAVE_SETLOCALE 1 # 1 "" #define HAVE_SNPRINTF 1 # 1 "" #define HAVE_STPCPY 1 # 1 "" #define HAVE_STRCASECMP 1 # 1 "" #define HAVE_STRDUP 1 # 1 "" #define HAVE_STRTOUL 1 # 1 "" #define HAVE_TSEARCH 1 # 1 "" #define HAVE_WCSLEN 1 # 1 "" #define HAVE___ARGZ_COUNT 1 # 1 "" #define HAVE___ARGZ_STRINGIFY 1 # 1 "" #define HAVE___ARGZ_NEXT 1 # 1 "" #define HAVE___FSETLOCKING 1 # 1 "" #define HAVE_DECL__SNPRINTF 0 # 1 "" #define HAVE_DECL__SNWPRINTF 0 # 1 "" #define HAVE_DECL_FEOF_UNLOCKED 1 # 1 "" #define HAVE_DECL_FGETS_UNLOCKED 0 # 1 "" #define HAVE_DECL_GETC_UNLOCKED 1 # 1 "" #define HAVE_ICONV 1 # 1 "" #define ICONV_CONST # 1 "" #define HAVE_LANGINFO_CODESET 1 # 1 "" #define HAVE_LC_MESSAGES 1 # 1 "" #define ENABLE_NLS 1 # 1 "" #define HAVE_GETTEXT 1 # 1 "" #define HAVE_DCGETTEXT 1 # 1 "" #define HAVE_STDLIB_H 1 # 1 "" #define HAVE_UNISTD_H 1 # 1 "" #define HAVE_STDARG_H 1 # 1 "" #define HAVE_STDINT_H 1 # 1 "" #define HAVE_ERRNO_H 1 # 1 "" #define HAVE_MALLOC_H 1 # 1 "" #define HAVE_MNTENT_H 1 # 1 "" #define HAVE_PATHS_H 1 # 1 "" #define HAVE_DIRENT_H 1 # 1 "" #define HAVE_GETOPT_H 1 # 1 "" #define HAVE_SETJMP_H 1 # 1 "" #define HAVE_SIGNAL_H 1 # 1 "" #define HAVE_TERMIOS_H 1 # 1 "" #define HAVE_LINUX_FD_H 1 # 1 "" #define HAVE_LINUX_MAJOR_H 1 # 1 "" #define HAVE_SYS_IOCTL_H 1 # 1 "" #define HAVE_SYS_MMAN_H 1 # 1 "" #define HAVE_SYS_PRCTL_H 1 # 1 "" #define HAVE_SYS_QUEUE_H 1 # 1 "" #define HAVE_SYS_SOCKET_H 1 # 1 "" #define HAVE_SYS_SYSMACROS_H 1 # 1 "" #define HAVE_SYS_TIME_H 1 # 1 "" #define HAVE_SYS_STAT_H 1 # 1 "" #define HAVE_SYS_TYPES_H 1 # 1 "" #define HAVE_SYS_WAIT_H 1 # 1 "" #define HAVE_SYS_RESOURCE_H 1 # 1 "" #define HAVE_SYS_SYSCALL_H 1 # 1 "" #define HAVE_NETINET_IN_H 1 # 1 "" #define HAVE_UTIME_H 1 # 1 "" #define HAVE_SYS_MOUNT_H 1 # 1 "" #define HAVE_NET_IF_H 1 # 1 "" #define HAVE_VPRINTF 1 # 1 "" #define HAVE_RECLEN_DIRENT 1 # 1 "" #define HAVE_TYPE_SSIZE_T 1 # 1 "" #define HAVE_LSEEK64_PROTOTYPE 1 # 1 "" #define SIZEOF_SHORT 2 # 1 "" #define SIZEOF_INT 4 # 1 "" #define SIZEOF_LONG 4 # 1 "" #define SIZEOF_LONG_LONG 8 # 1 "" #define HAVE_INTTYPES_H 1 # 1 "" #define HAVE_INTPTR_T 1 # 1 "" #define HAVE_GETRUSAGE 1 # 1 "" #define HAVE_LLSEEK 1 # 1 "" #define HAVE_LSEEK64 1 # 1 "" #define HAVE_OPEN64 1 # 1 "" #define HAVE_FSTAT64 1 # 1 "" #define HAVE_STRTOULL 1 # 1 "" #define HAVE_STRCASECMP 1 # 1 "" #define HAVE_SRANDOM 1 # 1 "" #define HAVE_JRAND48 1 # 1 "" #define HAVE_FCHOWN 1 # 1 "" #define HAVE_MALLINFO 1 # 1 "" #define HAVE_FDATASYNC 1 # 1 "" #define HAVE_STRNLEN 1 # 1 "" #define HAVE_STRPTIME 1 # 1 "" #define HAVE_STRDUP 1 # 1 "" #define HAVE_SYSCONF 1 # 1 "" #define HAVE_PATHCONF 1 # 1 "" #define HAVE_POSIX_MEMALIGN 1 # 1 "" #define HAVE_MEMALIGN 1 # 1 "" #define HAVE_VALLOC 1 # 1 "" #define HAVE___SECURE_GETENV 1 # 1 "" #define HAVE_PRCTL 1 # 1 "" #define HAVE_MMAP 1 # 1 "" #define HAVE_UTIME 1 # 1 "" #define HAVE_SETRESUID 1 # 1 "" #define HAVE_SETRESGID 1 # 1 "" #define HAVE_DLOPEN 1 # 1 "" #define HAVE_EXT2_IOCTLS 1 # 1 "" #define RESOURCE_TRACK 1 # 1 "unix.c" # 12 "unix.c" # 1 "/usr/include/stdio.h" 1 3 4 # 27 "/usr/include/stdio.h" 3 4 #define _STDIO_H 1 # 1 "/usr/include/features.h" 1 3 4 # 20 "/usr/include/features.h" 3 4 #define _FEATURES_H 1 # 92 "/usr/include/features.h" 3 4 #undef __USE_ISOC99 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_BSD #undef __USE_SVID #undef __USE_MISC #undef __USE_ATFILE #undef __USE_GNU #undef __USE_REENTRANT #undef __USE_FORTIFY_LEVEL #undef __FAVOR_BSD #undef __KERNEL_STRICT_NAMES #define __KERNEL_STRICT_NAMES #define __USE_ANSI 1 # 131 "/usr/include/features.h" 3 4 #define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) # 174 "/usr/include/features.h" 3 4 #define _BSD_SOURCE 1 #define _SVID_SOURCE 1 # 191 "/usr/include/features.h" 3 4 #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 200112L #define __USE_POSIX 1 #define __USE_POSIX2 1 #define __USE_POSIX199309 1 #define __USE_POSIX199506 1 #define __USE_XOPEN2K 1 # 253 "/usr/include/features.h" 3 4 #define __USE_MISC 1 #define __USE_BSD 1 #define __USE_SVID 1 # 284 "/usr/include/features.h" 3 4 #define __USE_FORTIFY_LEVEL 0 #define __STDC_IEC_559__ 1 #define __STDC_IEC_559_COMPLEX__ 1 #define __STDC_ISO_10646__ 200009L #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 #define __GLIBC__ 2 #define __GLIBC_MINOR__ 6 #define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) #define __GLIBC_HAVE_LONG_LONG 1 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 21 "/usr/include/sys/cdefs.h" 3 4 #define _SYS_CDEFS_H 1 # 36 "/usr/include/sys/cdefs.h" 3 4 #undef __P #undef __PMT # 47 "/usr/include/sys/cdefs.h" 3 4 #define __THROW __attribute__ ((__nothrow__)) #define __NTH(fct) __attribute__ ((__nothrow__)) fct # 74 "/usr/include/sys/cdefs.h" 3 4 #define __P(args) args #define __PMT(args) args #define __CONCAT(x,y) x ## y #define __STRING(x) #x #define __ptr_t void * #define __long_double_t long double #define __BEGIN_DECLS #define __END_DECLS # 114 "/usr/include/sys/cdefs.h" 3 4 #define __BEGIN_NAMESPACE_STD #define __END_NAMESPACE_STD #define __USING_NAMESPACE_STD(name) #define __BEGIN_NAMESPACE_C99 #define __END_NAMESPACE_C99 #define __USING_NAMESPACE_C99(name) #define __bounded #define __unbounded #define __ptrvalue #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) #define __warndecl(name,msg) extern void name (void) #define __flexarr [] # 167 "/usr/include/sys/cdefs.h" 3 4 #define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) #define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW #define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) #define __ASMNAME2(prefix,cname) __STRING (prefix) cname # 197 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_malloc__ __attribute__ ((__malloc__)) # 206 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_pure__ __attribute__ ((__pure__)) # 215 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_used__ __attribute__ ((__used__)) #define __attribute_noinline__ __attribute__ ((__noinline__)) #define __attribute_deprecated__ __attribute__ ((__deprecated__)) # 236 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) # 246 "/usr/include/sys/cdefs.h" 3 4 #define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) # 255 "/usr/include/sys/cdefs.h" 3 4 #define __nonnull(params) __attribute__ ((__nonnull__ params)) #define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) # 272 "/usr/include/sys/cdefs.h" 3 4 #define __wur #define __always_inline __inline __attribute__ ((__always_inline__)) # 289 "/usr/include/sys/cdefs.h" 3 4 #define __extern_inline extern __inline #define __extern_always_inline extern __always_inline # 310 "/usr/include/sys/cdefs.h" 3 4 #define __restrict_arr __restrict # 324 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 325 "/usr/include/sys/cdefs.h" 2 3 4 # 342 "/usr/include/sys/cdefs.h" 3 4 #define __LDBL_REDIR1(name,proto,alias) name proto #define __LDBL_REDIR(name,proto) name proto #define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW #define __LDBL_REDIR_NTH(name,proto) name proto __THROW #define __LDBL_REDIR_DECL(name) # 323 "/usr/include/features.h" 2 3 4 # 337 "/usr/include/features.h" 3 4 #define __USE_EXTERN_INLINES 1 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 5 "/usr/include/gnu/stubs.h" 2 3 4 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 # 10 "/usr/include/gnu/stubs-32.h" 3 4 #define __stub___kernel_cosl #define __stub___kernel_sinl #define __stub___kernel_tanl #define __stub_chflags #define __stub_fattach #define __stub_fchflags #define __stub_fdetach #define __stub_gtty #define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk #define __stub_stty # 8 "/usr/include/gnu/stubs.h" 2 3 4 # 346 "/usr/include/features.h" 2 3 4 # 29 "/usr/include/stdio.h" 2 3 4 #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 189 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #define __size_t__ #define __SIZE_T__ #define _SIZE_T #define _SYS_SIZE_T_H #define _T_SIZE_ #define _T_SIZE #define __SIZE_T #define _SIZE_T_ #define _BSD_SIZE_T_ #define _SIZE_T_DEFINED_ #define _SIZE_T_DEFINED #define _BSD_SIZE_T_DEFINED_ #define _SIZE_T_DECLARED #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ #define __size_t typedef unsigned int size_t; # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 35 "/usr/include/stdio.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 25 "/usr/include/bits/types.h" 3 4 #define _BITS_TYPES_H 1 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 29 "/usr/include/bits/types.h" 2 3 4 #define __need_size_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_NULL # 32 "/usr/include/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; # 102 "/usr/include/bits/types.h" 3 4 #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #define __SQUAD_TYPE __quad_t #define __UQUAD_TYPE __u_quad_t #define __SWORD_TYPE int #define __UWORD_TYPE unsigned int #define __SLONG32_TYPE long int #define __ULONG32_TYPE unsigned long int #define __S64_TYPE __quad_t #define __U64_TYPE __u_quad_t #define __STD_TYPE __extension__ typedef # 134 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 25 "/usr/include/bits/typesizes.h" 3 4 #define _BITS_TYPESIZES_H 1 #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __ULONGWORD_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __UWORD_TYPE #define __OFF_T_TYPE __SLONGWORD_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __ULONGWORD_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SLONGWORD_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __SWBLK_T_TYPE __SLONGWORD_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __FD_SETSIZE 1024 # 135 "/usr/include/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; #undef __STD_TYPE # 37 "/usr/include/stdio.h" 2 3 4 #define __need_FILE #define __need___FILE struct _IO_FILE; typedef struct _IO_FILE FILE; #define __FILE_defined 1 #undef __need_FILE typedef struct _IO_FILE __FILE; #define ____FILE_defined 1 #undef __need___FILE #define _STDIO_USES_IOSTREAM # 1 "/usr/include/libio.h" 1 3 4 # 30 "/usr/include/libio.h" 3 4 #define _IO_STDIO_H # 1 "/usr/include/_G_config.h" 1 3 4 #define _G_config_h 1 #define __need_size_t #define __need_wchar_t #define __need_wint_t #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 265 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #define __wchar_t__ #define __WCHAR_T__ #define _WCHAR_T #define _T_WCHAR_ #define _T_WCHAR #define __WCHAR_T #define _WCHAR_T_ #define _BSD_WCHAR_T_ #define _WCHAR_T_DEFINED_ #define _WCHAR_T_DEFINED #define _WCHAR_T_H #define ___int_wchar_t_h #define __INT_WCHAR_T_H #define _GCC_WCHAR_T #define _WCHAR_T_DECLARED # 292 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef _BSD_WCHAR_T_ # 326 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 typedef long int wchar_t; # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t #define _WINT_T typedef unsigned int wint_t; #undef __need_wint_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 15 "/usr/include/_G_config.h" 2 3 4 # 23 "/usr/include/_G_config.h" 3 4 #define __need_mbstate_t # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/include/wchar.h" 3 4 #define __need_wint_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 357 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wint_t # 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_NULL # 49 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 21 "/usr/include/bits/wchar.h" 3 4 #define _BITS_WCHAR_H 1 #define __WCHAR_MIN (-2147483647l - 1l) #define __WCHAR_MAX (2147483647l) # 51 "/usr/include/wchar.h" 2 3 4 # 74 "/usr/include/wchar.h" 3 4 #define __mbstate_t_defined 1 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; #undef __need_mbstate_t # 25 "/usr/include/_G_config.h" 2 3 4 #define _G_size_t size_t typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; #define _G_ssize_t __ssize_t #define _G_off_t __off_t #define _G_off64_t __off64_t #define _G_pid_t __pid_t #define _G_uid_t __uid_t #define _G_wchar_t wchar_t #define _G_wint_t wint_t #define _G_stat64 stat64 # 1 "/usr/include/gconv.h" 1 3 4 # 24 "/usr/include/gconv.h" 3 4 #define _GCONV_H 1 #define __need_mbstate_t # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/include/wchar.h" 3 4 #define __need_wint_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 357 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wint_t # 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_NULL # 49 "/usr/include/wchar.h" 2 3 4 # 86 "/usr/include/wchar.h" 3 4 #undef __need_mbstate_t # 29 "/usr/include/gconv.h" 2 3 4 #define __need_size_t #define __need_wchar_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t # 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_NULL # 32 "/usr/include/gconv.h" 2 3 4 #define __UNKNOWN_10646_CHAR ((wchar_t) 0xfffd) enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; # 45 "/usr/include/_G_config.h" 2 3 4 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); #define _G_HAVE_BOOL 1 #define _G_HAVE_ATEXIT 1 #define _G_HAVE_SYS_CDEFS 1 #define _G_HAVE_SYS_WAIT 1 #define _G_NEED_STDARG_H 1 #define _G_va_list __gnuc_va_list #define _G_HAVE_PRINTF_FP 1 #define _G_HAVE_MMAP 1 #define _G_HAVE_MREMAP 1 #define _G_HAVE_LONG_DOUBLE_IO 1 #define _G_HAVE_IO_FILE_OPEN 1 #define _G_HAVE_IO_GETLINE_INFO 1 #define _G_IO_IO_FILE_VERSION 0x20001 #define _G_OPEN64 __open64 #define _G_LSEEK64 __lseek64 #define _G_MMAP64 __mmap64 #define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) #define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) #define _G_BUFSIZ 8192 #define _G_NAMES_HAVE_UNDERSCORE 0 #define _G_VTABLE_LABEL_HAS_LENGTH 1 #define _G_USING_THUNKS 1 #define _G_VTABLE_LABEL_PREFIX "__vt_" #define _G_VTABLE_LABEL_PREFIX_ID __vt_ #define _G_ARGS(ARGLIST) ARGLIST # 33 "/usr/include/libio.h" 2 3 4 #define _IO_pos_t _G_fpos_t #define _IO_fpos_t _G_fpos_t #define _IO_fpos64_t _G_fpos64_t #define _IO_size_t _G_size_t #define _IO_ssize_t _G_ssize_t #define _IO_off_t _G_off_t #define _IO_off64_t _G_off64_t #define _IO_pid_t _G_pid_t #define _IO_uid_t _G_uid_t #define _IO_iconv_t _G_iconv_t #define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT #define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE #define _IO_BUFSIZ _G_BUFSIZ #define _IO_va_list _G_va_list #define _IO_wint_t _G_wint_t #define __need___va_list # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stdarg.h" 1 3 4 # 37 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4 #undef __need___va_list #define __GNUC_VA_LIST typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 #undef _IO_va_list #define _IO_va_list __gnuc_va_list # 76 "/usr/include/libio.h" 3 4 #define _PARAMS(protos) __P(protos) #define _IO_UNIFIED_JUMPTABLES 1 #define EOF (-1) # 105 "/usr/include/libio.h" 3 4 #define _IOS_INPUT 1 #define _IOS_OUTPUT 2 #define _IOS_ATEND 4 #define _IOS_APPEND 8 #define _IOS_TRUNC 16 #define _IOS_NOCREATE 32 #define _IOS_NOREPLACE 64 #define _IOS_BIN 128 #define _IO_MAGIC 0xFBAD0000 #define _OLD_STDIO_MAGIC 0xFABC0000 #define _IO_MAGIC_MASK 0xFFFF0000 #define _IO_USER_BUF 1 #define _IO_UNBUFFERED 2 #define _IO_NO_READS 4 #define _IO_NO_WRITES 8 #define _IO_EOF_SEEN 0x10 #define _IO_ERR_SEEN 0x20 #define _IO_DELETE_DONT_CLOSE 0x40 #define _IO_LINKED 0x80 #define _IO_IN_BACKUP 0x100 #define _IO_LINE_BUF 0x200 #define _IO_TIED_PUT_GET 0x400 #define _IO_CURRENTLY_PUTTING 0x800 #define _IO_IS_APPENDING 0x1000 #define _IO_IS_FILEBUF 0x2000 #define _IO_BAD_SEEN 0x4000 #define _IO_USER_LOCK 0x8000 #define _IO_FLAGS2_MMAP 1 #define _IO_FLAGS2_NOTCANCEL 2 #define _IO_FLAGS2_USER_WBUF 8 #define _IO_SKIPWS 01 #define _IO_LEFT 02 #define _IO_RIGHT 04 #define _IO_INTERNAL 010 #define _IO_DEC 020 #define _IO_OCT 040 #define _IO_HEX 0100 #define _IO_SHOWBASE 0200 #define _IO_SHOWPOINT 0400 #define _IO_UPPERCASE 01000 #define _IO_SHOWPOS 02000 #define _IO_SCIENTIFIC 04000 #define _IO_FIXED 010000 #define _IO_UNITBUF 020000 #define _IO_STDIO 040000 #define _IO_DONT_CLOSE 0100000 #define _IO_BOOLALPHA 0200000 struct _IO_jump_t; struct _IO_FILE; # 177 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 200 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 268 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; #define _IO_file_flags _flags char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; #define __HAVE_COLUMN unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 316 "/usr/include/libio.h" 3 4 __off64_t _offset; # 325 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef struct _IO_FILE _IO_FILE; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; #define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) #define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) #define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) # 361 "/usr/include/libio.h" 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); # 413 "/usr/include/libio.h" 3 4 extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); extern wint_t __wunderflow (_IO_FILE *); extern wint_t __wuflow (_IO_FILE *); extern wint_t __woverflow (_IO_FILE *, wint_t); #define _IO_BE(expr,res) __builtin_expect ((expr), res) #define _IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define _IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr) #define _IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) #define _IO_getwc_unlocked(_fp) (_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end, 0) ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++) #define _IO_putwc_unlocked(_wch,_fp) (_IO_BE ((_fp)->_wide_data->_IO_write_ptr >= (_fp)->_wide_data->_IO_write_end, 0) ? __woverflow (_fp, _wch) : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch))) #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_peekc_locked (_IO_FILE *__fp); #define _IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); # 473 "/usr/include/libio.h" 3 4 #define _IO_peekc(_fp) _IO_peekc_unlocked (_fp) #define _IO_flockfile(_fp) #define _IO_funlockfile(_fp) #define _IO_ftrylockfile(_fp) #define _IO_cleanup_region_start(_fct,_fp) #define _IO_cleanup_region_end(_Doit) extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); # 76 "/usr/include/stdio.h" 2 3 4 # 89 "/usr/include/stdio.h" 3 4 typedef _G_fpos_t fpos_t; #define _IOFBF 0 #define _IOLBF 1 #define _IONBF 2 #define BUFSIZ _IO_BUFSIZ # 121 "/usr/include/stdio.h" 3 4 #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define P_tmpdir "/tmp" # 141 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 24 "/usr/include/bits/stdio_lim.h" 3 4 #define L_tmpnam 20 #define TMP_MAX 238328 #define FILENAME_MAX 4096 #define L_ctermid 9 #define L_cuserid 9 #undef FOPEN_MAX #define FOPEN_MAX 16 # 142 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; #define stdin stdin #define stdout stdout #define stderr stderr extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); extern FILE *tmpfile (void) ; # 186 "/usr/include/stdio.h" 3 4 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ; extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ; # 204 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 229 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 243 "/usr/include/stdio.h" 3 4 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; # 272 "/usr/include/stdio.h" 3 4 # 283 "/usr/include/stdio.h" 3 4 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ; # 304 "/usr/include/stdio.h" 3 4 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__)); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__)); extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); # 398 "/usr/include/stdio.h" 3 4 extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); # 440 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); #define getc(_fp) _IO_getc (_fp) extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 475 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); #define putc(_ch,_fp) _IO_putc (_ch, _fp) # 508 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern char *gets (char *__s) ; # 589 "/usr/include/stdio.h" 3 4 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) ; # 642 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream); # 678 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; # 697 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); # 720 "/usr/include/stdio.h" 3 4 # 729 "/usr/include/stdio.h" 3 4 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void perror (__const char *__s); # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 # 27 "/usr/include/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern __const char *__const sys_errlist[]; # 759 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; # 778 "/usr/include/stdio.h" 3 4 extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); # 818 "/usr/include/stdio.h" 3 4 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); # 839 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 # 27 "/usr/include/bits/stdio.h" 3 4 #define __STDIO_INLINE __extern_inline extern __inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } extern __inline int getchar (void) { return _IO_getc (stdin); } extern __inline int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } # 121 "/usr/include/bits/stdio.h" 3 4 extern __inline int __attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x10) != 0); } extern __inline int __attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) { return (((__stream)->_flags & 0x20) != 0); } #define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = _IO_getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream)))) # 164 "/usr/include/bits/stdio.h" 3 4 #define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream)))) # 186 "/usr/include/bits/stdio.h" 3 4 #undef __STDIO_INLINE # 840 "/usr/include/stdio.h" 2 3 4 # 848 "/usr/include/stdio.h" 3 4 # 13 "unix.c" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 28 "/usr/include/stdlib.h" 3 4 #define __need_size_t #define __need_wchar_t #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 34 "/usr/include/stdlib.h" 2 3 4 #define _STDLIB_H 1 # 96 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; #define __ldiv_t_defined 1 # 129 "/usr/include/stdlib.h" 3 4 #define RAND_MAX 2147483647 #define EXIT_FAILURE 1 #define EXIT_SUCCESS 0 #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ; extern double atof (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (__const char *__nptr) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 182 "/usr/include/stdlib.h" 3 4 extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 279 "/usr/include/stdlib.h" 3 4 extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; #define __strtol_internal_defined 1 extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; #define __strtoul_internal_defined 1 __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; #define __strtoll_internal_defined 1 __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; #define __strtoull_internal_defined 1 extern __inline double __attribute__ ((__nothrow__)) strtod (__const char *__restrict __nptr, char **__restrict __endptr) { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int __attribute__ ((__nothrow__)) strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int __attribute__ ((__nothrow__)) strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoul_internal (__nptr, __endptr, __base, 0); } # 364 "/usr/include/stdlib.h" 3 4 __extension__ extern __inline long long int __attribute__ ((__nothrow__)) strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double __attribute__ ((__nothrow__)) atof (__const char *__nptr) { return strtod (__nptr, (char **) ((void *)0)); } extern __inline int __attribute__ ((__nothrow__)) atoi (__const char *__nptr) { return (int) strtol (__nptr, (char **) ((void *)0), 10); } extern __inline long int __attribute__ ((__nothrow__)) atol (__const char *__nptr) { return strtol (__nptr, (char **) ((void *)0), 10); } __extension__ extern __inline long long int __attribute__ ((__nothrow__)) atoll (__const char *__nptr) { return strtoll (__nptr, (char **) ((void *)0), 10); } # 429 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ; extern long int a64l (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; # 1 "/usr/include/sys/types.h" 1 3 4 # 25 "/usr/include/sys/types.h" 3 4 #define _SYS_TYPES_H 1 typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; #define __u_char_defined typedef __loff_t loff_t; typedef __ino_t ino_t; #define __ino_t_defined typedef __dev_t dev_t; #define __dev_t_defined typedef __gid_t gid_t; #define __gid_t_defined typedef __mode_t mode_t; #define __mode_t_defined typedef __nlink_t nlink_t; #define __nlink_t_defined typedef __uid_t uid_t; #define __uid_t_defined typedef __off_t off_t; #define __off_t_defined typedef __pid_t pid_t; #define __pid_t_defined typedef __id_t id_t; #define __id_t_defined typedef __ssize_t ssize_t; #define __ssize_t_defined typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; #define __daddr_t_defined typedef __key_t key_t; #define __key_t_defined #define __need_time_t #define __need_timer_t #define __need_clockid_t # 1 "/usr/include/time.h" 1 3 4 # 68 "/usr/include/time.h" 3 4 #undef __need_clock_t #define __time_t_defined 1 typedef __time_t time_t; #undef __need_time_t #define __clockid_t_defined 1 typedef __clockid_t clockid_t; #undef __clockid_time_t #define __timer_t_defined 1 typedef __timer_t timer_t; #undef __need_timer_t # 128 "/usr/include/time.h" 3 4 #undef __need_timespec # 134 "/usr/include/sys/types.h" 2 3 4 # 146 "/usr/include/sys/types.h" 3 4 #define __need_size_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_NULL # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 188 "/usr/include/sys/types.h" 3 4 #define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE))) #define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE))) #define __int8_t_defined typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); #define __BIT_TYPES_DEFINED__ 1 # 1 "/usr/include/endian.h" 1 3 4 # 20 "/usr/include/endian.h" 3 4 #define _ENDIAN_H 1 # 32 "/usr/include/endian.h" 3 4 #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 # 1 "/usr/include/bits/endian.h" 1 3 4 #define __BYTE_ORDER __LITTLE_ENDIAN # 38 "/usr/include/endian.h" 2 3 4 #define __FLOAT_WORD_ORDER __BYTE_ORDER #define LITTLE_ENDIAN __LITTLE_ENDIAN #define BIG_ENDIAN __BIG_ENDIAN #define PDP_ENDIAN __PDP_ENDIAN #define BYTE_ORDER __BYTE_ORDER #define __LONG_LONG_PAIR(HI,LO) LO, HI # 218 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 23 "/usr/include/sys/select.h" 3 4 #define _SYS_SELECT_H 1 # 1 "/usr/include/bits/select.h" 1 3 4 # 26 "/usr/include/bits/select.h" 3 4 #define __FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0) # 37 "/usr/include/bits/select.h" 3 4 #define __FD_SET(fd,fdsp) __asm__ __volatile__ ("btsl %1,%0" : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) : "r" (((int) (fd)) % __NFDBITS) : "cc","memory") #define __FD_CLR(fd,fdsp) __asm__ __volatile__ ("btrl %1,%0" : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) : "r" (((int) (fd)) % __NFDBITS) : "cc","memory") #define __FD_ISSET(fd,fdsp) (__extension__ ({register char __result; __asm__ __volatile__ ("btl %1,%2 ; setcb %b0" : "=q" (__result) : "r" (((int) (fd)) % __NFDBITS), "m" (__FDS_BITS (fdsp)[__FDELT (fd)]) : "cc"); __result; })) # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 22 "/usr/include/bits/sigset.h" 3 4 #define _SIGSET_H_types 1 typedef int __sig_atomic_t; #define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 #define __sigset_t_defined typedef __sigset_t sigset_t; #define __need_time_t #define __need_timespec # 1 "/usr/include/time.h" 1 3 4 # 68 "/usr/include/time.h" 3 4 #undef __need_clock_t # 84 "/usr/include/time.h" 3 4 #undef __need_time_t # 96 "/usr/include/time.h" 3 4 #undef __clockid_time_t # 108 "/usr/include/time.h" 3 4 #undef __need_timer_t #define __timespec_defined 1 struct timespec { __time_t tv_sec; long int tv_nsec; }; #undef __need_timespec # 45 "/usr/include/sys/select.h" 2 3 4 #define __need_timeval # 1 "/usr/include/bits/time.h" 1 3 4 # 62 "/usr/include/bits/time.h" 3 4 #undef __need_timeval #define _STRUCT_TIMEVAL 1 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/sys/select.h" 2 3 4 typedef __suseconds_t suseconds_t; #define __suseconds_t_defined typedef long int __fd_mask; #undef __NFDBITS #undef __FDELT #undef __FDMASK #define __NFDBITS (8 * sizeof (__fd_mask)) #define __FDELT(d) ((d) / __NFDBITS) #define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) typedef struct { __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))]; #define __FDS_BITS(set) ((set)->__fds_bits) } fd_set; #define FD_SETSIZE __FD_SETSIZE typedef __fd_mask fd_mask; #define NFDBITS __NFDBITS #define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) # 109 "/usr/include/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); # 221 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 22 "/usr/include/sys/sysmacros.h" 3 4 #define _SYS_SYSMACROS_H 1 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } #define major(dev) gnu_dev_major (dev) #define minor(dev) gnu_dev_minor (dev) #define makedev(maj,min) gnu_dev_makedev (maj, min) # 224 "/usr/include/sys/types.h" 2 3 4 # 235 "/usr/include/sys/types.h" 3 4 typedef __blkcnt_t blkcnt_t; #define __blkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; #define __fsblkcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; #define __fsfilcnt_t_defined # 270 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 20 "/usr/include/bits/pthreadtypes.h" 3 4 #define _BITS_PTHREADTYPES_H 1 #define __SIZEOF_PTHREAD_ATTR_T 36 #define __SIZEOF_PTHREAD_MUTEX_T 24 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_COND_COMPAT_T 12 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCK_T 32 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIER_T 20 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned int __flags; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; #define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) # 271 "/usr/include/sys/types.h" 2 3 4 # 439 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) __attribute__ ((__nothrow__)); extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) __attribute__ ((__nothrow__)); extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); extern double drand48 (void) __attribute__ ((__nothrow__)); extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) __attribute__ ((__nothrow__)); extern long int nrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) __attribute__ ((__nothrow__)); extern long int jrand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); #define __malloc_and_calloc_defined extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) __attribute__ ((__nothrow__)); extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); # 1 "/usr/include/alloca.h" 1 3 4 # 20 "/usr/include/alloca.h" 3 4 #define _ALLOCA_H 1 #define __need_size_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 409 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_NULL # 26 "/usr/include/alloca.h" 2 3 4 #undef alloca extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); #define alloca(size) __builtin_alloca (size) # 613 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 658 "/usr/include/stdlib.h" 3 4 extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern char *__secure_getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)); extern int clearenv (void) __attribute__ ((__nothrow__)); # 698 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 709 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; # 729 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int system (__const char *__command) ; # 755 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) __attribute__ ((__nothrow__)) ; #define __COMPAR_FN_T typedef int (*__compar_fn_t) (__const void *, __const void *); extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) ; extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; # 820 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ; extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) __attribute__ ((__nothrow__)); extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 925 "/usr/include/stdlib.h" 3 4 extern int posix_openpt (int __oflag) ; # 960 "/usr/include/stdlib.h" 3 4 extern int getloadavg (double __loadavg[], int __nelem) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 974 "/usr/include/stdlib.h" 3 4 #undef __need_malloc_and_calloc # 15 "unix.c" 2 # 1 "/usr/include/string.h" 1 3 4 # 24 "/usr/include/string.h" 3 4 #define _STRING_H 1 #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 82 "/usr/include/string.h" 3 4 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 130 "/usr/include/string.h" 3 4 extern char *strdup (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 181 "/usr/include/string.h" 3 4 extern size_t strcspn (__const char *__s, __const char *__reject) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); # 240 "/usr/include/string.h" 3 4 extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 254 "/usr/include/string.h" 3 4 extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); # 270 "/usr/include/string.h" 3 4 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 294 "/usr/include/string.h" 3 4 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 331 "/usr/include/string.h" 3 4 extern int strcasecmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 354 "/usr/include/string.h" 3 4 extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); # 420 "/usr/include/string.h" 3 4 # 1 "/usr/include/bits/string.h" 1 3 4 # 26 "/usr/include/bits/string.h" 3 4 #define _STRING_ARCH_unaligned 1 # 421 "/usr/include/string.h" 2 3 4 # 1 "/usr/include/bits/string2.h" 1 3 4 # 46 "/usr/include/bits/string2.h" 3 4 #define __STRING_INLINE __extern_inline # 56 "/usr/include/bits/string2.h" 3 4 #define __STRING2_SMALL_GET16(src,idx) (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 | ((__const unsigned char *) (__const char *) (src))[idx]) #define __STRING2_SMALL_GET32(src,idx) (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 | ((__const unsigned char *) (__const char *) (src))[idx]) # 93 "/usr/include/bits/string2.h" 3 4 #define __string2_1bptr_p(__x) ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) # 195 "/usr/include/bits/string2.h" 3 4 #define __bzero(s,n) __builtin_memset (s, '\0', n) # 394 "/usr/include/bits/string2.h" 3 4 extern void *__rawmemchr (const void *__s, int __c); #define strchr(s,c) (__extension__ (__builtin_constant_p (c) && !__builtin_constant_p (s) && (c) == '\0' ? (char *) __rawmemchr (s, c) : __builtin_strchr (s, c))) # 761 "/usr/include/bits/string2.h" 3 4 #define strncpy(dest,src,n) __builtin_strncpy (dest, src, n) # 785 "/usr/include/bits/string2.h" 3 4 #define strncat(dest,src,n) __builtin_strncat (dest, src, n) # 800 "/usr/include/bits/string2.h" 3 4 #define strcmp(s1,s2) __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (s1) && __builtin_constant_p (s2) && (__s1_len = strlen (s1), __s2_len = strlen (s2), (!__string2_1bptr_p (s1) || __s1_len >= 4) && (!__string2_1bptr_p (s2) || __s2_len >= 4)) ? __builtin_strcmp (s1, s2) : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) && (__s1_len = strlen (s1), __s1_len < 4) ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) ? __builtin_strcmp (s1, s2) : __strcmp_cg (s1, s2, __s1_len)) : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) && (__s2_len = strlen (s2), __s2_len < 4) ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) ? __builtin_strcmp (s1, s2) : __strcmp_gc (s1, s2, __s2_len)) : __builtin_strcmp (s1, s2)))); }) # 842 "/usr/include/bits/string2.h" 3 4 #define __strcmp_cc(s1,s2,l) (__extension__ ({ register int __result = (((__const unsigned char *) (__const char *) (s1))[0] - ((__const unsigned char *) (__const char *)(s2))[0]); if (l > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[1] - ((__const unsigned char *) (__const char *) (s2))[1]); if (l > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[2] - ((__const unsigned char *) (__const char *) (s2))[2]); if (l > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (s1))[3] - ((__const unsigned char *) (__const char *) (s2))[3]); } } __result; })) # 869 "/usr/include/bits/string2.h" 3 4 #define __strcmp_cg(s1,s2,l1) (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (s2); register int __result = (((__const unsigned char *) (__const char *) (s1))[0] - __s2[0]); if (l1 > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[1] - __s2[1]); if (l1 > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (s1))[2] - __s2[2]); if (l1 > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (s1))[3] - __s2[3]); } } __result; })) # 891 "/usr/include/bits/string2.h" 3 4 #define __strcmp_gc(s1,s2,l2) (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (s1); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (s2))[0]; if (l2 > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (s2))[1]); if (l2 > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (s2))[2]); if (l2 > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (s2))[3]); } } __result; })) # 920 "/usr/include/bits/string2.h" 3 4 #define strncmp(s1,s2,n) (__extension__ (__builtin_constant_p (n) && ((__builtin_constant_p (s1) && strlen (s1) < ((size_t) (n))) || (__builtin_constant_p (s2) && strlen (s2) < ((size_t) (n)))) ? strcmp (s1, s2) : strncmp (s1, s2, n))) # 935 "/usr/include/bits/string2.h" 3 4 #define strcspn(s,reject) __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (reject) && __string2_1bptr_p (reject) ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) ? __builtin_strcspn (s, reject) : ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') ? strlen (s) : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') ? __strcspn_c1 (s, __r0) : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') ? __strcspn_c2 (s, __r0, __r1) : (((__const char *) (reject))[3] == '\0' ? __strcspn_c3 (s, __r0, __r1, __r2) : __builtin_strcspn (s, reject)))))) : __builtin_strcspn (s, reject)); }) # 969 "/usr/include/bits/string2.h" 3 4 extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); extern __inline size_t __strcspn_c1 (__const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) ++__result; return __result; } extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2); extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) ++__result; return __result; } extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3); extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, int __reject2, int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) ++__result; return __result; } # 1011 "/usr/include/bits/string2.h" 3 4 #define strspn(s,accept) __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p (accept) && __string2_1bptr_p (accept) ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) ? __builtin_strspn (s, accept) : ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') ? ((void) (s), 0) : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') ? __strspn_c1 (s, __a0) : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') ? __strspn_c2 (s, __a0, __a1) : (((__const char *) (accept))[3] == '\0' ? __strspn_c3 (s, __a0, __a1, __a2) : __builtin_strspn (s, accept)))))) : __builtin_strspn (s, accept)); }) # 1045 "/usr/include/bits/string2.h" 3 4 extern __inline size_t __strspn_c1 (__const char *__s, int __accept); extern __inline size_t __strspn_c1 (__const char *__s, int __accept) { register size_t __result = 0; while (__s[__result] == __accept) ++__result; return __result; } extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2); extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, int __accept2) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2) ++__result; return __result; } extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) ++__result; return __result; } #define strpbrk(s,accept) __extension__ ({ char __a0, __a1, __a2; (__builtin_constant_p (accept) && __string2_1bptr_p (accept) ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) ? __builtin_strpbrk (s, accept) : ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') ? ((void) (s), (char *) NULL) : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') ? __builtin_strchr (s, __a0) : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') ? __strpbrk_c2 (s, __a0, __a1) : (((__const char *) (accept))[3] == '\0' ? __strpbrk_c3 (s, __a0, __a1, __a2) : __builtin_strpbrk (s, accept)))))) : __builtin_strpbrk (s, accept)); }) # 1121 "/usr/include/bits/string2.h" 3 4 extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, int __accept2); extern __inline char * __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3); extern __inline char * __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) { while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) ++__s; return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; } # 1164 "/usr/include/bits/string2.h" 3 4 #define __strtok_r(s,sep,nextp) (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) ? (((__const char *) (sep))[0] != '\0' && ((__const char *) (sep))[1] == '\0' ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) : __strtok_r (s, sep, nextp)) : __strtok_r (s, sep, nextp))) # 1173 "/usr/include/bits/string2.h" 3 4 extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); extern __inline char * __strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == ((void *)0)) __s = *__nextp; while (*__s == __sep) ++__s; __result = ((void *)0); if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } *__nextp = __s; } return __result; } #define strtok_r(s,sep,nextp) __strtok_r (s, sep, nextp) extern char *__strsep_g (char **__stringp, __const char *__delim); #define __strsep(s,reject) __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (reject) && __string2_1bptr_p (reject) && (__r0 = ((__const char *) (reject))[0], ((__const char *) (reject))[0] != '\0') ? ((__r1 = ((__const char *) (reject))[1], ((__const char *) (reject))[1] == '\0') ? __strsep_1c (s, __r0) : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') ? __strsep_2c (s, __r0, __r1) : (((__const char *) (reject))[3] == '\0' ? __strsep_3c (s, __r0, __r1, __r2) : __strsep_g (s, reject)))) : __strsep_g (s, reject)); }) # 1223 "/usr/include/bits/string2.h" 3 4 extern __inline char *__strsep_1c (char **__s, char __reject); extern __inline char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) *(*__s)++ = '\0'; return __retval; } extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); extern __inline char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3); extern __inline char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; if (__retval != ((void *)0)) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = ((void *)0); break; } if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } #define strsep(s,reject) __strsep (s, reject) # 1298 "/usr/include/bits/string2.h" 3 4 #define __need_malloc_and_calloc extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); #define __strdup(s) (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) ? (((__const char *) (s))[0] == '\0' ? (char *) calloc (1, 1) : ({ size_t __len = strlen (s) + 1; char *__retval = (char *) malloc (__len); if (__retval != NULL) __retval = (char *) memcpy (__retval, s, __len); __retval; })) : __strdup (s))) # 1317 "/usr/include/bits/string2.h" 3 4 #define strdup(s) __strdup (s) extern char *__strndup (__const char *__string, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); #define __strndup(s,n) (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) ? (((__const char *) (s))[0] == '\0' ? (char *) calloc (1, 1) : ({ size_t __len = strlen (s) + 1; size_t __n = (n); char *__retval; if (__n < __len) __len = __n + 1; __retval = (char *) malloc (__len); if (__retval != NULL) { __retval[__len - 1] = '\0'; __retval = (char *) memcpy (__retval, s, __len - 1); } __retval; })) : __strndup (s, n))) # 1352 "/usr/include/bits/string2.h" 3 4 #undef __STRING_INLINE # 424 "/usr/include/string.h" 2 3 4 # 432 "/usr/include/string.h" 3 4 # 17 "unix.c" 2 # 1 "/usr/include/fcntl.h" 1 3 4 # 25 "/usr/include/fcntl.h" 3 4 #define _FCNTL_H 1 # 1 "/usr/include/bits/fcntl.h" 1 3 4 # 33 "/usr/include/bits/fcntl.h" 3 4 #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02 #define O_CREAT 0100 #define O_EXCL 0200 #define O_NOCTTY 0400 #define O_TRUNC 01000 #define O_APPEND 02000 #define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK #define O_SYNC 010000 #define O_FSYNC O_SYNC #define O_ASYNC 020000 # 59 "/usr/include/bits/fcntl.h" 3 4 #define O_DSYNC O_SYNC #define O_RSYNC O_SYNC #define F_DUPFD 0 #define F_GETFD 1 #define F_SETFD 2 #define F_GETFL 3 #define F_SETFL 4 #define F_GETLK 5 #define F_SETLK 6 #define F_SETLKW 7 #define F_GETLK64 12 #define F_SETLK64 13 #define F_SETLKW64 14 #define F_SETOWN 8 #define F_GETOWN 9 # 103 "/usr/include/bits/fcntl.h" 3 4 #define FD_CLOEXEC 1 #define F_RDLCK 0 #define F_WRLCK 1 #define F_UNLCK 2 #define F_EXLCK 4 #define F_SHLCK 8 #define LOCK_SH 1 #define LOCK_EX 2 #define LOCK_NB 4 #define LOCK_UN 8 # 141 "/usr/include/bits/fcntl.h" 3 4 struct flock { short int l_type; short int l_whence; __off_t l_start; __off_t l_len; __pid_t l_pid; }; # 169 "/usr/include/bits/fcntl.h" 3 4 #define FAPPEND O_APPEND #define FFSYNC O_FSYNC #define FASYNC O_ASYNC #define FNONBLOCK O_NONBLOCK #define FNDELAY O_NDELAY #define POSIX_FADV_NORMAL 0 #define POSIX_FADV_RANDOM 1 #define POSIX_FADV_SEQUENTIAL 2 #define POSIX_FADV_WILLNEED 3 #define POSIX_FADV_DONTNEED 4 #define POSIX_FADV_NOREUSE 5 # 208 "/usr/include/bits/fcntl.h" 3 4 # 237 "/usr/include/bits/fcntl.h" 3 4 # 35 "/usr/include/fcntl.h" 2 3 4 # 45 "/usr/include/fcntl.h" 3 4 #define R_OK 4 #define W_OK 2 #define X_OK 1 #define F_OK 0 # 76 "/usr/include/fcntl.h" 3 4 extern int fcntl (int __fd, int __cmd, ...); # 85 "/usr/include/fcntl.h" 3 4 extern int open (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); # 130 "/usr/include/fcntl.h" 3 4 extern int creat (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); # 153 "/usr/include/fcntl.h" 3 4 #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 #define F_TEST 3 extern int lockf (int __fd, int __cmd, __off_t __len); # 176 "/usr/include/fcntl.h" 3 4 extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len, int __advise) __attribute__ ((__nothrow__)); # 198 "/usr/include/fcntl.h" 3 4 extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len); # 213 "/usr/include/fcntl.h" 3 4 # 18 "unix.c" 2 # 1 "/usr/include/ctype.h" 1 3 4 # 25 "/usr/include/ctype.h" 3 4 #define _CTYPE_H 1 # 45 "/usr/include/ctype.h" 3 4 #define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 81 "/usr/include/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__const)); #define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) #define __isascii(c) (((c) & ~0x7f) == 0) #define __toascii(c) ((c) & 0x7f) #define __exctype(name) extern int name (int) __THROW extern int isalnum (int) __attribute__ ((__nothrow__)); extern int isalpha (int) __attribute__ ((__nothrow__)); extern int iscntrl (int) __attribute__ ((__nothrow__)); extern int isdigit (int) __attribute__ ((__nothrow__)); extern int islower (int) __attribute__ ((__nothrow__)); extern int isgraph (int) __attribute__ ((__nothrow__)); extern int isprint (int) __attribute__ ((__nothrow__)); extern int ispunct (int) __attribute__ ((__nothrow__)); extern int isspace (int) __attribute__ ((__nothrow__)); extern int isupper (int) __attribute__ ((__nothrow__)); extern int isxdigit (int) __attribute__ ((__nothrow__)); extern int tolower (int __c) __attribute__ ((__nothrow__)); extern int toupper (int __c) __attribute__ ((__nothrow__)); # 142 "/usr/include/ctype.h" 3 4 extern int isascii (int __c) __attribute__ ((__nothrow__)); extern int toascii (int __c) __attribute__ ((__nothrow__)); extern int _toupper (int) __attribute__ ((__nothrow__)); extern int _tolower (int) __attribute__ ((__nothrow__)); #define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; })) # 173 "/usr/include/ctype.h" 3 4 #define isalnum(c) __isctype((c), _ISalnum) #define isalpha(c) __isctype((c), _ISalpha) #define iscntrl(c) __isctype((c), _IScntrl) #define isdigit(c) __isctype((c), _ISdigit) #define islower(c) __isctype((c), _ISlower) #define isgraph(c) __isctype((c), _ISgraph) #define isprint(c) __isctype((c), _ISprint) #define ispunct(c) __isctype((c), _ISpunct) #define isspace(c) __isctype((c), _ISspace) #define isupper(c) __isctype((c), _ISupper) #define isxdigit(c) __isctype((c), _ISxdigit) extern __inline int __attribute__ ((__nothrow__)) tolower (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } extern __inline int __attribute__ ((__nothrow__)) toupper (int __c) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } #define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c)) #define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c)) #define isascii(c) __isascii (c) #define toascii(c) __toascii (c) #define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)]) #define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)]) # 323 "/usr/include/ctype.h" 3 4 # 19 "unix.c" 2 # 1 "/usr/include/time.h" 1 3 4 # 28 "/usr/include/time.h" 3 4 #define _TIME_H 1 #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 40 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 26 "/usr/include/bits/time.h" 3 4 #define _BITS_TIME_H 1 #define CLOCKS_PER_SEC 1000000l # 46 "/usr/include/bits/time.h" 3 4 #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 #define CLOCK_PROCESS_CPUTIME_ID 2 #define CLOCK_THREAD_CPUTIME_ID 3 #define TIMER_ABSTIME 1 # 44 "/usr/include/time.h" 2 3 4 # 55 "/usr/include/time.h" 3 4 #define __clock_t_defined 1 typedef __clock_t clock_t; #undef __need_clock_t # 84 "/usr/include/time.h" 3 4 #undef __need_time_t # 96 "/usr/include/time.h" 3 4 #undef __clockid_time_t # 108 "/usr/include/time.h" 3 4 #undef __need_timer_t # 128 "/usr/include/time.h" 3 4 #undef __need_timespec struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; # 181 "/usr/include/time.h" 3 4 extern clock_t clock (void) __attribute__ ((__nothrow__)); extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); extern double difftime (time_t __time1, time_t __time0) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); # 229 "/usr/include/time.h" 3 4 extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) __attribute__ ((__nothrow__)); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); #define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # 312 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 327 "/usr/include/time.h" 3 4 extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __attribute__ ((__nothrow__)); extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); # 416 "/usr/include/time.h" 3 4 # 20 "unix.c" 2 # 1 "/usr/include/signal.h" 1 3 4 # 26 "/usr/include/signal.h" 3 4 #define _SIGNAL_H # 1 "/usr/include/bits/sigset.h" 1 3 4 # 44 "/usr/include/bits/sigset.h" 3 4 #define _SIGSET_H_fns 1 #define _EXTERN_INLINE __extern_inline #define __sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) #define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) #define __sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; })) #define __sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; })) # 104 "/usr/include/bits/sigset.h" 3 4 extern int __sigismember (__const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); #define __SIGSETFN(NAME,BODY,CONST) _EXTERN_INLINE int NAME (CONST __sigset_t *__set, int __sig) { unsigned long int __mask = __sigmask (__sig); unsigned long int __word = __sigword (__sig); return BODY; } # 118 "/usr/include/bits/sigset.h" 3 4 extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } #undef __SIGSETFN # 34 "/usr/include/signal.h" 2 3 4 #define __sig_atomic_t_defined typedef __sig_atomic_t sig_atomic_t; #undef __need_sig_atomic_t #undef __need_sigset_t # 1 "/usr/include/bits/signum.h" 1 3 4 # 23 "/usr/include/bits/signum.h" 3 4 #define SIG_ERR ((__sighandler_t) -1) #define SIG_DFL ((__sighandler_t) 0) #define SIG_IGN ((__sighandler_t) 1) #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 #define SIGILL 4 #define SIGTRAP 5 #define SIGABRT 6 #define SIGIOT 6 #define SIGBUS 7 #define SIGFPE 8 #define SIGKILL 9 #define SIGUSR1 10 #define SIGSEGV 11 #define SIGUSR2 12 #define SIGPIPE 13 #define SIGALRM 14 #define SIGTERM 15 #define SIGSTKFLT 16 #define SIGCLD SIGCHLD #define SIGCHLD 17 #define SIGCONT 18 #define SIGSTOP 19 #define SIGTSTP 20 #define SIGTTIN 21 #define SIGTTOU 22 #define SIGURG 23 #define SIGXCPU 24 #define SIGXFSZ 25 #define SIGVTALRM 26 #define SIGPROF 27 #define SIGWINCH 28 #define SIGPOLL SIGIO #define SIGIO 29 #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED 31 #define _NSIG 65 #define SIGRTMIN (__libc_current_sigrtmin ()) #define SIGRTMAX (__libc_current_sigrtmax ()) #define __SIGRTMIN 32 #define __SIGRTMAX (_NSIG - 1) # 59 "/usr/include/signal.h" 2 3 4 # 75 "/usr/include/signal.h" 3 4 typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); # 90 "/usr/include/signal.h" 3 4 extern __sighandler_t signal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); # 104 "/usr/include/signal.h" 3 4 # 117 "/usr/include/signal.h" 3 4 extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__)); extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__)); extern int raise (int __sig) __attribute__ ((__nothrow__)); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __attribute__ ((__nothrow__)); extern int gsignal (int __sig) __attribute__ ((__nothrow__)); extern void psignal (int __sig, __const char *__s); # 153 "/usr/include/signal.h" 3 4 extern int __sigpause (int __sig_or_mask, int __is_sig); # 178 "/usr/include/signal.h" 3 4 #define sigmask(sig) __sigmask(sig) extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); #define NSIG _NSIG # 201 "/usr/include/signal.h" 3 4 typedef __sighandler_t sig_t; #define __need_timespec # 1 "/usr/include/bits/siginfo.h" 1 3 4 # 25 "/usr/include/bits/siginfo.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 19 "/usr/include/bits/wordsize.h" 3 4 #define __WORDSIZE 32 # 26 "/usr/include/bits/siginfo.h" 2 3 4 #define __have_sigval_t 1 typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; #define __have_siginfo_t 1 #define __SI_MAX_SIZE 128 #define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 3)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; } _sifields; } siginfo_t; #define si_pid _sifields._kill.si_pid #define si_uid _sifields._kill.si_uid #define si_timerid _sifields._timer.si_tid #define si_overrun _sifields._timer.si_overrun #define si_status _sifields._sigchld.si_status #define si_utime _sifields._sigchld.si_utime #define si_stime _sifields._sigchld.si_stime #define si_value _sifields._rt.si_sigval #define si_int _sifields._rt.si_sigval.sival_int #define si_ptr _sifields._rt.si_sigval.sival_ptr #define si_addr _sifields._sigfault.si_addr #define si_band _sifields._sigpoll.si_band #define si_fd _sifields._sigpoll.si_fd enum { SI_ASYNCNL = -60, #define SI_ASYNCNL SI_ASYNCNL SI_TKILL = -6, #define SI_TKILL SI_TKILL SI_SIGIO, #define SI_SIGIO SI_SIGIO SI_ASYNCIO, #define SI_ASYNCIO SI_ASYNCIO SI_MESGQ, #define SI_MESGQ SI_MESGQ SI_TIMER, #define SI_TIMER SI_TIMER SI_QUEUE, #define SI_QUEUE SI_QUEUE SI_USER, #define SI_USER SI_USER SI_KERNEL = 0x80 #define SI_KERNEL SI_KERNEL }; enum { ILL_ILLOPC = 1, #define ILL_ILLOPC ILL_ILLOPC ILL_ILLOPN, #define ILL_ILLOPN ILL_ILLOPN ILL_ILLADR, #define ILL_ILLADR ILL_ILLADR ILL_ILLTRP, #define ILL_ILLTRP ILL_ILLTRP ILL_PRVOPC, #define ILL_PRVOPC ILL_PRVOPC ILL_PRVREG, #define ILL_PRVREG ILL_PRVREG ILL_COPROC, #define ILL_COPROC ILL_COPROC ILL_BADSTK #define ILL_BADSTK ILL_BADSTK }; enum { FPE_INTDIV = 1, #define FPE_INTDIV FPE_INTDIV FPE_INTOVF, #define FPE_INTOVF FPE_INTOVF FPE_FLTDIV, #define FPE_FLTDIV FPE_FLTDIV FPE_FLTOVF, #define FPE_FLTOVF FPE_FLTOVF FPE_FLTUND, #define FPE_FLTUND FPE_FLTUND FPE_FLTRES, #define FPE_FLTRES FPE_FLTRES FPE_FLTINV, #define FPE_FLTINV FPE_FLTINV FPE_FLTSUB #define FPE_FLTSUB FPE_FLTSUB }; enum { SEGV_MAPERR = 1, #define SEGV_MAPERR SEGV_MAPERR SEGV_ACCERR #define SEGV_ACCERR SEGV_ACCERR }; enum { BUS_ADRALN = 1, #define BUS_ADRALN BUS_ADRALN BUS_ADRERR, #define BUS_ADRERR BUS_ADRERR BUS_OBJERR #define BUS_OBJERR BUS_OBJERR }; enum { TRAP_BRKPT = 1, #define TRAP_BRKPT TRAP_BRKPT TRAP_TRACE #define TRAP_TRACE TRAP_TRACE }; enum { CLD_EXITED = 1, #define CLD_EXITED CLD_EXITED CLD_KILLED, #define CLD_KILLED CLD_KILLED CLD_DUMPED, #define CLD_DUMPED CLD_DUMPED CLD_TRAPPED, #define CLD_TRAPPED CLD_TRAPPED CLD_STOPPED, #define CLD_STOPPED CLD_STOPPED CLD_CONTINUED #define CLD_CONTINUED CLD_CONTINUED }; enum { POLL_IN = 1, #define POLL_IN POLL_IN POLL_OUT, #define POLL_OUT POLL_OUT POLL_MSG, #define POLL_MSG POLL_MSG POLL_ERR, #define POLL_ERR POLL_ERR POLL_PRI, #define POLL_PRI POLL_PRI POLL_HUP #define POLL_HUP POLL_HUP }; #undef __need_siginfo_t #define __have_sigevent_t 1 #define __SIGEV_MAX_SIZE 64 #define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 3)]; __pid_t _tid; struct { void (*_function) (sigval_t); void *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute enum { SIGEV_SIGNAL = 0, #define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, #define SIGEV_NONE SIGEV_NONE SIGEV_THREAD, #define SIGEV_THREAD SIGEV_THREAD SIGEV_THREAD_ID = 4 #define SIGEV_THREAD_ID SIGEV_THREAD_ID }; # 213 "/usr/include/signal.h" 2 3 4 extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigismember (__const sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 246 "/usr/include/signal.h" 3 4 # 1 "/usr/include/bits/sigaction.h" 1 3 4 # 25 "/usr/include/bits/sigaction.h" 3 4 struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; #define sa_handler __sigaction_handler.sa_handler #define sa_sigaction __sigaction_handler.sa_sigaction __sigset_t sa_mask; int sa_flags; void (*sa_restorer) (void); }; #define SA_NOCLDSTOP 1 #define SA_NOCLDWAIT 2 #define SA_SIGINFO 4 #define SA_ONSTACK 0x08000000 #define SA_RESTART 0x10000000 #define SA_NODEFER 0x40000000 #define SA_RESETHAND 0x80000000 #define SA_INTERRUPT 0x20000000 #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND #define SA_STACK SA_ONSTACK #define SIG_BLOCK 0 #define SIG_UNBLOCK 1 #define SIG_SETMASK 2 # 247 "/usr/include/signal.h" 2 3 4 extern int sigprocmask (int __how, __const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__ ((__nothrow__)); extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__ ((__nothrow__)); extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (__const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (__const sigset_t *__restrict __set, siginfo_t *__restrict __info, __const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) __attribute__ ((__nothrow__)); # 304 "/usr/include/signal.h" 3 4 extern __const char *__const _sys_siglist[65]; extern __const char *__const sys_siglist[65]; struct sigvec { __sighandler_t sv_handler; int sv_mask; int sv_flags; #define sv_onstack sv_flags }; #define SV_ONSTACK (1 << 0) #define SV_INTERRUPT (1 << 1) #define SV_RESETHAND (1 << 2) extern int sigvec (int __sig, __const struct sigvec *__vec, struct sigvec *__ovec) __attribute__ ((__nothrow__)); # 1 "/usr/include/bits/sigcontext.h" 1 3 4 # 26 "/usr/include/bits/sigcontext.h" 3 4 #define sigcontext_struct sigcontext # 1 "/usr/include/asm/sigcontext.h" 1 3 4 #define _ASMi386_SIGCONTEXT_H # 19 "/usr/include/asm/sigcontext.h" 3 4 struct _fpreg { unsigned short significand[4]; unsigned short exponent; }; struct _fpxreg { unsigned short significand[4]; unsigned short exponent; unsigned short padding[3]; }; struct _xmmreg { unsigned long element[4]; }; struct _fpstate { unsigned long cw; unsigned long sw; unsigned long tag; unsigned long ipoff; unsigned long cssel; unsigned long dataoff; unsigned long datasel; struct _fpreg _st[8]; unsigned short status; unsigned short magic; unsigned long _fxsr_env[6]; unsigned long mxcsr; unsigned long reserved; struct _fpxreg _fxsr_st[8]; struct _xmmreg _xmm[8]; unsigned long padding[56]; }; #define X86_FXSR_MAGIC 0x0000 struct sigcontext { unsigned short gs, __gsh; unsigned short fs, __fsh; unsigned short es, __esh; unsigned short ds, __dsh; unsigned long edi; unsigned long esi; unsigned long ebp; unsigned long esp; unsigned long ebx; unsigned long edx; unsigned long ecx; unsigned long eax; unsigned long trapno; unsigned long err; unsigned long eip; unsigned short cs, __csh; unsigned long eflags; unsigned long esp_at_signal; unsigned short ss, __ssh; struct _fpstate * fpstate; unsigned long oldmask; unsigned long cr2; }; # 29 "/usr/include/bits/sigcontext.h" 2 3 4 # 334 "/usr/include/signal.h" 2 3 4 extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); # 346 "/usr/include/signal.h" 3 4 extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__)); # 1 "/usr/include/bits/sigstack.h" 1 3 4 # 26 "/usr/include/bits/sigstack.h" 3 4 struct sigstack { void *ss_sp; int ss_onstack; }; enum { SS_ONSTACK = 1, #define SS_ONSTACK SS_ONSTACK SS_DISABLE #define SS_DISABLE SS_DISABLE }; #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 349 "/usr/include/signal.h" 2 3 4 # 357 "/usr/include/signal.h" 3 4 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); extern int sigaltstack (__const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__)); # 387 "/usr/include/signal.h" 3 4 # 1 "/usr/include/bits/sigthread.h" 1 3 4 # 21 "/usr/include/bits/sigthread.h" 3 4 #define _BITS_SIGTHREAD_H 1 # 31 "/usr/include/bits/sigthread.h" 3 4 extern int pthread_sigmask (int __how, __const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__)); extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__)); # 388 "/usr/include/signal.h" 2 3 4 extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); # 22 "unix.c" 2 # 1 "/usr/include/getopt.h" 1 3 4 # 24 "/usr/include/getopt.h" 3 4 #define _GETOPT_H 1 # 59 "/usr/include/getopt.h" 3 4 extern char *optarg; # 73 "/usr/include/getopt.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 106 "/usr/include/getopt.h" 3 4 struct option { const char *name; int has_arg; int *flag; int val; }; #define no_argument 0 #define required_argument 1 #define optional_argument 2 # 152 "/usr/include/getopt.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __attribute__ ((__nothrow__)); extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __attribute__ ((__nothrow__)); extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __attribute__ ((__nothrow__)); # 175 "/usr/include/getopt.h" 3 4 #undef __need_getopt # 25 "unix.c" 2 # 1 "/usr/include/unistd.h" 1 3 4 # 24 "/usr/include/unistd.h" 3 4 #define _UNISTD_H 1 #define _POSIX_VERSION 200112L #define _POSIX2_VERSION 200112L #define _POSIX2_C_BIND 200112L #define _POSIX2_C_DEV 200112L #define _POSIX2_SW_DEV 200112L #define _POSIX2_LOCALEDEF 200112L #define _XOPEN_VERSION 600 #define _XOPEN_XCU_VERSION 4 #define _XOPEN_XPG2 1 #define _XOPEN_XPG3 1 #define _XOPEN_XPG4 1 #define _XOPEN_UNIX 1 #define _XOPEN_CRYPT 1 #define _XOPEN_ENH_I18N 1 #define _XOPEN_LEGACY 1 # 173 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/bits/posix_opt.h" 1 3 4 # 21 "/usr/include/bits/posix_opt.h" 3 4 #define _POSIX_OPT_H 1 #define _POSIX_JOB_CONTROL 1 #define _POSIX_SAVED_IDS 1 #define _POSIX_PRIORITY_SCHEDULING 200112L #define _POSIX_SYNCHRONIZED_IO 200112L #define _POSIX_FSYNC 200112L #define _POSIX_MAPPED_FILES 200112L #define _POSIX_MEMLOCK 200112L #define _POSIX_MEMLOCK_RANGE 200112L #define _POSIX_MEMORY_PROTECTION 200112L #define _POSIX_CHOWN_RESTRICTED 1 #define _POSIX_VDISABLE '\0' #define _POSIX_NO_TRUNC 1 #define _XOPEN_REALTIME 1 #define _XOPEN_REALTIME_THREADS 1 #define _XOPEN_SHM 1 #define _POSIX_THREADS 200112L #define _POSIX_REENTRANT_FUNCTIONS 1 #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L #define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L #define _POSIX_THREAD_ATTR_STACKSIZE 200112L #define _POSIX_THREAD_ATTR_STACKADDR 200112L #define _POSIX_THREAD_PRIO_INHERIT 200112L #define _POSIX_THREAD_PRIO_PROTECT 200112L #define _POSIX_SEMAPHORES 200112L #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_ASYNCHRONOUS_IO 200112L #define _POSIX_ASYNC_IO 1 #define _LFS_ASYNCHRONOUS_IO 1 #define _POSIX_PRIORITIZED_IO 200112L #define _LFS64_ASYNCHRONOUS_IO 1 #define _LFS_LARGEFILE 1 #define _LFS64_LARGEFILE 1 #define _LFS64_STDIO 1 #define _POSIX_SHARED_MEMORY_OBJECTS 200112L #define _POSIX_CPUTIME 0 #define _POSIX_THREAD_CPUTIME 0 #define _POSIX_REGEXP 1 #define _POSIX_READER_WRITER_LOCKS 200112L #define _POSIX_SHELL 1 #define _POSIX_TIMEOUTS 200112L #define _POSIX_SPIN_LOCKS 200112L #define _POSIX_SPAWN 200112L #define _POSIX_TIMERS 200112L #define _POSIX_BARRIERS 200112L #define _POSIX_MESSAGE_PASSING 200112L #define _POSIX_THREAD_PROCESS_SHARED 200112L #define _POSIX_MONOTONIC_CLOCK 0 #define _POSIX_CLOCK_SELECTION 200112L #define _POSIX_ADVISORY_INFO 200112L #define _POSIX_IPV6 200112L #define _POSIX_RAW_SOCKETS 200112L #define _POSIX2_CHAR_TERM 200112L #define _POSIX_SPORADIC_SERVER -1 #define _POSIX_THREAD_SPORADIC_SERVER -1 #define _POSIX_TRACE -1 #define _POSIX_TRACE_EVENT_FILTER -1 #define _POSIX_TRACE_INHERIT -1 #define _POSIX_TRACE_LOG -1 #define _POSIX_TYPED_MEMORY_OBJECTS -1 # 174 "/usr/include/unistd.h" 2 3 4 #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 # 195 "/usr/include/unistd.h" 3 4 #define __need_size_t #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL # 198 "/usr/include/unistd.h" 2 3 4 # 226 "/usr/include/unistd.h" 3 4 typedef __useconds_t useconds_t; #define __useconds_t_defined # 238 "/usr/include/unistd.h" 3 4 typedef __intptr_t intptr_t; #define __intptr_t_defined typedef __socklen_t socklen_t; #define __socklen_t_defined #define R_OK 4 #define W_OK 2 #define X_OK 1 #define F_OK 0 extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 289 "/usr/include/unistd.h" 3 4 #define L_SET SEEK_SET #define L_INCR SEEK_CUR #define L_XTND SEEK_END # 301 "/usr/include/unistd.h" 3 4 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__)); # 320 "/usr/include/unistd.h" 3 4 extern int close (int __fd); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; # 384 "/usr/include/unistd.h" 3 4 extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) ; # 393 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__)); # 405 "/usr/include/unistd.h" 3 4 extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __attribute__ ((__nothrow__)); extern int usleep (__useconds_t __useconds); # 429 "/usr/include/unistd.h" 3 4 extern int pause (void); extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) ; extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 457 "/usr/include/unistd.h" 3 4 extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int fchdir (int __fd) __attribute__ ((__nothrow__)) ; # 471 "/usr/include/unistd.h" 3 4 extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) ; # 484 "/usr/include/unistd.h" 3 4 extern char *getwd (char *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; extern int dup (int __fd) __attribute__ ((__nothrow__)) ; extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__)); extern char **__environ; extern int execve (__const char *__path, char *__const __argv[], char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 516 "/usr/include/unistd.h" 3 4 extern int execv (__const char *__path, char *__const __argv[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execle (__const char *__path, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execl (__const char *__path, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execvp (__const char *__file, char *__const __argv[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int execlp (__const char *__file, __const char *__arg, ...) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int nice (int __inc) __attribute__ ((__nothrow__)) ; extern void _exit (int __status) __attribute__ ((__noreturn__)); # 1 "/usr/include/bits/confname.h" 1 3 4 # 26 "/usr/include/bits/confname.h" 3 4 enum { _PC_LINK_MAX, #define _PC_LINK_MAX _PC_LINK_MAX _PC_MAX_CANON, #define _PC_MAX_CANON _PC_MAX_CANON _PC_MAX_INPUT, #define _PC_MAX_INPUT _PC_MAX_INPUT _PC_NAME_MAX, #define _PC_NAME_MAX _PC_NAME_MAX _PC_PATH_MAX, #define _PC_PATH_MAX _PC_PATH_MAX _PC_PIPE_BUF, #define _PC_PIPE_BUF _PC_PIPE_BUF _PC_CHOWN_RESTRICTED, #define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED _PC_NO_TRUNC, #define _PC_NO_TRUNC _PC_NO_TRUNC _PC_VDISABLE, #define _PC_VDISABLE _PC_VDISABLE _PC_SYNC_IO, #define _PC_SYNC_IO _PC_SYNC_IO _PC_ASYNC_IO, #define _PC_ASYNC_IO _PC_ASYNC_IO _PC_PRIO_IO, #define _PC_PRIO_IO _PC_PRIO_IO _PC_SOCK_MAXBUF, #define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF _PC_FILESIZEBITS, #define _PC_FILESIZEBITS _PC_FILESIZEBITS _PC_REC_INCR_XFER_SIZE, #define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE _PC_REC_MAX_XFER_SIZE, #define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE _PC_REC_MIN_XFER_SIZE, #define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE _PC_REC_XFER_ALIGN, #define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN _PC_ALLOC_SIZE_MIN, #define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN _PC_SYMLINK_MAX, #define _PC_SYMLINK_MAX _PC_SYMLINK_MAX _PC_2_SYMLINKS #define _PC_2_SYMLINKS _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, #define _SC_ARG_MAX _SC_ARG_MAX _SC_CHILD_MAX, #define _SC_CHILD_MAX _SC_CHILD_MAX _SC_CLK_TCK, #define _SC_CLK_TCK _SC_CLK_TCK _SC_NGROUPS_MAX, #define _SC_NGROUPS_MAX _SC_NGROUPS_MAX _SC_OPEN_MAX, #define _SC_OPEN_MAX _SC_OPEN_MAX _SC_STREAM_MAX, #define _SC_STREAM_MAX _SC_STREAM_MAX _SC_TZNAME_MAX, #define _SC_TZNAME_MAX _SC_TZNAME_MAX _SC_JOB_CONTROL, #define _SC_JOB_CONTROL _SC_JOB_CONTROL _SC_SAVED_IDS, #define _SC_SAVED_IDS _SC_SAVED_IDS _SC_REALTIME_SIGNALS, #define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS _SC_PRIORITY_SCHEDULING, #define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING _SC_TIMERS, #define _SC_TIMERS _SC_TIMERS _SC_ASYNCHRONOUS_IO, #define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO _SC_PRIORITIZED_IO, #define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO _SC_SYNCHRONIZED_IO, #define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO _SC_FSYNC, #define _SC_FSYNC _SC_FSYNC _SC_MAPPED_FILES, #define _SC_MAPPED_FILES _SC_MAPPED_FILES _SC_MEMLOCK, #define _SC_MEMLOCK _SC_MEMLOCK _SC_MEMLOCK_RANGE, #define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE _SC_MEMORY_PROTECTION, #define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION _SC_MESSAGE_PASSING, #define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING _SC_SEMAPHORES, #define _SC_SEMAPHORES _SC_SEMAPHORES _SC_SHARED_MEMORY_OBJECTS, #define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS _SC_AIO_LISTIO_MAX, #define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX _SC_AIO_MAX, #define _SC_AIO_MAX _SC_AIO_MAX _SC_AIO_PRIO_DELTA_MAX, #define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX _SC_DELAYTIMER_MAX, #define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX _SC_MQ_OPEN_MAX, #define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX _SC_MQ_PRIO_MAX, #define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX _SC_VERSION, #define _SC_VERSION _SC_VERSION _SC_PAGESIZE, #define _SC_PAGESIZE _SC_PAGESIZE #define _SC_PAGE_SIZE _SC_PAGESIZE _SC_RTSIG_MAX, #define _SC_RTSIG_MAX _SC_RTSIG_MAX _SC_SEM_NSEMS_MAX, #define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX _SC_SEM_VALUE_MAX, #define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX _SC_SIGQUEUE_MAX, #define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX _SC_TIMER_MAX, #define _SC_TIMER_MAX _SC_TIMER_MAX _SC_BC_BASE_MAX, #define _SC_BC_BASE_MAX _SC_BC_BASE_MAX _SC_BC_DIM_MAX, #define _SC_BC_DIM_MAX _SC_BC_DIM_MAX _SC_BC_SCALE_MAX, #define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX _SC_BC_STRING_MAX, #define _SC_BC_STRING_MAX _SC_BC_STRING_MAX _SC_COLL_WEIGHTS_MAX, #define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX _SC_EQUIV_CLASS_MAX, #define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX _SC_EXPR_NEST_MAX, #define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX _SC_LINE_MAX, #define _SC_LINE_MAX _SC_LINE_MAX _SC_RE_DUP_MAX, #define _SC_RE_DUP_MAX _SC_RE_DUP_MAX _SC_CHARCLASS_NAME_MAX, #define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX _SC_2_VERSION, #define _SC_2_VERSION _SC_2_VERSION _SC_2_C_BIND, #define _SC_2_C_BIND _SC_2_C_BIND _SC_2_C_DEV, #define _SC_2_C_DEV _SC_2_C_DEV _SC_2_FORT_DEV, #define _SC_2_FORT_DEV _SC_2_FORT_DEV _SC_2_FORT_RUN, #define _SC_2_FORT_RUN _SC_2_FORT_RUN _SC_2_SW_DEV, #define _SC_2_SW_DEV _SC_2_SW_DEV _SC_2_LOCALEDEF, #define _SC_2_LOCALEDEF _SC_2_LOCALEDEF _SC_PII, #define _SC_PII _SC_PII _SC_PII_XTI, #define _SC_PII_XTI _SC_PII_XTI _SC_PII_SOCKET, #define _SC_PII_SOCKET _SC_PII_SOCKET _SC_PII_INTERNET, #define _SC_PII_INTERNET _SC_PII_INTERNET _SC_PII_OSI, #define _SC_PII_OSI _SC_PII_OSI _SC_POLL, #define _SC_POLL _SC_POLL _SC_SELECT, #define _SC_SELECT _SC_SELECT _SC_UIO_MAXIOV, #define _SC_UIO_MAXIOV _SC_UIO_MAXIOV _SC_IOV_MAX = _SC_UIO_MAXIOV, #define _SC_IOV_MAX _SC_IOV_MAX _SC_PII_INTERNET_STREAM, #define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_DGRAM, #define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM _SC_PII_OSI_COTS, #define _SC_PII_OSI_COTS _SC_PII_OSI_COTS _SC_PII_OSI_CLTS, #define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS _SC_PII_OSI_M, #define _SC_PII_OSI_M _SC_PII_OSI_M _SC_T_IOV_MAX, #define _SC_T_IOV_MAX _SC_T_IOV_MAX _SC_THREADS, #define _SC_THREADS _SC_THREADS _SC_THREAD_SAFE_FUNCTIONS, #define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS _SC_GETGR_R_SIZE_MAX, #define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX, #define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX _SC_LOGIN_NAME_MAX, #define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX _SC_TTY_NAME_MAX, #define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX _SC_THREAD_DESTRUCTOR_ITERATIONS, #define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_KEYS_MAX, #define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX _SC_THREAD_STACK_MIN, #define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN _SC_THREAD_THREADS_MAX, #define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX _SC_THREAD_ATTR_STACKADDR, #define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKSIZE, #define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_PRIORITY_SCHEDULING, #define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIO_INHERIT, #define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_PROTECT, #define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT _SC_THREAD_PROCESS_SHARED, #define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED _SC_NPROCESSORS_CONF, #define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF _SC_NPROCESSORS_ONLN, #define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN _SC_PHYS_PAGES, #define _SC_PHYS_PAGES _SC_PHYS_PAGES _SC_AVPHYS_PAGES, #define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES _SC_ATEXIT_MAX, #define _SC_ATEXIT_MAX _SC_ATEXIT_MAX _SC_PASS_MAX, #define _SC_PASS_MAX _SC_PASS_MAX _SC_XOPEN_VERSION, #define _SC_XOPEN_VERSION _SC_XOPEN_VERSION _SC_XOPEN_XCU_VERSION, #define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION _SC_XOPEN_UNIX, #define _SC_XOPEN_UNIX _SC_XOPEN_UNIX _SC_XOPEN_CRYPT, #define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT _SC_XOPEN_ENH_I18N, #define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N _SC_XOPEN_SHM, #define _SC_XOPEN_SHM _SC_XOPEN_SHM _SC_2_CHAR_TERM, #define _SC_2_CHAR_TERM _SC_2_CHAR_TERM _SC_2_C_VERSION, #define _SC_2_C_VERSION _SC_2_C_VERSION _SC_2_UPE, #define _SC_2_UPE _SC_2_UPE _SC_XOPEN_XPG2, #define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 _SC_XOPEN_XPG3, #define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 _SC_XOPEN_XPG4, #define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 _SC_CHAR_BIT, #define _SC_CHAR_BIT _SC_CHAR_BIT _SC_CHAR_MAX, #define _SC_CHAR_MAX _SC_CHAR_MAX _SC_CHAR_MIN, #define _SC_CHAR_MIN _SC_CHAR_MIN _SC_INT_MAX, #define _SC_INT_MAX _SC_INT_MAX _SC_INT_MIN, #define _SC_INT_MIN _SC_INT_MIN _SC_LONG_BIT, #define _SC_LONG_BIT _SC_LONG_BIT _SC_WORD_BIT, #define _SC_WORD_BIT _SC_WORD_BIT _SC_MB_LEN_MAX, #define _SC_MB_LEN_MAX _SC_MB_LEN_MAX _SC_NZERO, #define _SC_NZERO _SC_NZERO _SC_SSIZE_MAX, #define _SC_SSIZE_MAX _SC_SSIZE_MAX _SC_SCHAR_MAX, #define _SC_SCHAR_MAX _SC_SCHAR_MAX _SC_SCHAR_MIN, #define _SC_SCHAR_MIN _SC_SCHAR_MIN _SC_SHRT_MAX, #define _SC_SHRT_MAX _SC_SHRT_MAX _SC_SHRT_MIN, #define _SC_SHRT_MIN _SC_SHRT_MIN _SC_UCHAR_MAX, #define _SC_UCHAR_MAX _SC_UCHAR_MAX _SC_UINT_MAX, #define _SC_UINT_MAX _SC_UINT_MAX _SC_ULONG_MAX, #define _SC_ULONG_MAX _SC_ULONG_MAX _SC_USHRT_MAX, #define _SC_USHRT_MAX _SC_USHRT_MAX _SC_NL_ARGMAX, #define _SC_NL_ARGMAX _SC_NL_ARGMAX _SC_NL_LANGMAX, #define _SC_NL_LANGMAX _SC_NL_LANGMAX _SC_NL_MSGMAX, #define _SC_NL_MSGMAX _SC_NL_MSGMAX _SC_NL_NMAX, #define _SC_NL_NMAX _SC_NL_NMAX _SC_NL_SETMAX, #define _SC_NL_SETMAX _SC_NL_SETMAX _SC_NL_TEXTMAX, #define _SC_NL_TEXTMAX _SC_NL_TEXTMAX _SC_XBS5_ILP32_OFF32, #define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFFBIG, #define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG _SC_XBS5_LP64_OFF64, #define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 _SC_XBS5_LPBIG_OFFBIG, #define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG _SC_XOPEN_LEGACY, #define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY _SC_XOPEN_REALTIME, #define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME_THREADS, #define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS _SC_ADVISORY_INFO, #define _SC_ADVISORY_INFO _SC_ADVISORY_INFO _SC_BARRIERS, #define _SC_BARRIERS _SC_BARRIERS _SC_BASE, #define _SC_BASE _SC_BASE _SC_C_LANG_SUPPORT, #define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT_R, #define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R _SC_CLOCK_SELECTION, #define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION _SC_CPUTIME, #define _SC_CPUTIME _SC_CPUTIME _SC_THREAD_CPUTIME, #define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME _SC_DEVICE_IO, #define _SC_DEVICE_IO _SC_DEVICE_IO _SC_DEVICE_SPECIFIC, #define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC_R, #define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R _SC_FD_MGMT, #define _SC_FD_MGMT _SC_FD_MGMT _SC_FIFO, #define _SC_FIFO _SC_FIFO _SC_PIPE, #define _SC_PIPE _SC_PIPE _SC_FILE_ATTRIBUTES, #define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES _SC_FILE_LOCKING, #define _SC_FILE_LOCKING _SC_FILE_LOCKING _SC_FILE_SYSTEM, #define _SC_FILE_SYSTEM _SC_FILE_SYSTEM _SC_MONOTONIC_CLOCK, #define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK _SC_MULTI_PROCESS, #define _SC_MULTI_PROCESS _SC_MULTI_PROCESS _SC_SINGLE_PROCESS, #define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS _SC_NETWORKING, #define _SC_NETWORKING _SC_NETWORKING _SC_READER_WRITER_LOCKS, #define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS _SC_SPIN_LOCKS, #define _SC_SPIN_LOCKS _SC_SPIN_LOCKS _SC_REGEXP, #define _SC_REGEXP _SC_REGEXP _SC_REGEX_VERSION, #define _SC_REGEX_VERSION _SC_REGEX_VERSION _SC_SHELL, #define _SC_SHELL _SC_SHELL _SC_SIGNALS, #define _SC_SIGNALS _SC_SIGNALS _SC_SPAWN, #define _SC_SPAWN _SC_SPAWN _SC_SPORADIC_SERVER, #define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER, #define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER _SC_SYSTEM_DATABASE, #define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE_R, #define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R _SC_TIMEOUTS, #define _SC_TIMEOUTS _SC_TIMEOUTS _SC_TYPED_MEMORY_OBJECTS, #define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS _SC_USER_GROUPS, #define _SC_USER_GROUPS _SC_USER_GROUPS _SC_USER_GROUPS_R, #define _SC_USER_GROUPS_R _SC_USER_GROUPS_R _SC_2_PBS, #define _SC_2_PBS _SC_2_PBS _SC_2_PBS_ACCOUNTING, #define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING _SC_2_PBS_LOCATE, #define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE _SC_2_PBS_MESSAGE, #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE _SC_2_PBS_TRACK, #define _SC_2_PBS_TRACK _SC_2_PBS_TRACK _SC_SYMLOOP_MAX, #define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX _SC_STREAMS, #define _SC_STREAMS _SC_STREAMS _SC_2_PBS_CHECKPOINT, #define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT _SC_V6_ILP32_OFF32, #define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFFBIG, #define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG _SC_V6_LP64_OFF64, #define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 _SC_V6_LPBIG_OFFBIG, #define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG _SC_HOST_NAME_MAX, #define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX _SC_TRACE, #define _SC_TRACE _SC_TRACE _SC_TRACE_EVENT_FILTER, #define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER _SC_TRACE_INHERIT, #define _SC_TRACE_INHERIT _SC_TRACE_INHERIT _SC_TRACE_LOG, #define _SC_TRACE_LOG _SC_TRACE_LOG _SC_LEVEL1_ICACHE_SIZE, #define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_ASSOC, #define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_LINESIZE, #define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_DCACHE_SIZE, #define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_ASSOC, #define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_LINESIZE, #define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL2_CACHE_SIZE, #define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_ASSOC, #define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_LINESIZE, #define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL3_CACHE_SIZE, #define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_ASSOC, #define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_LINESIZE, #define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL4_CACHE_SIZE, #define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_ASSOC, #define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_LINESIZE, #define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, #define _SC_IPV6 _SC_IPV6 _SC_RAW_SOCKETS #define _SC_RAW_SOCKETS _SC_RAW_SOCKETS }; enum { _CS_PATH, #define _CS_PATH _CS_PATH _CS_V6_WIDTH_RESTRICTED_ENVS, #define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS _CS_GNU_LIBC_VERSION, #define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION _CS_GNU_LIBPTHREAD_VERSION, #define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION _CS_LFS_CFLAGS = 1000, #define _CS_LFS_CFLAGS _CS_LFS_CFLAGS _CS_LFS_LDFLAGS, #define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS _CS_LFS_LIBS, #define _CS_LFS_LIBS _CS_LFS_LIBS _CS_LFS_LINTFLAGS, #define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS _CS_LFS64_CFLAGS, #define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS _CS_LFS64_LDFLAGS, #define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS _CS_LFS64_LIBS, #define _CS_LFS64_LIBS _CS_LFS64_LIBS _CS_LFS64_LINTFLAGS, #define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS, #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LIBS, #define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LINTFLAGS, #define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS, #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS, #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LIBS, #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_LP64_OFF64_CFLAGS, #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS, #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LIBS, #define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LINTFLAGS, #define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LIBS, #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LIBS, #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LIBS, #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS, #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS, #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LIBS, #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS }; # 555 "/usr/include/unistd.h" 2 3 4 extern long int pathconf (__const char *__path, int __name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__)); extern long int sysconf (int __name) __attribute__ ((__nothrow__)); extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__)); extern __pid_t getpid (void) __attribute__ ((__nothrow__)); extern __pid_t getppid (void) __attribute__ ((__nothrow__)); extern __pid_t getpgrp (void) __attribute__ ((__nothrow__)); # 591 "/usr/include/unistd.h" 3 4 extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); # 600 "/usr/include/unistd.h" 3 4 extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__)); # 617 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) __attribute__ ((__nothrow__)); # 634 "/usr/include/unistd.h" 3 4 extern __pid_t setsid (void) __attribute__ ((__nothrow__)); extern __uid_t getuid (void) __attribute__ ((__nothrow__)); extern __uid_t geteuid (void) __attribute__ ((__nothrow__)); extern __gid_t getgid (void) __attribute__ ((__nothrow__)); extern __gid_t getegid (void) __attribute__ ((__nothrow__)); extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) ; # 667 "/usr/include/unistd.h" 3 4 extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__)); extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__)); extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__)); extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__)); extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__)); extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__)); # 723 "/usr/include/unistd.h" 3 4 extern __pid_t fork (void) __attribute__ ((__nothrow__)); extern __pid_t vfork (void) __attribute__ ((__nothrow__)); extern char *ttyname (int __fd) __attribute__ ((__nothrow__)); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; extern int isatty (int __fd) __attribute__ ((__nothrow__)); extern int ttyslot (void) __attribute__ ((__nothrow__)); extern int link (__const char *__from, __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; # 769 "/usr/include/unistd.h" 3 4 extern int symlink (__const char *__from, __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; extern ssize_t readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; # 792 "/usr/include/unistd.h" 3 4 extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 801 "/usr/include/unistd.h" 3 4 extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__)); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__)); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); #define __need_getopt # 845 "/usr/include/unistd.h" 3 4 extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int sethostname (__const char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int sethostid (long int __id) __attribute__ ((__nothrow__)) ; extern int getdomainname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int setdomainname (__const char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int vhangup (void) __attribute__ ((__nothrow__)); extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int acct (__const char *__name) __attribute__ ((__nothrow__)); extern char *getusershell (void) __attribute__ ((__nothrow__)); extern void endusershell (void) __attribute__ ((__nothrow__)); extern void setusershell (void) __attribute__ ((__nothrow__)); extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) ; extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); # 923 "/usr/include/unistd.h" 3 4 extern int fsync (int __fd); extern long int gethostid (void); extern void sync (void) __attribute__ ((__nothrow__)); extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern int getdtablesize (void) __attribute__ ((__nothrow__)); extern int truncate (__const char *__file, __off_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; # 970 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) ; # 990 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) __attribute__ ((__nothrow__)) ; extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__)); # 1011 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__)); # 1065 "/usr/include/unistd.h" 3 4 extern int fdatasync (int __fildes); # 1103 "/usr/include/unistd.h" 3 4 # 30 "unix.c" 2 # 1 "/usr/include/errno.h" 1 3 4 # 28 "/usr/include/errno.h" 3 4 #define _ERRNO_H 1 # 1 "/usr/include/bits/errno.h" 1 3 4 # 22 "/usr/include/bits/errno.h" 3 4 #undef EDOM #undef EILSEQ #undef ERANGE # 1 "/usr/include/linux/errno.h" 1 3 4 #define _LINUX_ERRNO_H # 1 "/usr/include/asm/errno.h" 1 3 4 #define _I386_ERRNO_H # 1 "/usr/include/asm-generic/errno.h" 1 3 4 #define _ASM_GENERIC_ERRNO_H # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 #define ENOENT 2 #define ESRCH 3 #define EINTR 4 #define EIO 5 #define ENXIO 6 #define E2BIG 7 #define ENOEXEC 8 #define EBADF 9 #define ECHILD 10 #define EAGAIN 11 #define ENOMEM 12 #define EACCES 13 #define EFAULT 14 #define ENOTBLK 15 #define EBUSY 16 #define EEXIST 17 #define EXDEV 18 #define ENODEV 19 #define ENOTDIR 20 #define EISDIR 21 #define EINVAL 22 #define ENFILE 23 #define EMFILE 24 #define ENOTTY 25 #define ETXTBSY 26 #define EFBIG 27 #define ENOSPC 28 #define ESPIPE 29 #define EROFS 30 #define EMLINK 31 #define EPIPE 32 #define EDOM 33 #define ERANGE 34 # 5 "/usr/include/asm-generic/errno.h" 2 3 4 #define EDEADLK 35 #define ENAMETOOLONG 36 #define ENOLCK 37 #define ENOSYS 38 #define ENOTEMPTY 39 #define ELOOP 40 #define EWOULDBLOCK EAGAIN #define ENOMSG 42 #define EIDRM 43 #define ECHRNG 44 #define EL2NSYNC 45 #define EL3HLT 46 #define EL3RST 47 #define ELNRNG 48 #define EUNATCH 49 #define ENOCSI 50 #define EL2HLT 51 #define EBADE 52 #define EBADR 53 #define EXFULL 54 #define ENOANO 55 #define EBADRQC 56 #define EBADSLT 57 #define EDEADLOCK EDEADLK #define EBFONT 59 #define ENOSTR 60 #define ENODATA 61 #define ETIME 62 #define ENOSR 63 #define ENONET 64 #define ENOPKG 65 #define EREMOTE 66 #define ENOLINK 67 #define EADV 68 #define ESRMNT 69 #define ECOMM 70 #define EPROTO 71 #define EMULTIHOP 72 #define EDOTDOT 73 #define EBADMSG 74 #define EOVERFLOW 75 #define ENOTUNIQ 76 #define EBADFD 77 #define EREMCHG 78 #define ELIBACC 79 #define ELIBBAD 80 #define ELIBSCN 81 #define ELIBMAX 82 #define ELIBEXEC 83 #define EILSEQ 84 #define ERESTART 85 #define ESTRPIPE 86 #define EUSERS 87 #define ENOTSOCK 88 #define EDESTADDRREQ 89 #define EMSGSIZE 90 #define EPROTOTYPE 91 #define ENOPROTOOPT 92 #define EPROTONOSUPPORT 93 #define ESOCKTNOSUPPORT 94 #define EOPNOTSUPP 95 #define EPFNOSUPPORT 96 #define EAFNOSUPPORT 97 #define EADDRINUSE 98 #define EADDRNOTAVAIL 99 #define ENETDOWN 100 #define ENETUNREACH 101 #define ENETRESET 102 #define ECONNABORTED 103 #define ECONNRESET 104 #define ENOBUFS 105 #define EISCONN 106 #define ENOTCONN 107 #define ESHUTDOWN 108 #define ETOOMANYREFS 109 #define ETIMEDOUT 110 #define ECONNREFUSED 111 #define EHOSTDOWN 112 #define EHOSTUNREACH 113 #define EALREADY 114 #define EINPROGRESS 115 #define ESTALE 116 #define EUCLEAN 117 #define ENOTNAM 118 #define ENAVAIL 119 #define EISNAM 120 #define EREMOTEIO 121 #define EDQUOT 122 #define ENOMEDIUM 123 #define EMEDIUMTYPE 124 #define ECANCELED 125 #define ENOKEY 126 #define EKEYEXPIRED 127 #define EKEYREVOKED 128 #define EKEYREJECTED 129 #define EOWNERDEAD 130 #define ENOTRECOVERABLE 131 # 5 "/usr/include/asm/errno.h" 2 3 4 # 5 "/usr/include/linux/errno.h" 2 3 4 # 26 "/usr/include/bits/errno.h" 2 3 4 #define ENOTSUP EOPNOTSUPP # 43 "/usr/include/bits/errno.h" 3 4 extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); #define errno (*__errno_location ()) # 37 "/usr/include/errno.h" 2 3 4 #undef __need_Emath # 59 "/usr/include/errno.h" 3 4 # 32 "unix.c" 2 # 1 "/usr/include/mntent.h" 1 3 4 # 21 "/usr/include/mntent.h" 3 4 #define _MNTENT_H 1 #define __need_FILE # 1 "/usr/include/paths.h" 1 3 4 # 33 "/usr/include/paths.h" 3 4 #define _PATHS_H_ #define _PATH_DEFPATH "/usr/bin:/bin" #define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" #define _PATH_BSHELL "/bin/sh" #define _PATH_CONSOLE "/dev/console" #define _PATH_CSHELL "/bin/csh" #define _PATH_DEVDB "/var/run/dev.db" #define _PATH_DEVNULL "/dev/null" #define _PATH_DRUM "/dev/drum" #define _PATH_KLOG "/proc/kmsg" #define _PATH_KMEM "/dev/kmem" #define _PATH_LASTLOG "/var/log/lastlog" #define _PATH_MAILDIR "/var/mail" #define _PATH_MAN "/usr/share/man" #define _PATH_MEM "/dev/mem" #define _PATH_MNTTAB "/etc/fstab" #define _PATH_MOUNTED "/etc/mtab" #define _PATH_NOLOGIN "/etc/nologin" #define _PATH_PRESERVE "/var/lib" #define _PATH_RWHODIR "/var/spool/rwho" #define _PATH_SENDMAIL "/usr/sbin/sendmail" #define _PATH_SHADOW "/etc/shadow" #define _PATH_SHELLS "/etc/shells" #define _PATH_TTY "/dev/tty" #define _PATH_UNIX "/boot/vmlinux" #define _PATH_UTMP "/var/run/utmp" #define _PATH_VI "/usr/bin/vi" #define _PATH_WTMP "/var/log/wtmp" #define _PATH_DEV "/dev/" #define _PATH_TMP "/tmp/" #define _PATH_VARDB "/var/db/" #define _PATH_VARRUN "/var/run/" #define _PATH_VARTMP "/var/tmp/" # 27 "/usr/include/mntent.h" 2 3 4 #define MNTTAB _PATH_MNTTAB #define MOUNTED _PATH_MOUNTED #define MNTTYPE_IGNORE "ignore" #define MNTTYPE_NFS "nfs" #define MNTTYPE_SWAP "swap" #define MNTOPT_DEFAULTS "defaults" #define MNTOPT_RO "ro" #define MNTOPT_RW "rw" #define MNTOPT_SUID "suid" #define MNTOPT_NOSUID "nosuid" #define MNTOPT_NOAUTO "noauto" struct mntent { char *mnt_fsname; char *mnt_dir; char *mnt_type; char *mnt_opts; int mnt_freq; int mnt_passno; }; extern FILE *setmntent (__const char *__file, __const char *__mode) __attribute__ ((__nothrow__)); extern struct mntent *getmntent (FILE *__stream) __attribute__ ((__nothrow__)); extern struct mntent *getmntent_r (FILE *__restrict __stream, struct mntent *__restrict __result, char *__restrict __buffer, int __bufsize) __attribute__ ((__nothrow__)); extern int addmntent (FILE *__restrict __stream, __const struct mntent *__restrict __mnt) __attribute__ ((__nothrow__)); extern int endmntent (FILE *__stream) __attribute__ ((__nothrow__)); extern char *hasmntopt (__const struct mntent *__mnt, __const char *__opt) __attribute__ ((__nothrow__)); # 35 "unix.c" 2 # 1 "/usr/include/sys/ioctl.h" 1 3 4 # 20 "/usr/include/sys/ioctl.h" 3 4 #define _SYS_IOCTL_H 1 # 1 "/usr/include/bits/ioctls.h" 1 3 4 # 24 "/usr/include/bits/ioctls.h" 3 4 # 1 "/usr/include/asm/ioctls.h" 1 3 4 #define __ARCH_I386_IOCTLS_H__ # 1 "/usr/include/asm/ioctl.h" 1 3 4 # 1 "/usr/include/asm-generic/ioctl.h" 1 3 4 #define _ASM_GENERIC_IOCTL_H # 22 "/usr/include/asm-generic/ioctl.h" 3 4 #define _IOC_NRBITS 8 #define _IOC_TYPEBITS 8 #define _IOC_SIZEBITS 14 #define _IOC_DIRBITS 2 #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) #define _IOC_NRSHIFT 0 #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) #define _IOC_NONE 0U #define _IOC_WRITE 1U #define _IOC_READ 2U #define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)) extern unsigned int __invalid_size_argument_for_IOC; #define _IOC_TYPECHECK(t) ((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1 << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC) #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) # 1 "/usr/include/asm/ioctl.h" 2 3 4 # 5 "/usr/include/asm/ioctls.h" 2 3 4 #define TCGETS 0x5401 #define TCSETS 0x5402 #define TCSETSW 0x5403 #define TCSETSF 0x5404 #define TCGETA 0x5405 #define TCSETA 0x5406 #define TCSETAW 0x5407 #define TCSETAF 0x5408 #define TCSBRK 0x5409 #define TCXONC 0x540A #define TCFLSH 0x540B #define TIOCEXCL 0x540C #define TIOCNXCL 0x540D #define TIOCSCTTY 0x540E #define TIOCGPGRP 0x540F #define TIOCSPGRP 0x5410 #define TIOCOUTQ 0x5411 #define TIOCSTI 0x5412 #define TIOCGWINSZ 0x5413 #define TIOCSWINSZ 0x5414 #define TIOCMGET 0x5415 #define TIOCMBIS 0x5416 #define TIOCMBIC 0x5417 #define TIOCMSET 0x5418 #define TIOCGSOFTCAR 0x5419 #define TIOCSSOFTCAR 0x541A #define FIONREAD 0x541B #define TIOCINQ FIONREAD #define TIOCLINUX 0x541C #define TIOCCONS 0x541D #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TIOCPKT 0x5420 #define FIONBIO 0x5421 #define TIOCNOTTY 0x5422 #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 #define TIOCSBRK 0x5427 #define TIOCCBRK 0x5428 #define TIOCGSID 0x5429 #define TCGETS2 _IOR('T',0x2A, struct termios2) #define TCSETS2 _IOW('T',0x2B, struct termios2) #define TCSETSW2 _IOW('T',0x2C, struct termios2) #define TCSETSF2 _IOW('T',0x2D, struct termios2) #define TIOCGPTN _IOR('T',0x30, unsigned int) #define TIOCSPTLCK _IOW('T',0x31, int) #define FIONCLEX 0x5450 #define FIOCLEX 0x5451 #define FIOASYNC 0x5452 #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 #define TIOCSERSWILD 0x5455 #define TIOCGLCKTRMIOS 0x5456 #define TIOCSLCKTRMIOS 0x5457 #define TIOCSERGSTRUCT 0x5458 #define TIOCSERGETLSR 0x5459 #define TIOCSERGETMULTI 0x545A #define TIOCSERSETMULTI 0x545B #define TIOCMIWAIT 0x545C #define TIOCGICOUNT 0x545D #define TIOCGHAYESESP 0x545E #define TIOCSHAYESESP 0x545F #define FIOQSIZE 0x5460 #define TIOCPKT_DATA 0 #define TIOCPKT_FLUSHREAD 1 #define TIOCPKT_FLUSHWRITE 2 #define TIOCPKT_STOP 4 #define TIOCPKT_START 8 #define TIOCPKT_NOSTOP 16 #define TIOCPKT_DOSTOP 32 #define TIOCSER_TEMT 0x01 # 25 "/usr/include/bits/ioctls.h" 2 3 4 #define SIOCADDRT 0x890B #define SIOCDELRT 0x890C #define SIOCRTMSG 0x890D #define SIOCGIFNAME 0x8910 #define SIOCSIFLINK 0x8911 #define SIOCGIFCONF 0x8912 #define SIOCGIFFLAGS 0x8913 #define SIOCSIFFLAGS 0x8914 #define SIOCGIFADDR 0x8915 #define SIOCSIFADDR 0x8916 #define SIOCGIFDSTADDR 0x8917 #define SIOCSIFDSTADDR 0x8918 #define SIOCGIFBRDADDR 0x8919 #define SIOCSIFBRDADDR 0x891a #define SIOCGIFNETMASK 0x891b #define SIOCSIFNETMASK 0x891c #define SIOCGIFMETRIC 0x891d #define SIOCSIFMETRIC 0x891e #define SIOCGIFMEM 0x891f #define SIOCSIFMEM 0x8920 #define SIOCGIFMTU 0x8921 #define SIOCSIFMTU 0x8922 #define SIOCSIFNAME 0x8923 #define SIOCSIFHWADDR 0x8924 #define SIOCGIFENCAP 0x8925 #define SIOCSIFENCAP 0x8926 #define SIOCGIFHWADDR 0x8927 #define SIOCGIFSLAVE 0x8929 #define SIOCSIFSLAVE 0x8930 #define SIOCADDMULTI 0x8931 #define SIOCDELMULTI 0x8932 #define SIOCGIFINDEX 0x8933 #define SIOGIFINDEX SIOCGIFINDEX #define SIOCSIFPFLAGS 0x8934 #define SIOCGIFPFLAGS 0x8935 #define SIOCDIFADDR 0x8936 #define SIOCSIFHWBROADCAST 0x8937 #define SIOCGIFCOUNT 0x8938 #define SIOCGIFBR 0x8940 #define SIOCSIFBR 0x8941 #define SIOCGIFTXQLEN 0x8942 #define SIOCSIFTXQLEN 0x8943 #define SIOCDARP 0x8953 #define SIOCGARP 0x8954 #define SIOCSARP 0x8955 #define SIOCDRARP 0x8960 #define SIOCGRARP 0x8961 #define SIOCSRARP 0x8962 #define SIOCGIFMAP 0x8970 #define SIOCSIFMAP 0x8971 #define SIOCADDDLCI 0x8980 #define SIOCDELDLCI 0x8981 # 103 "/usr/include/bits/ioctls.h" 3 4 #define SIOCDEVPRIVATE 0x89F0 #define SIOCPROTOPRIVATE 0x89E0 # 28 "/usr/include/sys/ioctl.h" 2 3 4 # 1 "/usr/include/bits/ioctl-types.h" 1 3 4 # 28 "/usr/include/bits/ioctl-types.h" 3 4 struct winsize { unsigned short int ws_row; unsigned short int ws_col; unsigned short int ws_xpixel; unsigned short int ws_ypixel; }; #define NCC 8 struct termio { unsigned short int c_iflag; unsigned short int c_oflag; unsigned short int c_cflag; unsigned short int c_lflag; unsigned char c_line; unsigned char c_cc[8]; }; #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 #define TIOCM_RTS 0x004 #define TIOCM_ST 0x008 #define TIOCM_SR 0x010 #define TIOCM_CTS 0x020 #define TIOCM_CAR 0x040 #define TIOCM_RNG 0x080 #define TIOCM_DSR 0x100 #define TIOCM_CD TIOCM_CAR #define TIOCM_RI TIOCM_RNG #define N_TTY 0 #define N_SLIP 1 #define N_MOUSE 2 #define N_PPP 3 #define N_STRIP 4 #define N_AX25 5 #define N_X25 6 #define N_6PACK 7 #define N_MASC 8 #define N_R3964 9 #define N_PROFIBUS_FDL 10 #define N_IRDA 11 #define N_SMSBLOCK 12 #define N_HDLC 13 #define N_SYNC_PPP 14 #define N_HCI 15 # 31 "/usr/include/sys/ioctl.h" 2 3 4 # 1 "/usr/include/sys/ttydefaults.h" 1 3 4 # 41 "/usr/include/sys/ttydefaults.h" 3 4 #define _SYS_TTYDEFAULTS_H_ #define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) #define TTYDEF_OFLAG (OPOST | ONLCR | XTABS) #define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) #define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL) #define TTYDEF_SPEED (B9600) #define CTRL(x) (x&037) #define CEOF CTRL('d') #define CEOL _POSIX_VDISABLE #define CERASE 0177 #define CINTR CTRL('c') #define CSTATUS _POSIX_VDISABLE #define CKILL CTRL('u') #define CMIN 1 #define CQUIT 034 #define CSUSP CTRL('z') #define CTIME 0 #define CDSUSP CTRL('y') #define CSTART CTRL('q') #define CSTOP CTRL('s') #define CLNEXT CTRL('v') #define CDISCARD CTRL('o') #define CWERASE CTRL('w') #define CREPRINT CTRL('r') #define CEOT CEOF #define CBRK CEOL #define CRPRNT CREPRINT #define CFLUSH CDISCARD # 38 "/usr/include/sys/ioctl.h" 2 3 4 extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__)); # 38 "unix.c" 2 # 1 "/usr/include/malloc.h" 1 3 4 # 21 "/usr/include/malloc.h" 3 4 #define _MALLOC_H 1 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #define _STDDEF_H #define _STDDEF_H_ #define _ANSI_STDDEF_H #define __STDDEF_H__ # 141 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #define _PTRDIFF_T #define _T_PTRDIFF_ #define _T_PTRDIFF #define __PTRDIFF_T #define _PTRDIFF_T_ #define _BSD_PTRDIFF_T_ #define ___int_ptrdiff_t_h #define _GCC_PTRDIFF_T typedef int ptrdiff_t; # 163 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 25 "/usr/include/malloc.h" 2 3 4 #define __malloc_ptr_t void * #define __malloc_size_t size_t #define __malloc_ptrdiff_t ptrdiff_t #define __MALLOC_P(args) args __THROW #define __MALLOC_PMT(args) args # 46 "/usr/include/malloc.h" 3 4 extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) __attribute__ ((__nothrow__)); extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); extern void *memalign (size_t __alignment, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void * pvalloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; extern void *(*__morecore) (ptrdiff_t __size); extern void *__default_morecore (ptrdiff_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); struct mallinfo { int arena; int ordblks; int smblks; int hblks; int hblkhd; int usmblks; int fsmblks; int uordblks; int fordblks; int keepcost; }; extern struct mallinfo mallinfo (void) __attribute__ ((__nothrow__)); #define M_MXFAST 1 #define M_NLBLKS 2 #define M_GRAIN 3 #define M_KEEP 4 #define M_TRIM_THRESHOLD -1 #define M_TOP_PAD -2 #define M_MMAP_THRESHOLD -3 #define M_MMAP_MAX -4 #define M_CHECK_ACTION -5 #define M_PERTURB -6 extern int mallopt (int __param, int __val) __attribute__ ((__nothrow__)); extern int malloc_trim (size_t __pad) __attribute__ ((__nothrow__)); extern size_t malloc_usable_size (void *__ptr) __attribute__ ((__nothrow__)); extern void malloc_stats (void) __attribute__ ((__nothrow__)); extern void *malloc_get_state (void) __attribute__ ((__nothrow__)); extern int malloc_set_state (void *__ptr) __attribute__ ((__nothrow__)); extern void (*__malloc_initialize_hook) (void); extern void (*__free_hook) (void *__ptr, __const void *); extern void *(*__malloc_hook) (size_t __size, __const void *); extern void *(*__realloc_hook) (void *__ptr, size_t __size, __const void *); extern void *(*__memalign_hook) (size_t __alignment, size_t __size, __const void *); extern void (*__after_morecore_hook) (void); extern void __malloc_check_init (void) __attribute__ ((__nothrow__)); # 41 "unix.c" 2 # 1 "/usr/include/dirent.h" 1 3 4 # 24 "/usr/include/dirent.h" 3 4 #define _DIRENT_H 1 # 62 "/usr/include/dirent.h" 3 4 # 1 "/usr/include/bits/dirent.h" 1 3 4 # 23 "/usr/include/bits/dirent.h" 3 4 struct dirent { __ino_t d_ino; __off_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; }; # 48 "/usr/include/bits/dirent.h" 3 4 #define d_fileno d_ino #undef _DIRENT_HAVE_D_NAMLEN #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF #define _DIRENT_HAVE_D_TYPE # 63 "/usr/include/dirent.h" 2 3 4 # 86 "/usr/include/dirent.h" 3 4 #define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name)) #define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0]) # 98 "/usr/include/dirent.h" 3 4 enum { DT_UNKNOWN = 0, #define DT_UNKNOWN DT_UNKNOWN DT_FIFO = 1, #define DT_FIFO DT_FIFO DT_CHR = 2, #define DT_CHR DT_CHR DT_DIR = 4, #define DT_DIR DT_DIR DT_BLK = 6, #define DT_BLK DT_BLK DT_REG = 8, #define DT_REG DT_REG DT_LNK = 10, #define DT_LNK DT_LNK DT_SOCK = 12, #define DT_SOCK DT_SOCK DT_WHT = 14 #define DT_WHT DT_WHT }; #define IFTODT(mode) (((mode) & 0170000) >> 12) #define DTTOIF(dirtype) ((dirtype) << 12) typedef struct __dirstream DIR; extern DIR *opendir (__const char *__name) __attribute__ ((__nonnull__ (1))); # 150 "/usr/include/dirent.h" 3 4 extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); # 163 "/usr/include/dirent.h" 3 4 extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); # 184 "/usr/include/dirent.h" 3 4 extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __attribute__ ((__nonnull__ (1, 2, 3))); # 209 "/usr/include/dirent.h" 3 4 extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 # 26 "/usr/include/bits/posix1_lim.h" 3 4 #define _BITS_POSIX1_LIM_H 1 #define _POSIX_AIO_LISTIO_MAX 2 #define _POSIX_AIO_MAX 1 #define _POSIX_ARG_MAX 4096 #define _POSIX_CHILD_MAX 25 #define _POSIX_DELAYTIMER_MAX 32 #define _POSIX_HOST_NAME_MAX 255 #define _POSIX_LINK_MAX 8 #define _POSIX_LOGIN_NAME_MAX 9 #define _POSIX_MAX_CANON 255 #define _POSIX_MAX_INPUT 255 #define _POSIX_MQ_OPEN_MAX 8 #define _POSIX_MQ_PRIO_MAX 32 #define _POSIX_NAME_MAX 14 #define _POSIX_NGROUPS_MAX 8 #define _POSIX_OPEN_MAX 20 #define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX #define _POSIX_PATH_MAX 256 #define _POSIX_PIPE_BUF 512 #define _POSIX_RE_DUP_MAX 255 #define _POSIX_RTSIG_MAX 8 #define _POSIX_SEM_NSEMS_MAX 256 #define _POSIX_SEM_VALUE_MAX 32767 #define _POSIX_SIGQUEUE_MAX 32 #define _POSIX_SSIZE_MAX 32767 #define _POSIX_STREAM_MAX 8 #define _POSIX_SYMLINK_MAX 255 #define _POSIX_SYMLOOP_MAX 8 #define _POSIX_TIMER_MAX 32 #define _POSIX_TTY_NAME_MAX 9 #define _POSIX_TZNAME_MAX 6 #define _POSIX_QLIMIT 1 #define _POSIX_HIWAT _POSIX_PIPE_BUF #define _POSIX_UIO_MAXIOV 16 #define _POSIX_CLOCKRES_MIN 20000000 # 1 "/usr/include/bits/local_lim.h" 1 3 4 # 26 "/usr/include/bits/local_lim.h" 3 4 #define __undef_NR_OPEN #define __undef_LINK_MAX #define __undef_OPEN_MAX # 1 "/usr/include/linux/limits.h" 1 3 4 #define _LINUX_LIMITS_H #define NR_OPEN 1024 #define NGROUPS_MAX 65536 #define ARG_MAX 131072 #define LINK_MAX 127 #define MAX_CANON 255 #define MAX_INPUT 255 #define NAME_MAX 255 #define PATH_MAX 4096 #define PIPE_BUF 4096 #define XATTR_NAME_MAX 255 #define XATTR_SIZE_MAX 65536 #define XATTR_LIST_MAX 65536 #define RTSIG_MAX 32 # 37 "/usr/include/bits/local_lim.h" 2 3 4 #undef NR_OPEN #undef __undef_NR_OPEN #undef LINK_MAX #undef __undef_LINK_MAX #undef OPEN_MAX #undef __undef_OPEN_MAX #define _POSIX_THREAD_KEYS_MAX 128 #define PTHREAD_KEYS_MAX 1024 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS #define _POSIX_THREAD_THREADS_MAX 64 #undef PTHREAD_THREADS_MAX #define AIO_PRIO_DELTA_MAX 20 #define PTHREAD_STACK_MIN 16384 #define DELAYTIMER_MAX 2147483647 #define TTY_NAME_MAX 32 #define LOGIN_NAME_MAX 256 #define HOST_NAME_MAX 64 #define MQ_PRIO_MAX 32768 #define SEM_VALUE_MAX (2147483647) # 154 "/usr/include/bits/posix1_lim.h" 2 3 4 #define SSIZE_MAX LONG_MAX # 233 "/usr/include/dirent.h" 2 3 4 #define MAXNAMLEN NAME_MAX #define __need_size_t # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 163 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 244 "/usr/include/dirent.h" 2 3 4 extern int scandir (__const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (__const struct dirent *), int (*__cmp) (__const void *, __const void *)) __attribute__ ((__nonnull__ (1, 2))); # 280 "/usr/include/dirent.h" 3 4 extern int alphasort (__const void *__e1, __const void *__e2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 324 "/usr/include/dirent.h" 3 4 extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off_t *__restrict __basep) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); # 349 "/usr/include/dirent.h" 3 4 # 47 "unix.c" 2 # 1 "../lib/et/com_err.h" 1 # 14 "../lib/et/com_err.h" #define COM_ERR_ATTR(x) __attribute__(x) # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stdarg.h" 1 3 4 # 34 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4 #define _STDARG_H #define _ANSI_STDARG_H_ #undef __need___va_list # 50 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4 #define va_start(v,l) __builtin_va_start(v,l) #define va_end(v) __builtin_va_end(v) #define va_arg(v,l) __builtin_va_arg(v,l) #define va_copy(d,s) __builtin_va_copy(d,s) #define __va_copy(d,s) __builtin_va_copy(d,s) # 105 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; #define _VA_LIST_ #define _VA_LIST #define _VA_LIST_DEFINED #define _VA_LIST_T_H #define __va_list__ # 20 "../lib/et/com_err.h" 2 typedef long errcode_t; struct error_table { char const * const * msgs; long base; int n_msgs; }; struct et_list; extern void com_err (const char *, long, const char *, ...) __attribute__((format(printf, 3, 4))); extern void com_err_va (const char *whoami, errcode_t code, const char *fmt, va_list args) __attribute__((format(printf, 3, 0))); extern char const *error_message (long); extern void (*com_err_hook) (const char *, long, const char *, va_list); extern void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list))) (const char *, long, const char *, va_list); extern void (*reset_com_err_hook (void)) (const char *, long, const char *, va_list); extern int init_error_table(const char * const *msgs, long base, int count); extern errcode_t add_error_table(const struct error_table * et); extern errcode_t remove_error_table(const struct error_table * et); extern void add_to_error_table(struct et_list *new_table); extern const char *com_right(struct et_list *list, long code); extern void initialize_error_table_r(struct et_list **list, const char **messages, int num_errors, long base); extern void free_error_table(struct et_list *et); #define __COM_ERR_H #define __COM_ERR_H__ # 50 "unix.c" 2 # 1 "e2fsck.h" 1 # 10 "e2fsck.h" #define _E2FSCK_H # 23 "e2fsck.h" # 1 "/usr/include/sys/time.h" 1 3 4 # 21 "/usr/include/sys/time.h" 3 4 #define _SYS_TIME_H 1 #define __need_time_t #define __need_timeval # 1 "/usr/include/bits/time.h" 1 3 4 # 62 "/usr/include/bits/time.h" 3 4 #undef __need_timeval # 30 "/usr/include/sys/time.h" 2 3 4 # 39 "/usr/include/sys/time.h" 3 4 # 57 "/usr/include/sys/time.h" 3 4 struct timezone { int tz_minuteswest; int tz_dsttime; }; typedef struct timezone *__restrict __timezone_ptr_t; # 73 "/usr/include/sys/time.h" 3 4 extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int settimeofday (__const struct timeval *__tv, __const struct timezone *__tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int adjtime (__const struct timeval *__delta, struct timeval *__olddelta) __attribute__ ((__nothrow__)); enum __itimer_which { ITIMER_REAL = 0, #define ITIMER_REAL ITIMER_REAL ITIMER_VIRTUAL = 1, #define ITIMER_VIRTUAL ITIMER_VIRTUAL ITIMER_PROF = 2 #define ITIMER_PROF ITIMER_PROF }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef int __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __attribute__ ((__nothrow__)); extern int setitimer (__itimer_which_t __which, __const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __attribute__ ((__nothrow__)); extern int utimes (__const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); # 164 "/usr/include/sys/time.h" 3 4 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) #define timercmp(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) : ((a)->tv_sec CMP (b)->tv_sec)) #define timeradd(a,b,result) do { (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; if ((result)->tv_usec >= 1000000) { ++(result)->tv_sec; (result)->tv_usec -= 1000000; } } while (0) # 180 "/usr/include/sys/time.h" 3 4 #define timersub(a,b,result) do { (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; if ((result)->tv_usec < 0) { --(result)->tv_sec; (result)->tv_usec += 1000000; } } while (0) # 191 "/usr/include/sys/time.h" 3 4 # 24 "e2fsck.h" 2 # 1 "/usr/include/setjmp.h" 1 3 4 # 24 "/usr/include/setjmp.h" 3 4 #define _SETJMP_H 1 # 1 "/usr/include/bits/setjmp.h" 1 3 4 # 22 "/usr/include/bits/setjmp.h" 3 4 #define _BITS_SETJMP_H 1 typedef int __jmp_buf[6]; # 31 "/usr/include/setjmp.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 32 "/usr/include/setjmp.h" 2 3 4 struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; }; typedef struct __jmp_buf_tag jmp_buf[1]; extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); #define setjmp(env) _setjmp (env) # 78 "/usr/include/setjmp.h" 3 4 extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); typedef struct __jmp_buf_tag sigjmp_buf[1]; #define sigsetjmp(env,savemask) __sigsetjmp (env, savemask) extern void siglongjmp (sigjmp_buf __env, int __val) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); # 27 "e2fsck.h" 2 # 1 "../lib/ext2fs/ext2_fs.h" 1 # 17 "../lib/ext2fs/ext2_fs.h" #define _LINUX_EXT2_FS_H # 1 "../lib/ext2fs/ext2_types.h" 1 #define _EXT2_TYPES_H #define __S8_TYPEDEF __signed__ char #define __U8_TYPEDEF unsigned char #define __S16_TYPEDEF __signed__ short #define __U16_TYPEDEF unsigned short #define __S32_TYPEDEF __signed__ int #define __U32_TYPEDEF unsigned int #define __S64_TYPEDEF __signed__ long long #define __U64_TYPEDEF unsigned long long typedef unsigned char __u8; typedef __signed__ char __s8; typedef unsigned short __u16; # 46 "../lib/ext2fs/ext2_types.h" typedef __signed__ short __s16; # 61 "../lib/ext2fs/ext2_types.h" typedef unsigned int __u32; # 79 "../lib/ext2fs/ext2_types.h" typedef __signed__ int __s32; # 97 "../lib/ext2fs/ext2_types.h" typedef unsigned long long __u64; # 113 "../lib/ext2fs/ext2_types.h" typedef __signed__ long long __s64; # 132 "../lib/ext2fs/ext2_types.h" #undef __S8_TYPEDEF #undef __U8_TYPEDEF #undef __S16_TYPEDEF #undef __U16_TYPEDEF #undef __S32_TYPEDEF #undef __U32_TYPEDEF #undef __S64_TYPEDEF #undef __U64_TYPEDEF # 20 "../lib/ext2fs/ext2_fs.h" 2 # 28 "../lib/ext2fs/ext2_fs.h" #undef EXT2FS_DEBUG #define EXT2_PREALLOCATE #define EXT2_DEFAULT_PREALLOC_BLOCKS 8 #define EXT2FS_DATE "95/08/09" #define EXT2FS_VERSION "0.5b" #define EXT2_BAD_INO 1 #define EXT2_ROOT_INO 2 #define EXT2_ACL_IDX_INO 3 #define EXT2_ACL_DATA_INO 4 #define EXT2_BOOT_LOADER_INO 5 #define EXT2_UNDEL_DIR_INO 6 #define EXT2_RESIZE_INO 7 #define EXT2_JOURNAL_INO 8 #define EXT2_GOOD_OLD_FIRST_INO 11 #define EXT2_SUPER_MAGIC 0xEF53 #define EXT2_SB(sb) (sb) #define EXT2_LINK_MAX 65000 #define EXT2_MIN_BLOCK_LOG_SIZE 10 #define EXT2_MAX_BLOCK_LOG_SIZE 16 #define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE) #define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE) #define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size) #define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10) #define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size) #define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino) #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(__u32)) #define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE #define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE #define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE #define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size) #define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s)) struct ext2_acl_header { __u32 aclh_size; __u32 aclh_file_count; __u32 aclh_acle_count; __u32 aclh_first_acle; }; struct ext2_acl_entry { __u32 acle_size; __u16 acle_perms; __u16 acle_type; __u16 acle_tag; __u16 acle_pad1; __u32 acle_next; }; struct ext2_group_desc { __u32 bg_block_bitmap; __u32 bg_inode_bitmap; __u32 bg_inode_table; __u16 bg_free_blocks_count; __u16 bg_free_inodes_count; __u16 bg_used_dirs_count; __u16 bg_flags; __u32 bg_reserved[2]; __u16 bg_itable_unused; __u16 bg_checksum; }; struct ext4_group_desc { __u32 bg_block_bitmap; __u32 bg_inode_bitmap; __u32 bg_inode_table; __u16 bg_free_blocks_count; __u16 bg_free_inodes_count; __u16 bg_used_dirs_count; __u16 bg_flags; __u32 bg_reserved[2]; __u16 bg_itable_unused; __u16 bg_checksum; __u32 bg_block_bitmap_hi; __u32 bg_inode_bitmap_hi; __u32 bg_inode_table_hi; __u16 bg_free_blocks_count_hi; __u16 bg_free_inodes_count_hi; __u16 bg_used_dirs_count_hi; __u16 bg_pad; __u32 bg_reserved2[3]; }; #define EXT2_BG_INODE_UNINIT 0x0001 #define EXT2_BG_BLOCK_UNINIT 0x0002 # 189 "../lib/ext2fs/ext2_fs.h" struct ext2_dx_root_info { __u32 reserved_zero; __u8 hash_version; __u8 info_length; __u8 indirect_levels; __u8 unused_flags; }; #define EXT2_HASH_LEGACY 0 #define EXT2_HASH_HALF_MD4 1 #define EXT2_HASH_TEA 2 #define EXT2_HASH_LEGACY_UNSIGNED 3 #define EXT2_HASH_HALF_MD4_UNSIGNED 4 #define EXT2_HASH_TEA_UNSIGNED 5 #define EXT2_HASH_FLAG_INCOMPAT 0x1 struct ext2_dx_entry { __u32 hash; __u32 block; }; struct ext2_dx_countlimit { __u16 limit; __u16 count; }; #define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group) #define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group) #define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s)) #define EXT2_MAX_BLOCKS_PER_GROUP(s) ((1 << 16) - 8) #define EXT2_MAX_INODES_PER_GROUP(s) ((1 << 16) - EXT2_INODES_PER_BLOCK(s)) #define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc)) #define EXT2_NDIR_BLOCKS 12 #define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS #define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1) #define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1) #define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1) #define EXT2_SECRM_FL 0x00000001 #define EXT2_UNRM_FL 0x00000002 #define EXT2_COMPR_FL 0x00000004 #define EXT2_SYNC_FL 0x00000008 #define EXT2_IMMUTABLE_FL 0x00000010 #define EXT2_APPEND_FL 0x00000020 #define EXT2_NODUMP_FL 0x00000040 #define EXT2_NOATIME_FL 0x00000080 #define EXT2_DIRTY_FL 0x00000100 #define EXT2_COMPRBLK_FL 0x00000200 #define EXT2_NOCOMPR_FL 0x00000400 #define EXT2_ECOMPR_FL 0x00000800 #define EXT2_BTREE_FL 0x00001000 #define EXT2_INDEX_FL 0x00001000 #define EXT2_IMAGIC_FL 0x00002000 #define EXT3_JOURNAL_DATA_FL 0x00004000 #define EXT2_NOTAIL_FL 0x00008000 #define EXT2_DIRSYNC_FL 0x00010000 #define EXT2_TOPDIR_FL 0x00020000 #define EXT4_EXTENTS_FL 0x00080000 #define EXT2_RESERVED_FL 0x80000000 #define EXT2_FL_USER_VISIBLE 0x000BDFFF #define EXT2_FL_USER_MODIFIABLE 0x000080FF struct ext2_new_group_input { __u32 group; __u32 block_bitmap; __u32 inode_bitmap; __u32 inode_table; __u32 blocks_count; __u16 reserved_blocks; __u16 unused; }; #define EXT2_IOC_GETFLAGS _IOR('f', 1, long) #define EXT2_IOC_SETFLAGS _IOW('f', 2, long) #define EXT2_IOC_GETVERSION _IOR('v', 1, long) #define EXT2_IOC_SETVERSION _IOW('v', 2, long) #define EXT2_IOC_GETVERSION_NEW _IOR('f', 3, long) #define EXT2_IOC_SETVERSION_NEW _IOW('f', 4, long) #define EXT2_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long) #define EXT2_IOC_GROUP_ADD _IOW('f', 8,struct ext2_new_group_input) struct ext2_inode { __u16 i_mode; __u16 i_uid; __u32 i_size; __u32 i_atime; __u32 i_ctime; __u32 i_mtime; __u32 i_dtime; __u16 i_gid; __u16 i_links_count; __u32 i_blocks; __u32 i_flags; union { struct { __u32 l_i_version; } linux1; struct { __u32 h_i_translator; } hurd1; struct { __u32 m_i_reserved1; } masix1; } osd1; __u32 i_block[(((12 + 1) + 1) + 1)]; __u32 i_generation; __u32 i_file_acl; __u32 i_dir_acl; __u32 i_faddr; union { struct { __u16 l_i_blocks_hi; __u16 i_pad1; __u16 l_i_uid_high; __u16 l_i_gid_high; __u32 l_i_reserved2; } linux2; struct { __u8 h_i_frag; __u8 h_i_fsize; __u16 h_i_mode_high; __u16 h_i_uid_high; __u16 h_i_gid_high; __u32 h_i_author; } hurd2; struct { __u8 m_i_frag; __u8 m_i_fsize; __u16 m_pad1; __u32 m_i_reserved2[2]; } masix2; } osd2; }; struct ext2_inode_large { __u16 i_mode; __u16 i_uid; __u32 i_size; __u32 i_atime; __u32 i_ctime; __u32 i_mtime; __u32 i_dtime; __u16 i_gid; __u16 i_links_count; __u32 i_blocks; __u32 i_flags; union { struct { __u32 l_i_version; } linux1; struct { __u32 h_i_translator; } hurd1; struct { __u32 m_i_reserved1; } masix1; } osd1; __u32 i_block[(((12 + 1) + 1) + 1)]; __u32 i_generation; __u32 i_file_acl; __u32 i_dir_acl; __u32 i_faddr; union { struct { __u16 l_i_blocks_hi; __u16 i_pad1; __u16 l_i_uid_high; __u16 l_i_gid_high; __u32 l_i_reserved2; } linux2; struct { __u8 h_i_frag; __u8 h_i_fsize; __u16 h_i_mode_high; __u16 h_i_uid_high; __u16 h_i_gid_high; __u32 h_i_author; } hurd2; struct { __u8 m_i_frag; __u8 m_i_fsize; __u16 m_pad1; __u32 m_i_reserved2[2]; } masix2; } osd2; __u16 i_extra_isize; __u16 i_pad1; __u32 i_ctime_extra; __u32 i_mtime_extra; __u32 i_atime_extra; __u32 i_crtime; __u32 i_crtime_extra; }; #define i_size_high i_dir_acl #define i_reserved1 osd1.linux1.l_i_reserved1 #define i_frag osd2.linux2.l_i_frag #define i_fsize osd2.linux2.l_i_fsize #define i_uid_low i_uid #define i_gid_low i_gid #define i_uid_high osd2.linux2.l_i_uid_high #define i_gid_high osd2.linux2.l_i_gid_high #define i_reserved2 osd2.linux2.l_i_reserved2 # 456 "../lib/ext2fs/ext2_fs.h" #define inode_uid(inode) ((inode).i_uid | (inode).i_uid_high << 16) #define inode_gid(inode) ((inode).i_gid | (inode).i_gid_high << 16) #define EXT2_VALID_FS 0x0001 #define EXT2_ERROR_FS 0x0002 #define EXT2_FLAGS_SIGNED_HASH 0x0001 #define EXT2_FLAGS_UNSIGNED_HASH 0x0002 #define EXT2_MOUNT_CHECK 0x0001 #define EXT2_MOUNT_GRPID 0x0004 #define EXT2_MOUNT_DEBUG 0x0008 #define EXT2_MOUNT_ERRORS_CONT 0x0010 #define EXT2_MOUNT_ERRORS_RO 0x0020 #define EXT2_MOUNT_ERRORS_PANIC 0x0040 #define EXT2_MOUNT_MINIX_DF 0x0080 #define EXT2_MOUNT_NO_UID32 0x0200 #define clear_opt(o,opt) o &= ~EXT2_MOUNT_ ##opt #define set_opt(o,opt) o |= EXT2_MOUNT_ ##opt #define test_opt(sb,opt) (EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_ ##opt) #define EXT2_DFL_MAX_MNT_COUNT 20 #define EXT2_DFL_CHECKINTERVAL 0 #define EXT2_ERRORS_CONTINUE 1 #define EXT2_ERRORS_RO 2 #define EXT2_ERRORS_PANIC 3 #define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE struct ext2_super_block { __u32 s_inodes_count; __u32 s_blocks_count; __u32 s_r_blocks_count; __u32 s_free_blocks_count; __u32 s_free_inodes_count; __u32 s_first_data_block; __u32 s_log_block_size; __s32 s_log_frag_size; __u32 s_blocks_per_group; __u32 s_frags_per_group; __u32 s_inodes_per_group; __u32 s_mtime; __u32 s_wtime; __u16 s_mnt_count; __s16 s_max_mnt_count; __u16 s_magic; __u16 s_state; __u16 s_errors; __u16 s_minor_rev_level; __u32 s_lastcheck; __u32 s_checkinterval; __u32 s_creator_os; __u32 s_rev_level; __u16 s_def_resuid; __u16 s_def_resgid; # 544 "../lib/ext2fs/ext2_fs.h" __u32 s_first_ino; __u16 s_inode_size; __u16 s_block_group_nr; __u32 s_feature_compat; __u32 s_feature_incompat; __u32 s_feature_ro_compat; __u8 s_uuid[16]; char s_volume_name[16]; char s_last_mounted[64]; __u32 s_algorithm_usage_bitmap; __u8 s_prealloc_blocks; __u8 s_prealloc_dir_blocks; __u16 s_reserved_gdt_blocks; __u8 s_journal_uuid[16]; __u32 s_journal_inum; __u32 s_journal_dev; __u32 s_last_orphan; __u32 s_hash_seed[4]; __u8 s_def_hash_version; __u8 s_jnl_backup_type; __u16 s_desc_size; __u32 s_default_mount_opts; __u32 s_first_meta_bg; __u32 s_mkfs_time; __u32 s_jnl_blocks[17]; __u32 s_blocks_count_hi; __u32 s_r_blocks_count_hi; __u32 s_free_blocks_hi; __u16 s_min_extra_isize; __u16 s_want_extra_isize; __u32 s_flags; __u16 s_raid_stride; __u16 s_mmp_interval; __u64 s_mmp_block; __u32 s_raid_stripe_width; __u32 s_reserved[163]; }; #define EXT2_OS_LINUX 0 #define EXT2_OS_HURD 1 #define EXT2_OS_MASIX 2 #define EXT2_OS_FREEBSD 3 #define EXT2_OS_LITES 4 #define EXT2_GOOD_OLD_REV 0 #define EXT2_DYNAMIC_REV 1 #define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV #define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV #define EXT2_GOOD_OLD_INODE_SIZE 128 #define EXT3_JNL_BACKUP_BLOCKS 1 #define EXT2_HAS_COMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_feature_compat & (mask) ) #define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_feature_ro_compat & (mask) ) #define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_feature_incompat & (mask) ) #define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001 #define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002 #define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004 #define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008 #define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010 #define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020 #define EXT2_FEATURE_COMPAT_LAZY_BG 0x0040 #define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 #define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 #define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008 #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 #define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 #define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001 #define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002 #define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 #define EXT2_FEATURE_INCOMPAT_META_BG 0x0010 #define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 #define EXT4_FEATURE_INCOMPAT_MMP 0x0100 #define EXT2_FEATURE_COMPAT_SUPP 0 #define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE) #define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| EXT2_FEATURE_RO_COMPAT_LARGE_FILE| EXT2_FEATURE_RO_COMPAT_BTREE_DIR) #define EXT2_DEF_RESUID 0 #define EXT2_DEF_RESGID 0 #define EXT2_DEFM_DEBUG 0x0001 #define EXT2_DEFM_BSDGROUPS 0x0002 #define EXT2_DEFM_XATTR_USER 0x0004 #define EXT2_DEFM_ACL 0x0008 #define EXT2_DEFM_UID16 0x0010 #define EXT3_DEFM_JMODE 0x0060 #define EXT3_DEFM_JMODE_DATA 0x0020 #define EXT3_DEFM_JMODE_ORDERED 0x0040 #define EXT3_DEFM_JMODE_WBACK 0x0060 #define EXT2_NAME_LEN 255 struct ext2_dir_entry { __u32 inode; __u16 rec_len; __u16 name_len; char name[255]; }; struct ext2_dir_entry_2 { __u32 inode; __u16 rec_len; __u8 name_len; __u8 file_type; char name[255]; }; #define EXT2_FT_UNKNOWN 0 #define EXT2_FT_REG_FILE 1 #define EXT2_FT_DIR 2 #define EXT2_FT_CHRDEV 3 #define EXT2_FT_BLKDEV 4 #define EXT2_FT_FIFO 5 #define EXT2_FT_SOCK 6 #define EXT2_FT_SYMLINK 7 #define EXT2_FT_MAX 8 #define EXT2_DIR_PAD 4 #define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) #define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & ~EXT2_DIR_ROUND) #define EXT2_MMP_MAGIC 0x004D4D50 #define EXT2_MMP_CLEAN 0xFF4D4D50 #define EXT2_MMP_FSCK_ON 0xE24D4D50 struct mmp_struct { __u32 mmp_magic; __u32 mmp_seq; __u64 mmp_time; char mmp_nodename[64]; char mmp_bdevname[32]; __u16 mmp_interval; __u16 mmp_pad1; __u32 mmp_pad2; }; #define EXT2_MMP_DEF_INTERVAL 5 # 35 "e2fsck.h" 2 # 1 "../lib/ext2fs/ext2fs.h" 1 # 13 "../lib/ext2fs/ext2fs.h" #define _EXT2FS_EXT2FS_H #define EXT2FS_ATTR(x) __attribute__(x) # 38 "../lib/ext2fs/ext2fs.h" #define EXT2FS_ENABLE_SWAPFS # 48 "../lib/ext2fs/ext2fs.h" #define SUPERBLOCK_OFFSET 1024 #define SUPERBLOCK_SIZE 1024 #define EXT2_LIB_CURRENT_REV EXT2_DYNAMIC_REV # 70 "../lib/ext2fs/ext2fs.h" # 1 "../lib/ext2fs/ext2_types.h" 1 # 71 "../lib/ext2fs/ext2fs.h" 2 # 1 "../lib/ext2fs/ext2_fs.h" 1 # 72 "../lib/ext2fs/ext2fs.h" 2 # 1 "../lib/ext2fs/ext3_extents.h" 1 # 20 "../lib/ext2fs/ext3_extents.h" #define _LINUX_EXT3_EXTENTS #define AGRESSIVE_TEST_ #define CHECK_BINSEARCH_ # 48 "../lib/ext2fs/ext3_extents.h" #define ext_debug(tree,fmt,a...) #define EXT_STATS_ #define EXT3_ALLOC_NEEDED 3 # 71 "../lib/ext2fs/ext3_extents.h" struct ext3_extent { __u32 ee_block; __u16 ee_len; __u16 ee_start_hi; __u32 ee_start; }; struct ext3_extent_idx { __u32 ei_block; __u32 ei_leaf; __u16 ei_leaf_hi; __u16 ei_unused; }; struct ext3_extent_header { __u16 eh_magic; __u16 eh_entries; __u16 eh_max; __u16 eh_depth; __u32 eh_generation; }; #define EXT3_EXT_MAGIC 0xf30a struct ext3_ext_path { __u32 p_block; __u16 p_depth; struct ext3_extent *p_ext; struct ext3_extent_idx *p_idx; struct ext3_extent_header *p_hdr; struct buffer_head *p_bh; }; #define EXT_CONTINUE 0 #define EXT_BREAK 1 #define EXT_REPEAT 2 #define EXT_MAX_BLOCK 0xffffffff #define EXT_CACHE_MARK 0xffff #define EXT_FIRST_EXTENT(__hdr__) ((struct ext3_extent *) (((char *) (__hdr__)) + sizeof(struct ext3_extent_header))) #define EXT_FIRST_INDEX(__hdr__) ((struct ext3_extent_idx *) (((char *) (__hdr__)) + sizeof(struct ext3_extent_header))) #define EXT_HAS_FREE_INDEX(__path__) ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) #define EXT_LAST_EXTENT(__hdr__) (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) #define EXT_LAST_INDEX(__hdr__) (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) #define EXT_MAX_EXTENT(__hdr__) (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) #define EXT_MAX_INDEX(__hdr__) (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) #define EXT_ROOT_HDR(tree) ((struct ext3_extent_header *) (tree)->root) #define EXT_BLOCK_HDR(bh) ((struct ext3_extent_header *) (bh)->b_data) #define EXT_DEPTH(_t_) (((struct ext3_extent_header *)((_t_)->root))->eh_depth) #define EXT_GENERATION(_t_) (((struct ext3_extent_header *)((_t_)->root))->eh_generation) #define EXT_ASSERT(__x__) if (!(__x__)) BUG(); struct ext3_extent_buf { unsigned long start; int buflen; void *buffer; void *cur; int err; }; struct ext3_extent_tree_stats { int depth; int extents_num; int leaf_num; }; # 73 "../lib/ext2fs/ext2fs.h" 2 typedef __u32 ext2_ino_t; typedef __u32 blk_t; typedef __u32 dgrp_t; typedef __u32 ext2_off_t; typedef __s64 e2_blkcnt_t; typedef __u32 ext2_dirhash_t; # 1 "../lib/et/com_err.h" 1 # 88 "../lib/ext2fs/ext2fs.h" 2 # 1 "../lib/ext2fs/ext2_io.h" 1 # 13 "../lib/ext2fs/ext2_io.h" #define _EXT2FS_EXT2_IO_H typedef long long ext2_loff_t; ext2_loff_t ext2fs_llseek (int, ext2_loff_t, int); typedef struct struct_io_manager *io_manager; typedef struct struct_io_channel *io_channel; #define CHANNEL_FLAGS_WRITETHROUGH 0x01 struct struct_io_channel { errcode_t magic; io_manager manager; char *name; int block_size; errcode_t (*read_error)(io_channel channel, unsigned long block, int count, void *data, size_t size, int actual_bytes_read, errcode_t error); errcode_t (*write_error)(io_channel channel, unsigned long block, int count, const void *data, size_t size, int actual_bytes_written, errcode_t error); int refcount; int flags; int reserved[14]; void *private_data; void *app_data; }; struct struct_io_manager { errcode_t magic; const char *name; errcode_t (*open)(const char *name, int flags, io_channel *channel); errcode_t (*close)(io_channel channel); errcode_t (*set_blksize)(io_channel channel, int blksize); errcode_t (*read_blk)(io_channel channel, unsigned long block, int count, void *data); errcode_t (*write_blk)(io_channel channel, unsigned long block, int count, const void *data); errcode_t (*flush)(io_channel channel); errcode_t (*write_byte)(io_channel channel, unsigned long offset, int count, const void *data); errcode_t (*set_option)(io_channel channel, const char *option, const char *arg); int reserved[14]; }; #define IO_FLAG_RW 0x0001 #define IO_FLAG_EXCLUSIVE 0x0002 #define io_channel_close(c) ((c)->manager->close((c))) #define io_channel_set_blksize(c,s) ((c)->manager->set_blksize((c),s)) #define io_channel_read_blk(c,b,n,d) ((c)->manager->read_blk((c),b,n,d)) #define io_channel_write_blk(c,b,n,d) ((c)->manager->write_blk((c),b,n,d)) #define io_channel_flush(c) ((c)->manager->flush((c))) #define io_channel_bumpcount(c) ((c)->refcount++) extern errcode_t io_channel_set_options(io_channel channel, const char *options); extern errcode_t io_channel_write_byte(io_channel channel, unsigned long offset, int count, const void *data); extern io_manager unix_io_manager; extern io_manager test_io_manager, test_io_backing_manager; extern void (*test_io_cb_read_blk) (unsigned long block, int count, errcode_t err); extern void (*test_io_cb_write_blk) (unsigned long block, int count, errcode_t err); extern void (*test_io_cb_set_blksize) (int blksize, errcode_t err); # 89 "../lib/ext2fs/ext2fs.h" 2 # 1 "../lib/ext2fs/ext2_err.h" 1 #define EXT2_ET_BASE (2133571328L) #define EXT2_ET_MAGIC_EXT2FS_FILSYS (2133571329L) #define EXT2_ET_MAGIC_BADBLOCKS_LIST (2133571330L) #define EXT2_ET_MAGIC_BADBLOCKS_ITERATE (2133571331L) #define EXT2_ET_MAGIC_INODE_SCAN (2133571332L) #define EXT2_ET_MAGIC_IO_CHANNEL (2133571333L) #define EXT2_ET_MAGIC_UNIX_IO_CHANNEL (2133571334L) #define EXT2_ET_MAGIC_IO_MANAGER (2133571335L) #define EXT2_ET_MAGIC_BLOCK_BITMAP (2133571336L) #define EXT2_ET_MAGIC_INODE_BITMAP (2133571337L) #define EXT2_ET_MAGIC_GENERIC_BITMAP (2133571338L) #define EXT2_ET_MAGIC_TEST_IO_CHANNEL (2133571339L) #define EXT2_ET_MAGIC_DBLIST (2133571340L) #define EXT2_ET_MAGIC_ICOUNT (2133571341L) #define EXT2_ET_MAGIC_PQ_IO_CHANNEL (2133571342L) #define EXT2_ET_MAGIC_EXT2_FILE (2133571343L) #define EXT2_ET_MAGIC_E2IMAGE (2133571344L) #define EXT2_ET_MAGIC_INODE_IO_CHANNEL (2133571345L) #define EXT2_ET_MAGIC_RESERVED_9 (2133571346L) #define EXT2_ET_BAD_MAGIC (2133571347L) #define EXT2_ET_REV_TOO_HIGH (2133571348L) #define EXT2_ET_RO_FILSYS (2133571349L) #define EXT2_ET_GDESC_READ (2133571350L) #define EXT2_ET_GDESC_WRITE (2133571351L) #define EXT2_ET_GDESC_BAD_BLOCK_MAP (2133571352L) #define EXT2_ET_GDESC_BAD_INODE_MAP (2133571353L) #define EXT2_ET_GDESC_BAD_INODE_TABLE (2133571354L) #define EXT2_ET_INODE_BITMAP_WRITE (2133571355L) #define EXT2_ET_INODE_BITMAP_READ (2133571356L) #define EXT2_ET_BLOCK_BITMAP_WRITE (2133571357L) #define EXT2_ET_BLOCK_BITMAP_READ (2133571358L) #define EXT2_ET_INODE_TABLE_WRITE (2133571359L) #define EXT2_ET_INODE_TABLE_READ (2133571360L) #define EXT2_ET_NEXT_INODE_READ (2133571361L) #define EXT2_ET_UNEXPECTED_BLOCK_SIZE (2133571362L) #define EXT2_ET_DIR_CORRUPTED (2133571363L) #define EXT2_ET_SHORT_READ (2133571364L) #define EXT2_ET_SHORT_WRITE (2133571365L) #define EXT2_ET_DIR_NO_SPACE (2133571366L) #define EXT2_ET_NO_INODE_BITMAP (2133571367L) #define EXT2_ET_NO_BLOCK_BITMAP (2133571368L) #define EXT2_ET_BAD_INODE_NUM (2133571369L) #define EXT2_ET_BAD_BLOCK_NUM (2133571370L) #define EXT2_ET_EXPAND_DIR_ERR (2133571371L) #define EXT2_ET_TOOSMALL (2133571372L) #define EXT2_ET_BAD_BLOCK_MARK (2133571373L) #define EXT2_ET_BAD_BLOCK_UNMARK (2133571374L) #define EXT2_ET_BAD_BLOCK_TEST (2133571375L) #define EXT2_ET_BAD_INODE_MARK (2133571376L) #define EXT2_ET_BAD_INODE_UNMARK (2133571377L) #define EXT2_ET_BAD_INODE_TEST (2133571378L) #define EXT2_ET_FUDGE_BLOCK_BITMAP_END (2133571379L) #define EXT2_ET_FUDGE_INODE_BITMAP_END (2133571380L) #define EXT2_ET_BAD_IND_BLOCK (2133571381L) #define EXT2_ET_BAD_DIND_BLOCK (2133571382L) #define EXT2_ET_BAD_TIND_BLOCK (2133571383L) #define EXT2_ET_NEQ_BLOCK_BITMAP (2133571384L) #define EXT2_ET_NEQ_INODE_BITMAP (2133571385L) #define EXT2_ET_BAD_DEVICE_NAME (2133571386L) #define EXT2_ET_MISSING_INODE_TABLE (2133571387L) #define EXT2_ET_CORRUPT_SUPERBLOCK (2133571388L) #define EXT2_ET_BAD_GENERIC_MARK (2133571389L) #define EXT2_ET_BAD_GENERIC_UNMARK (2133571390L) #define EXT2_ET_BAD_GENERIC_TEST (2133571391L) #define EXT2_ET_SYMLINK_LOOP (2133571392L) #define EXT2_ET_CALLBACK_NOTHANDLED (2133571393L) #define EXT2_ET_BAD_BLOCK_IN_INODE_TABLE (2133571394L) #define EXT2_ET_UNSUPP_FEATURE (2133571395L) #define EXT2_ET_RO_UNSUPP_FEATURE (2133571396L) #define EXT2_ET_LLSEEK_FAILED (2133571397L) #define EXT2_ET_NO_MEMORY (2133571398L) #define EXT2_ET_INVALID_ARGUMENT (2133571399L) #define EXT2_ET_BLOCK_ALLOC_FAIL (2133571400L) #define EXT2_ET_INODE_ALLOC_FAIL (2133571401L) #define EXT2_ET_NO_DIRECTORY (2133571402L) #define EXT2_ET_TOO_MANY_REFS (2133571403L) #define EXT2_ET_FILE_NOT_FOUND (2133571404L) #define EXT2_ET_FILE_RO (2133571405L) #define EXT2_ET_DB_NOT_FOUND (2133571406L) #define EXT2_ET_DIR_EXISTS (2133571407L) #define EXT2_ET_UNIMPLEMENTED (2133571408L) #define EXT2_ET_CANCEL_REQUESTED (2133571409L) #define EXT2_ET_FILE_TOO_BIG (2133571410L) #define EXT2_ET_JOURNAL_NOT_BLOCK (2133571411L) #define EXT2_ET_NO_JOURNAL_SB (2133571412L) #define EXT2_ET_JOURNAL_TOO_SMALL (2133571413L) #define EXT2_ET_JOURNAL_UNSUPP_VERSION (2133571414L) #define EXT2_ET_LOAD_EXT_JOURNAL (2133571415L) #define EXT2_ET_NO_JOURNAL (2133571416L) #define EXT2_ET_DIRHASH_UNSUPP (2133571417L) #define EXT2_ET_BAD_EA_BLOCK_NUM (2133571418L) #define EXT2_ET_TOO_MANY_INODES (2133571419L) #define EXT2_ET_NOT_IMAGE_FILE (2133571420L) #define EXT2_ET_RES_GDT_BLOCKS (2133571421L) #define EXT2_ET_RESIZE_INODE_CORRUPT (2133571422L) #define EXT2_ET_SET_BMAP_NO_IND (2133571423L) #define EXT2_ET_TDB_SUCCESS (2133571424L) #define EXT2_ET_TDB_ERR_CORRUPT (2133571425L) #define EXT2_ET_TDB_ERR_IO (2133571426L) #define EXT2_ET_TDB_ERR_LOCK (2133571427L) #define EXT2_ET_TDB_ERR_OOM (2133571428L) #define EXT2_ET_TDB_ERR_EXISTS (2133571429L) #define EXT2_ET_TDB_ERR_NOLOCK (2133571430L) #define EXT2_ET_TDB_ERR_EINVAL (2133571431L) #define EXT2_ET_TDB_ERR_NOEXIST (2133571432L) #define EXT2_ET_TDB_ERR_RDONLY (2133571433L) extern void initialize_ext2_error_table(void); #define ERROR_TABLE_BASE_ext2 (2133571328L) #define init_ext2_err_tbl initialize_ext2_error_table #define ext2_err_base ERROR_TABLE_BASE_ext2 #define ERROR_TABLE_BASE_ext2 (2133571328L) #define init_ext2_err_tbl initialize_ext2_error_table #define initialize_ext2_error_table initialize_ext2_error_table #define ext2_err_base ERROR_TABLE_BASE_ext2 # 90 "../lib/ext2fs/ext2fs.h" 2 # 98 "../lib/ext2fs/ext2fs.h" #define EXT2_QSORT_TYPE int typedef struct struct_ext2_filsys *ext2_filsys; struct ext2fs_struct_generic_bitmap { errcode_t magic; ext2_filsys fs; __u32 start, end; __u32 real_end; char * description; char * bitmap; errcode_t base_error_code; __u32 reserved[7]; }; #define EXT2FS_MARK_ERROR 0 #define EXT2FS_UNMARK_ERROR 1 #define EXT2FS_TEST_ERROR 2 typedef struct ext2fs_struct_generic_bitmap *ext2fs_generic_bitmap; typedef struct ext2fs_struct_generic_bitmap *ext2fs_inode_bitmap; typedef struct ext2fs_struct_generic_bitmap *ext2fs_block_bitmap; #define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s) typedef struct ext2_struct_u32_list *ext2_badblocks_list; typedef struct ext2_struct_u32_iterate *ext2_badblocks_iterate; typedef struct ext2_struct_u32_list *ext2_u32_list; typedef struct ext2_struct_u32_iterate *ext2_u32_iterate; typedef struct ext2_struct_u32_list *badblocks_list; typedef struct ext2_struct_u32_iterate *badblocks_iterate; #define BADBLOCKS_FLAG_DIRTY 1 struct ext2_db_entry { ext2_ino_t ino; blk_t blk; int blockcnt; }; typedef struct ext2_struct_dblist *ext2_dblist; #define DBLIST_ABORT 1 #define EXT2_FILE_WRITE 0x0001 #define EXT2_FILE_CREATE 0x0002 #define EXT2_FILE_MASK 0x00FF #define EXT2_FILE_BUF_DIRTY 0x4000 #define EXT2_FILE_BUF_VALID 0x2000 typedef struct ext2_file *ext2_file_t; #define EXT2_SEEK_SET 0 #define EXT2_SEEK_CUR 1 #define EXT2_SEEK_END 2 #define EXT2_FLAG_RW 0x01 #define EXT2_FLAG_CHANGED 0x02 #define EXT2_FLAG_DIRTY 0x04 #define EXT2_FLAG_VALID 0x08 #define EXT2_FLAG_IB_DIRTY 0x10 #define EXT2_FLAG_BB_DIRTY 0x20 #define EXT2_FLAG_SWAP_BYTES 0x40 #define EXT2_FLAG_SWAP_BYTES_READ 0x80 #define EXT2_FLAG_SWAP_BYTES_WRITE 0x100 #define EXT2_FLAG_MASTER_SB_ONLY 0x200 #define EXT2_FLAG_FORCE 0x400 #define EXT2_FLAG_SUPER_ONLY 0x800 #define EXT2_FLAG_JOURNAL_DEV_OK 0x1000 #define EXT2_FLAG_IMAGE_FILE 0x2000 #define EXT2_FLAG_EXCLUSIVE 0x4000 #define EXT2_FLAG_SOFTSUPP_FEATURES 0x8000 #define EXT2_NEW_INODE_FL 0x80000000 #define EXT2_MKJOURNAL_V1_SUPER 0x0000001 struct struct_ext2_filsys { errcode_t magic; io_channel io; int flags; char * device_name; struct ext2_super_block * super; unsigned int blocksize; int fragsize; dgrp_t group_desc_count; unsigned long desc_blocks; struct ext2_group_desc * group_desc; int inode_blocks_per_group; ext2fs_inode_bitmap inode_map; ext2fs_block_bitmap block_map; errcode_t (*get_blocks)(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks); errcode_t (*check_directory)(ext2_filsys fs, ext2_ino_t ino); errcode_t (*write_bitmaps)(ext2_filsys fs); errcode_t (*read_inode)(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode); errcode_t (*write_inode)(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode); ext2_badblocks_list badblocks; ext2_dblist dblist; __u32 stride; struct ext2_super_block * orig_super; struct ext2_image_hdr * image_header; __u32 umask; time_t now; __u32 reserved[7]; void * priv_data; struct ext2_inode_cache *icache; io_channel image_io; }; # 1 "../lib/ext2fs/bitops.h" 1 # 17 "../lib/ext2fs/bitops.h" extern int ext2fs_set_bit(unsigned int nr,void * addr); extern int ext2fs_clear_bit(unsigned int nr, void * addr); extern int ext2fs_test_bit(unsigned int nr, const void * addr); extern void ext2fs_fast_set_bit(unsigned int nr,void * addr); extern void ext2fs_fast_clear_bit(unsigned int nr, void * addr); extern __u16 ext2fs_swab16(__u16 val); extern __u32 ext2fs_swab32(__u32 val); extern __u64 ext2fs_swab64(__u64 val); # 38 "../lib/ext2fs/bitops.h" #define ext2fs_cpu_to_le64(x) ((__u64)(x)) #define ext2fs_le64_to_cpu(x) ((__u64)(x)) #define ext2fs_cpu_to_le32(x) ((__u32)(x)) #define ext2fs_le32_to_cpu(x) ((__u32)(x)) #define ext2fs_cpu_to_le16(x) ((__u16)(x)) #define ext2fs_le16_to_cpu(x) ((__u16)(x)) #define ext2fs_cpu_to_be32(x) ext2fs_swab32((x)) #define ext2fs_be32_to_cpu(x) ext2fs_swab32((x)) #define ext2fs_cpu_to_be16(x) ext2fs_swab16((x)) #define ext2fs_be16_to_cpu(x) ext2fs_swab16((x)) extern const char *ext2fs_block_string; extern const char *ext2fs_inode_string; extern const char *ext2fs_mark_string; extern const char *ext2fs_unmark_string; extern const char *ext2fs_test_string; extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg, const char *description); extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap, int code, unsigned long arg); extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); extern int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); extern int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); extern int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); extern int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); extern void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); extern void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); extern int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); extern void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); extern void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); extern int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); extern blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap); extern ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap); extern blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap); extern ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap); extern void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map); extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, __u32 bitno); extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, blk_t bitno); # 133 "../lib/ext2fs/bitops.h" #define _INLINE_ extern __inline__ # 144 "../lib/ext2fs/bitops.h" extern __inline__ void ext2fs_fast_set_bit(unsigned int nr,void * addr) { unsigned char *ADDR = (unsigned char *) addr; ADDR += nr >> 3; *ADDR |= (1 << (nr & 0x07)); } extern __inline__ void ext2fs_fast_clear_bit(unsigned int nr, void * addr) { unsigned char *ADDR = (unsigned char *) addr; ADDR += nr >> 3; *ADDR &= ~(1 << (nr & 0x07)); } #define _EXT2_HAVE_ASM_BITOPS_ #define _EXT2_HAVE_ASM_SWAB_ #define _EXT2_HAVE_ASM_FINDBIT_ # 179 "../lib/ext2fs/bitops.h" struct __dummy_h { unsigned long a[100]; }; #define EXT2FS_ADDR (*(struct __dummy_h *) addr) #define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr) extern __inline__ int ext2fs_set_bit(unsigned int nr, void * addr) { int oldbit; addr = (void *) (((unsigned char *) addr) + (nr >> 3)); __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit),"+m" ((*(struct __dummy_h *) addr)) :"r" (nr & 7)); return oldbit; } extern __inline__ int ext2fs_clear_bit(unsigned int nr, void * addr) { int oldbit; addr = (void *) (((unsigned char *) addr) + (nr >> 3)); __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit),"+m" ((*(struct __dummy_h *) addr)) :"r" (nr & 7)); return oldbit; } extern __inline__ int ext2fs_test_bit(unsigned int nr, const void * addr) { int oldbit; addr = (const void *) (((const unsigned char *) addr) + (nr >> 3)); __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0" :"=r" (oldbit) :"m" ((*(const struct __dummy_h *) addr)),"r" (nr & 7)); return oldbit; } # 271 "../lib/ext2fs/bitops.h" extern __inline__ __u32 ext2fs_swab32(__u32 val) { __asm__("xchgb %b0,%h0\n\t" "rorl $16,%0\n\t" "xchgb %b0,%h0" :"=q" (val) : "0" (val)); return val; } extern __inline__ __u16 ext2fs_swab16(__u16 val) { __asm__("xchgb %b0,%h0" : "=q" (val) : "0" (val)); return val; } extern __inline__ __u64 ext2fs_swab64(__u64 val) { return (ext2fs_swab32(val >> 32) | (((__u64)ext2fs_swab32(val & 0xFFFFFFFFUL)) << 32)); } #undef EXT2FS_ADDR # 404 "../lib/ext2fs/bitops.h" extern __inline__ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, blk_t bitno); extern __inline__ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, blk_t bitno) { if ((bitno < bitmap->start) || (bitno > bitmap->end)) { ext2fs_warn_bitmap2(bitmap, 2, bitno); return 0; } return ext2fs_test_bit(bitno - bitmap->start, bitmap->bitmap); } extern __inline__ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) { return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, block); } extern __inline__ int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) { return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, block); } extern __inline__ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) { return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, block); } extern __inline__ int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode) { return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode); } extern __inline__ int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode) { return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode); } extern __inline__ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode) { return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode); } extern __inline__ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) { ext2fs_fast_set_bit(block - bitmap->start, bitmap->bitmap); } extern __inline__ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) { ext2fs_fast_clear_bit(block - bitmap->start, bitmap->bitmap); } extern __inline__ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block) { return ext2fs_test_bit(block - bitmap->start, bitmap->bitmap); } extern __inline__ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode) { ext2fs_fast_set_bit(inode - bitmap->start, bitmap->bitmap); } extern __inline__ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode) { ext2fs_fast_clear_bit(inode - bitmap->start, bitmap->bitmap); } extern __inline__ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode) { return ext2fs_test_bit(inode - bitmap->start, bitmap->bitmap); } extern __inline__ blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap) { return bitmap->start; } extern __inline__ ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap) { return bitmap->start; } extern __inline__ blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap) { return bitmap->end; } extern __inline__ ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap) { return bitmap->end; } extern __inline__ int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) { int i; if ((block < bitmap->start) || (block+num-1 > bitmap->end)) { ext2fs_warn_bitmap((2133571375L), block, bitmap->description); return 0; } for (i=0; i < num; i++) { if (ext2fs_fast_test_block_bitmap(bitmap, block+i)) return 0; } return 1; } extern __inline__ int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) { int i; # 587 "../lib/ext2fs/bitops.h" for (i=0; i < num; i++) { if (ext2fs_fast_test_block_bitmap(bitmap, block+i)) return 0; } return 1; } extern __inline__ void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) { int i; if ((block < bitmap->start) || (block+num-1 > bitmap->end)) { ext2fs_warn_bitmap((2133571373L), block, bitmap->description); return; } for (i=0; i < num; i++) ext2fs_fast_set_bit(block + i - bitmap->start, bitmap->bitmap); } extern __inline__ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) { int i; # 620 "../lib/ext2fs/bitops.h" for (i=0; i < num; i++) ext2fs_fast_set_bit(block + i - bitmap->start, bitmap->bitmap); } extern __inline__ void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) { int i; if ((block < bitmap->start) || (block+num-1 > bitmap->end)) { ext2fs_warn_bitmap((2133571374L), block, bitmap->description); return; } for (i=0; i < num; i++) ext2fs_fast_clear_bit(block + i - bitmap->start, bitmap->bitmap); } extern __inline__ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num) { int i; # 651 "../lib/ext2fs/bitops.h" for (i=0; i < num; i++) ext2fs_fast_clear_bit(block + i - bitmap->start, bitmap->bitmap); } #undef _INLINE_ # 254 "../lib/ext2fs/ext2fs.h" 2 #define BLOCK_CHANGED 1 #define BLOCK_ABORT 2 #define BLOCK_ERROR 4 # 284 "../lib/ext2fs/ext2fs.h" #define BLOCK_FLAG_APPEND 1 #define BLOCK_FLAG_HOLE 1 #define BLOCK_FLAG_DEPTH_TRAVERSE 2 #define BLOCK_FLAG_DATA_ONLY 4 #define BLOCK_FLAG_NO_LARGE 0x1000 #define BLOCK_COUNT_IND (-1) #define BLOCK_COUNT_DIND (-2) #define BLOCK_COUNT_TIND (-3) #define BLOCK_COUNT_TRANSLATOR (-4) # 310 "../lib/ext2fs/ext2fs.h" #define EXT2_DIRBLOCK_V2_STRUCT 0x0001 #define DIRENT_CHANGED 1 #define DIRENT_ABORT 2 #define DIRENT_ERROR 3 #define DIRENT_FLAG_INCLUDE_EMPTY 1 #define DIRENT_FLAG_INCLUDE_REMOVED 2 #define DIRENT_DOT_FILE 1 #define DIRENT_DOT_DOT_FILE 2 #define DIRENT_OTHER_FILE 3 #define DIRENT_DELETED_FILE 4 typedef struct ext2_struct_inode_scan *ext2_inode_scan; #define EXT2_SF_CHK_BADBLOCKS 0x0001 #define EXT2_SF_BAD_INODE_BLK 0x0002 #define EXT2_SF_BAD_EXTRA_BYTES 0x0004 #define EXT2_SF_SKIP_MISSING_ITABLE 0x0008 #define EXT2_SF_DO_LAZY 0x0010 #define EXT2_MF_MOUNTED 1 #define EXT2_MF_ISROOT 2 #define EXT2_MF_READONLY 4 #define EXT2_MF_SWAP 8 #define EXT2_MF_BUSY 16 #define LINUX_S_IFMT 00170000 #define LINUX_S_IFSOCK 0140000 #define LINUX_S_IFLNK 0120000 #define LINUX_S_IFREG 0100000 #define LINUX_S_IFBLK 0060000 #define LINUX_S_IFDIR 0040000 #define LINUX_S_IFCHR 0020000 #define LINUX_S_IFIFO 0010000 #define LINUX_S_ISUID 0004000 #define LINUX_S_ISGID 0002000 #define LINUX_S_ISVTX 0001000 #define LINUX_S_IRWXU 00700 #define LINUX_S_IRUSR 00400 #define LINUX_S_IWUSR 00200 #define LINUX_S_IXUSR 00100 #define LINUX_S_IRWXG 00070 #define LINUX_S_IRGRP 00040 #define LINUX_S_IWGRP 00020 #define LINUX_S_IXGRP 00010 #define LINUX_S_IRWXO 00007 #define LINUX_S_IROTH 00004 #define LINUX_S_IWOTH 00002 #define LINUX_S_IXOTH 00001 #define LINUX_S_ISLNK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFLNK) #define LINUX_S_ISREG(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFREG) #define LINUX_S_ISDIR(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFDIR) #define LINUX_S_ISCHR(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFCHR) #define LINUX_S_ISBLK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFBLK) #define LINUX_S_ISFIFO(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFIFO) #define LINUX_S_ISSOCK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFSOCK) #define EXT2_I_SIZE(i) ((i)->i_size | ((__u64) (i)->i_size_high << 32)) #define EXT2_ICOUNT_OPT_INCREMENT 0x01 typedef struct ext2_icount *ext2_icount_t; #define BMAP_ALLOC 0x0001 #define BMAP_SET 0x0002 #define IMAGER_FLAG_INODEMAP 1 #define IMAGER_FLAG_SPARSEWRITE 2 #define EXT2_CHECK_MAGIC(struct,code) if ((struct)->magic != (code)) return (code) #define EXT2FS_COMPRESSED_BLKADDR ((blk_t) 0xffffffff) #define HOLE_BLKADDR(_b) ((_b) == 0 || (_b) == EXT2FS_COMPRESSED_BLKADDR) #define EXT2_LIB_FEATURE_COMPAT_SUPP (EXT2_FEATURE_COMPAT_DIR_PREALLOC| EXT2_FEATURE_COMPAT_IMAGIC_INODES| EXT3_FEATURE_COMPAT_HAS_JOURNAL| EXT2_FEATURE_COMPAT_RESIZE_INODE| EXT2_FEATURE_COMPAT_DIR_INDEX| EXT2_FEATURE_COMPAT_LAZY_BG| EXT2_FEATURE_COMPAT_EXT_ATTR) # 457 "../lib/ext2fs/ext2fs.h" #define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| EXT3_FEATURE_INCOMPAT_JOURNAL_DEV| EXT2_FEATURE_INCOMPAT_META_BG| EXT3_FEATURE_INCOMPAT_RECOVER) #define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| EXT2_FEATURE_RO_COMPAT_LARGE_FILE) #define EXT2_LIB_SOFTSUPP_INCOMPAT (EXT3_FEATURE_INCOMPAT_EXTENTS) #define EXT2_LIB_SOFTSUPP_RO_COMPAT (EXT4_FEATURE_RO_COMPAT_HUGE_FILE| EXT4_FEATURE_RO_COMPAT_GDT_CSUM| EXT4_FEATURE_RO_COMPAT_DIR_NLINK| EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE) # 480 "../lib/ext2fs/ext2fs.h" extern errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir, int mode, ext2fs_inode_bitmap map, ext2_ino_t *ret); extern errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal, ext2fs_block_bitmap map, blk_t *ret); extern errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start, blk_t finish, int num, ext2fs_block_bitmap map, blk_t *ret); extern errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal, char *block_buf, blk_t *ret); extern int ext2fs_reserve_super_and_bgd(ext2_filsys fs, dgrp_t group, ext2fs_block_bitmap bmap); void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse); void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino, int inuse, int isdir); void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse); extern errcode_t ext2fs_allocate_tables(ext2_filsys fs); extern errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, ext2fs_block_bitmap bmap); extern errcode_t ext2fs_u32_list_create(ext2_u32_list *ret, int size); extern errcode_t ext2fs_u32_list_add(ext2_u32_list bb, __u32 blk); extern int ext2fs_u32_list_find(ext2_u32_list bb, __u32 blk); extern int ext2fs_u32_list_test(ext2_u32_list bb, blk_t blk); extern errcode_t ext2fs_u32_list_iterate_begin(ext2_u32_list bb, ext2_u32_iterate *ret); extern int ext2fs_u32_list_iterate(ext2_u32_iterate iter, blk_t *blk); extern void ext2fs_u32_list_iterate_end(ext2_u32_iterate iter); extern errcode_t ext2fs_u32_copy(ext2_u32_list src, ext2_u32_list *dest); extern int ext2fs_u32_list_equal(ext2_u32_list bb1, ext2_u32_list bb2); extern errcode_t ext2fs_badblocks_list_create(ext2_badblocks_list *ret, int size); extern errcode_t ext2fs_badblocks_list_add(ext2_badblocks_list bb, blk_t blk); extern int ext2fs_badblocks_list_test(ext2_badblocks_list bb, blk_t blk); extern int ext2fs_u32_list_del(ext2_u32_list bb, __u32 blk); extern void ext2fs_badblocks_list_del(ext2_u32_list bb, __u32 blk); extern errcode_t ext2fs_badblocks_list_iterate_begin(ext2_badblocks_list bb, ext2_badblocks_iterate *ret); extern int ext2fs_badblocks_list_iterate(ext2_badblocks_iterate iter, blk_t *blk); extern void ext2fs_badblocks_list_iterate_end(ext2_badblocks_iterate iter); extern errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src, ext2_badblocks_list *dest); extern int ext2fs_badblocks_equal(ext2_badblocks_list bb1, ext2_badblocks_list bb2); extern int ext2fs_u32_list_count(ext2_u32_list bb); extern errcode_t badblocks_list_create(badblocks_list *ret, int size); extern errcode_t badblocks_list_add(badblocks_list bb, blk_t blk); extern int badblocks_list_test(badblocks_list bb, blk_t blk); extern errcode_t badblocks_list_iterate_begin(badblocks_list bb, badblocks_iterate *ret); extern int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk); extern void badblocks_list_iterate_end(badblocks_iterate iter); extern void badblocks_list_free(badblocks_list bb); extern errcode_t ext2fs_update_bb_inode(ext2_filsys fs, ext2_badblocks_list bb_list); extern errcode_t ext2fs_write_inode_bitmap(ext2_filsys fs); extern errcode_t ext2fs_write_block_bitmap (ext2_filsys fs); extern errcode_t ext2fs_read_inode_bitmap (ext2_filsys fs); extern errcode_t ext2fs_read_block_bitmap(ext2_filsys fs); extern errcode_t ext2fs_allocate_generic_bitmap(__u32 start, __u32 end, __u32 real_end, const char *descr, ext2fs_generic_bitmap *ret); extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs, const char *descr, ext2fs_block_bitmap *ret); extern errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs, const char *descr, ext2fs_inode_bitmap *ret); extern errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap, ext2_ino_t end, ext2_ino_t *oend); extern errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap, blk_t end, blk_t *oend); extern void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap); extern void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap); extern errcode_t ext2fs_read_bitmaps(ext2_filsys fs); extern errcode_t ext2fs_write_bitmaps(ext2_filsys fs); extern errcode_t ext2fs_block_iterate(ext2_filsys fs, ext2_ino_t ino, int flags, char *block_buf, int (*func)(ext2_filsys fs, blk_t *blocknr, int blockcnt, void *priv_data), void *priv_data); errcode_t ext2fs_block_iterate2(ext2_filsys fs, ext2_ino_t ino, int flags, char *block_buf, int (*func)(ext2_filsys fs, blk_t *blocknr, e2_blkcnt_t blockcnt, blk_t ref_blk, int ref_offset, void *priv_data), void *priv_data); extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode, char *block_buf, int bmap_flags, blk_t block, blk_t *phys_blk); # 616 "../lib/ext2fs/ext2fs.h" extern errcode_t ext2fs_check_desc(ext2_filsys fs); extern errcode_t ext2fs_close(ext2_filsys fs); extern errcode_t ext2fs_flush(ext2_filsys fs); extern int ext2fs_bg_has_super(ext2_filsys fs, int group_block); extern int ext2fs_super_and_bgd_loc(ext2_filsys fs, dgrp_t group, blk_t *ret_super_blk, blk_t *ret_old_desc_blk, blk_t *ret_new_desc_blk, int *ret_meta_bg); extern void ext2fs_update_dynamic_rev(ext2_filsys fs); extern errcode_t ext2fs_compare_block_bitmap(ext2fs_block_bitmap bm1, ext2fs_block_bitmap bm2); extern errcode_t ext2fs_compare_inode_bitmap(ext2fs_inode_bitmap bm1, ext2fs_inode_bitmap bm2); extern errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs); extern errcode_t ext2fs_init_dblist(ext2_filsys fs, ext2_dblist *ret_dblist); extern errcode_t ext2fs_add_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk, int blockcnt); extern void ext2fs_dblist_sort(ext2_dblist dblist, int (*sortfunc)(const void *, const void *)); extern errcode_t ext2fs_dblist_iterate(ext2_dblist dblist, int (*func)(ext2_filsys fs, struct ext2_db_entry *db_info, void *priv_data), void *priv_data); extern errcode_t ext2fs_set_dir_block(ext2_dblist dblist, ext2_ino_t ino, blk_t blk, int blockcnt); extern errcode_t ext2fs_copy_dblist(ext2_dblist src, ext2_dblist *dest); extern int ext2fs_dblist_count(ext2_dblist dblist); extern errcode_t ext2fs_dblist_dir_iterate(ext2_dblist dblist, int flags, char *block_buf, int (*func)(ext2_ino_t dir, int entry, struct ext2_dir_entry *dirent, int offset, int blocksize, char *buf, void *priv_data), void *priv_data); extern errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block, void *buf); extern errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block, void *buf, int flags); extern errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block, void *buf); extern errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block, void *buf, int flags); extern errcode_t ext2fs_dirhash(int version, const char *name, int len, const __u32 *seed, ext2_dirhash_t *ret_hash, ext2_dirhash_t *ret_minor_hash); extern errcode_t ext2fs_dir_iterate(ext2_filsys fs, ext2_ino_t dir, int flags, char *block_buf, int (*func)(struct ext2_dir_entry *dirent, int offset, int blocksize, char *buf, void *priv_data), void *priv_data); extern errcode_t ext2fs_dir_iterate2(ext2_filsys fs, ext2_ino_t dir, int flags, char *block_buf, int (*func)(ext2_ino_t dir, int entry, struct ext2_dir_entry *dirent, int offset, int blocksize, char *buf, void *priv_data), void *priv_data); extern errcode_t ext2fs_dup_handle(ext2_filsys src, ext2_filsys *dest); extern errcode_t ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir); extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf); extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *buf); extern errcode_t ext2fs_adjust_ea_refcount(ext2_filsys fs, blk_t blk, char *block_buf, int adjust, __u32 *newcount); extern errcode_t ext2fs_file_open2(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode, int flags, ext2_file_t *ret); extern errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino, int flags, ext2_file_t *ret); extern ext2_filsys ext2fs_file_get_fs(ext2_file_t file); extern errcode_t ext2fs_file_close(ext2_file_t file); extern errcode_t ext2fs_file_flush(ext2_file_t file); extern errcode_t ext2fs_file_read(ext2_file_t file, void *buf, unsigned int wanted, unsigned int *got); extern errcode_t ext2fs_file_write(ext2_file_t file, const void *buf, unsigned int nbytes, unsigned int *written); extern errcode_t ext2fs_file_llseek(ext2_file_t file, __u64 offset, int whence, __u64 *ret_pos); extern errcode_t ext2fs_file_lseek(ext2_file_t file, ext2_off_t offset, int whence, ext2_off_t *ret_pos); errcode_t ext2fs_file_get_lsize(ext2_file_t file, __u64 *ret_size); extern ext2_off_t ext2fs_file_get_size(ext2_file_t file); extern errcode_t ext2fs_file_set_size(ext2_file_t file, ext2_off_t size); extern char *ext2fs_find_block_device(dev_t device); extern errcode_t ext2fs_sync_device(int fd, int flushb); extern void ext2fs_free(ext2_filsys fs); extern void ext2fs_free_generic_bitmap(ext2fs_inode_bitmap bitmap); extern void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap); extern void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap); extern void ext2fs_free_dblist(ext2_dblist dblist); extern void ext2fs_badblocks_list_free(ext2_badblocks_list bb); extern void ext2fs_u32_list_free(ext2_u32_list bb); extern errcode_t ext2fs_get_device_size(const char *file, int blocksize, blk_t *retblocks); errcode_t ext2fs_get_device_sectsize(const char *file, int *sectsize); extern errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags); extern errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, int flags); extern errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, int flags); extern errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd, int flags); extern errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags); extern errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags); errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf); errcode_t ext2fs_write_ind_block(ext2_filsys fs, blk_t blk, void *buf); extern errcode_t ext2fs_initialize(const char *name, int flags, struct ext2_super_block *param, io_manager manager, ext2_filsys *ret_fs); extern void ext2fs_free_icount(ext2_icount_t icount); extern errcode_t ext2fs_create_icount_tdb(ext2_filsys fs, char *tdb_dir, int flags, ext2_icount_t *ret); extern errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, unsigned int size, ext2_icount_t hint, ext2_icount_t *ret); extern errcode_t ext2fs_create_icount(ext2_filsys fs, int flags, unsigned int size, ext2_icount_t *ret); extern errcode_t ext2fs_icount_fetch(ext2_icount_t icount, ext2_ino_t ino, __u16 *ret); extern errcode_t ext2fs_icount_increment(ext2_icount_t icount, ext2_ino_t ino, __u16 *ret); extern errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ext2_ino_t ino, __u16 *ret); extern errcode_t ext2fs_icount_store(ext2_icount_t icount, ext2_ino_t ino, __u16 count); extern ext2_ino_t ext2fs_get_icount_size(ext2_icount_t icount); errcode_t ext2fs_icount_validate(ext2_icount_t icount, FILE *); extern errcode_t ext2fs_flush_icache(ext2_filsys fs); extern errcode_t ext2fs_get_next_inode_full(ext2_inode_scan scan, ext2_ino_t *ino, struct ext2_inode *inode, int bufsize); extern errcode_t ext2fs_open_inode_scan(ext2_filsys fs, int buffer_blocks, ext2_inode_scan *ret_scan); extern void ext2fs_close_inode_scan(ext2_inode_scan scan); extern errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ext2_ino_t *ino, struct ext2_inode *inode); extern errcode_t ext2fs_inode_scan_goto_blockgroup(ext2_inode_scan scan, int group); extern void ext2fs_set_inode_callback (ext2_inode_scan scan, errcode_t (*done_group)(ext2_filsys fs, ext2_inode_scan scan, dgrp_t group, void * priv_data), void *done_group_data); extern int ext2fs_inode_scan_flags(ext2_inode_scan scan, int set_flags, int clear_flags); extern errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode, int bufsize); extern errcode_t ext2fs_read_inode (ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode); extern errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode, int bufsize); extern errcode_t ext2fs_write_inode(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode); extern errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode * inode); extern errcode_t ext2fs_get_blocks(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks); extern errcode_t ext2fs_check_directory(ext2_filsys fs, ext2_ino_t ino); extern io_manager inode_io_manager; extern errcode_t ext2fs_inode_io_intern(ext2_filsys fs, ext2_ino_t ino, char **name); extern errcode_t ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino, struct ext2_inode *inode, char **name); extern errcode_t ext2fs_check_if_mounted(const char *file, int *mount_flags); extern errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags, char *mtpt, int mtlen); extern errcode_t ext2fs_lookup(ext2_filsys fs, ext2_ino_t dir, const char *name, int namelen, char *buf, ext2_ino_t *inode); extern errcode_t ext2fs_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, const char *name, ext2_ino_t *inode); errcode_t ext2fs_namei_follow(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, const char *name, ext2_ino_t *inode); extern errcode_t ext2fs_follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, ext2_ino_t inode, ext2_ino_t *res_inode); int ext2fs_native_flag(void); extern errcode_t ext2fs_new_dir_block(ext2_filsys fs, ext2_ino_t dir_ino, ext2_ino_t parent_ino, char **block); extern errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum, const char *name); extern errcode_t ext2fs_create_journal_superblock(ext2_filsys fs, __u32 size, int flags, char **ret_jsb); extern errcode_t ext2fs_add_journal_device(ext2_filsys fs, ext2_filsys journal_dev); extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t size, int flags); extern int ext2fs_default_journal_size(__u64 blocks); extern errcode_t ext2fs_open(const char *name, int flags, int superblock, unsigned int block_size, io_manager manager, ext2_filsys *ret_fs); extern errcode_t ext2fs_open2(const char *name, const char *io_options, int flags, int superblock, unsigned int block_size, io_manager manager, ext2_filsys *ret_fs); extern blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block, dgrp_t i); errcode_t ext2fs_get_data_io(ext2_filsys fs, io_channel *old_io); errcode_t ext2fs_set_data_io(ext2_filsys fs, io_channel new_io); errcode_t ext2fs_rewrite_to_io(ext2_filsys fs, io_channel new_io); extern errcode_t ext2fs_get_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino, char **name); errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name, ext2_ino_t ino, int flags); errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir, const char *name, ext2_ino_t ino, int flags); extern errcode_t ext2fs_read_bb_inode(ext2_filsys fs, ext2_badblocks_list *bb_list); extern errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f, ext2_badblocks_list *bb_list, void *priv_data, void (*invalid)(ext2_filsys fs, blk_t blk, char *badstr, void *priv_data)); extern errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f, ext2_badblocks_list *bb_list, void (*invalid)(ext2_filsys fs, blk_t blk)); extern errcode_t ext2fs_create_resize_inode(ext2_filsys fs); extern errcode_t ext2fs_resize_generic_bitmap(__u32 new_end, __u32 new_real_end, ext2fs_generic_bitmap bmap); extern errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 new_real_end, ext2fs_inode_bitmap bmap); extern errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end, ext2fs_block_bitmap bmap); extern errcode_t ext2fs_copy_bitmap(ext2fs_generic_bitmap src, ext2fs_generic_bitmap *dest); extern void ext2fs_swap_ext_attr(char *to, char *from, int bufsize, int has_header); extern void ext2fs_swap_super(struct ext2_super_block * super); extern void ext2fs_swap_group_desc(struct ext2_group_desc *gdp); extern void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t, struct ext2_inode_large *f, int hostorder, int bufsize); extern void ext2fs_swap_inode(ext2_filsys fs,struct ext2_inode *t, struct ext2_inode *f, int hostorder); extern int ext2fs_inode_has_valid_blocks(struct ext2_inode *inode); extern int ext2fs_parse_version_string(const char *ver_string); extern int ext2fs_get_library_version(const char **ver_string, const char **date_string); extern errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list, unsigned int flags, FILE *f); extern errcode_t ext2fs_get_mem(unsigned long size, void *ptr); extern errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr); extern errcode_t ext2fs_free_mem(void *ptr); extern errcode_t ext2fs_resize_mem(unsigned long old_size, unsigned long size, void *ptr); extern void ext2fs_mark_super_dirty(ext2_filsys fs); extern void ext2fs_mark_changed(ext2_filsys fs); extern int ext2fs_test_changed(ext2_filsys fs); extern void ext2fs_mark_valid(ext2_filsys fs); extern void ext2fs_unmark_valid(ext2_filsys fs); extern int ext2fs_test_valid(ext2_filsys fs); extern void ext2fs_mark_ib_dirty(ext2_filsys fs); extern void ext2fs_mark_bb_dirty(ext2_filsys fs); extern int ext2fs_test_ib_dirty(ext2_filsys fs); extern int ext2fs_test_bb_dirty(ext2_filsys fs); extern int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk); extern int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino); extern blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group); extern blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group); extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs, struct ext2_inode *inode); extern unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b); # 1001 "../lib/ext2fs/ext2fs.h" #define _INLINE_ extern __inline__ # 1012 "../lib/ext2fs/ext2fs.h" extern __inline__ errcode_t ext2fs_get_mem(unsigned long size, void *ptr) { void *pp; pp = malloc(size); if (!pp) return (2133571398L); memcpy(ptr, &pp, sizeof (pp)); return 0; } extern __inline__ errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr) { if (count && (-1UL)/countflags |= 0x04 | 0x02; } extern __inline__ void ext2fs_mark_changed(ext2_filsys fs) { fs->flags |= 0x02; } extern __inline__ int ext2fs_test_changed(ext2_filsys fs) { return (fs->flags & 0x02); } extern __inline__ void ext2fs_mark_valid(ext2_filsys fs) { fs->flags |= 0x08; } extern __inline__ void ext2fs_unmark_valid(ext2_filsys fs) { fs->flags &= ~0x08; } extern __inline__ int ext2fs_test_valid(ext2_filsys fs) { return (fs->flags & 0x08); } extern __inline__ void ext2fs_mark_ib_dirty(ext2_filsys fs) { fs->flags |= 0x10 | 0x02; } extern __inline__ void ext2fs_mark_bb_dirty(ext2_filsys fs) { fs->flags |= 0x20 | 0x02; } extern __inline__ int ext2fs_test_ib_dirty(ext2_filsys fs) { return (fs->flags & 0x10); } extern __inline__ int ext2fs_test_bb_dirty(ext2_filsys fs) { return (fs->flags & 0x20); } extern __inline__ int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk) { return (blk - fs->super->s_first_data_block) / fs->super->s_blocks_per_group; } extern __inline__ int ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino) { return (ino - 1) / fs->super->s_inodes_per_group; } extern __inline__ blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group) { return fs->super->s_first_data_block + (group * fs->super->s_blocks_per_group); } extern __inline__ blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group) { return (group == fs->group_desc_count - 1 ? fs->super->s_blocks_count - 1 : ext2fs_group_first_block(fs, group) + (fs->super->s_blocks_per_group - 1)); } extern __inline__ blk_t ext2fs_inode_data_blocks(ext2_filsys fs, struct ext2_inode *inode) { return inode->i_blocks - (inode->i_file_acl ? fs->blocksize >> 9 : 0); } extern __inline__ unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b) { if (!a) return 0; return ((a - 1) / b) + 1; } #undef _INLINE_ # 36 "e2fsck.h" 2 # 1 "../lib/blkid/blkid.h" 1 # 14 "../lib/blkid/blkid.h" #define _BLKID_BLKID_H # 1 "../lib/blkid/blkid_types.h" 1 # 18 "../lib/blkid/blkid.h" 2 #define BLKID_VERSION "1.0.0" #define BLKID_DATE "12-Feb-2003" typedef struct blkid_struct_dev *blkid_dev; typedef struct blkid_struct_cache *blkid_cache; typedef __s64 blkid_loff_t; typedef struct blkid_struct_tag_iterate *blkid_tag_iterate; typedef struct blkid_struct_dev_iterate *blkid_dev_iterate; # 45 "../lib/blkid/blkid.h" #define BLKID_DEV_FIND 0x0000 #define BLKID_DEV_CREATE 0x0001 #define BLKID_DEV_VERIFY 0x0002 #define BLKID_DEV_NORMAL (BLKID_DEV_CREATE | BLKID_DEV_VERIFY) extern void blkid_put_cache(blkid_cache cache); extern int blkid_get_cache(blkid_cache *cache, const char *filename); extern void blkid_gc_cache(blkid_cache cache); extern const char *blkid_dev_devname(blkid_dev dev); extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache); extern int blkid_dev_set_search(blkid_dev_iterate iter, char *search_type, char *search_value); extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev); extern void blkid_dev_iterate_end(blkid_dev_iterate iterate); extern char *blkid_devno_to_devname(dev_t devno); extern int blkid_probe_all(blkid_cache cache); extern int blkid_probe_all_new(blkid_cache cache); extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags); extern blkid_loff_t blkid_get_dev_size(int fd); int blkid_known_fstype(const char *fstype); extern blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev); extern char *blkid_get_tag_value(blkid_cache cache, const char *tagname, const char *devname); extern char *blkid_get_devname(blkid_cache cache, const char *token, const char *value); extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev); extern int blkid_tag_next(blkid_tag_iterate iterate, const char **type, const char **value); extern void blkid_tag_iterate_end(blkid_tag_iterate iterate); extern int blkid_dev_has_tag(blkid_dev dev, const char *type, const char *value); extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache, const char *type, const char *value); extern int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val); extern int blkid_parse_version_string(const char *ver_string); extern int blkid_get_library_version(const char **ver_string, const char **date_string); # 37 "e2fsck.h" 2 # 1 "profile.h" 1 # 40 "profile.h" #define _PROFILE_H typedef struct _profile_t *profile_t; typedef void (*profile_syntax_err_cb_t)(const char *file, long err, int line_num); #define PROFILE_ITER_LIST_SECTION 0x0001 #define PROFILE_ITER_SECTIONS_ONLY 0x0002 #define PROFILE_ITER_RELATIONS_ONLY 0x0004 long profile_init (const char * *files, profile_t *ret_profile); void profile_release (profile_t profile); long profile_set_default (profile_t profile, const char *def_string); long profile_get_string (profile_t profile, const char *name, const char *subname, const char *subsubname, const char *def_val, char **ret_string); long profile_get_integer (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); long profile_get_uint (profile_t profile, const char *name, const char *subname, const char *subsubname, unsigned int def_val, unsigned int *ret_int); long profile_get_boolean (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); long profile_iterator_create (profile_t profile, const char *const *names, int flags, void **ret_iter); void profile_iterator_free (void **iter_p); long profile_iterator (void **iter_p, char **ret_name, char **ret_value); profile_syntax_err_cb_t profile_set_syntax_err_cb(profile_syntax_err_cb_t hook); # 40 "e2fsck.h" 2 # 1 "prof_err.h" 1 #define PROF_VERSION (-1429577728L) #define PROF_MAGIC_NODE (-1429577727L) #define PROF_NO_SECTION (-1429577726L) #define PROF_NO_RELATION (-1429577725L) #define PROF_ADD_NOT_SECTION (-1429577724L) #define PROF_SECTION_WITH_VALUE (-1429577723L) #define PROF_BAD_LINK_LIST (-1429577722L) #define PROF_BAD_GROUP_LVL (-1429577721L) #define PROF_BAD_PARENT_PTR (-1429577720L) #define PROF_MAGIC_ITERATOR (-1429577719L) #define PROF_SET_SECTION_VALUE (-1429577718L) #define PROF_EINVAL (-1429577717L) #define PROF_READ_ONLY (-1429577716L) #define PROF_SECTION_NOTOP (-1429577715L) #define PROF_SECTION_SYNTAX (-1429577714L) #define PROF_RELATION_SYNTAX (-1429577713L) #define PROF_EXTRA_CBRACE (-1429577712L) #define PROF_MISSING_OBRACE (-1429577711L) #define PROF_MAGIC_PROFILE (-1429577710L) #define PROF_MAGIC_SECTION (-1429577709L) #define PROF_TOPSECTION_ITER_NOSUPP (-1429577708L) #define PROF_INVALID_SECTION (-1429577707L) #define PROF_END_OF_SECTIONS (-1429577706L) #define PROF_BAD_NAMESET (-1429577705L) #define PROF_NO_PROFILE (-1429577704L) #define PROF_MAGIC_FILE (-1429577703L) #define PROF_FAIL_OPEN (-1429577702L) #define PROF_EXISTS (-1429577701L) #define PROF_BAD_BOOLEAN (-1429577700L) #define PROF_BAD_INTEGER (-1429577699L) #define PROF_MAGIC_FILE_DATA (-1429577698L) extern void initialize_prof_error_table(void); #define ERROR_TABLE_BASE_prof (-1429577728L) #define init_prof_err_tbl initialize_prof_error_table #define prof_err_base ERROR_TABLE_BASE_prof #define ERROR_TABLE_BASE_prof (-1429577728L) #define init_prof_err_tbl initialize_prof_error_table #define initialize_prof_error_table initialize_prof_error_table #define prof_err_base ERROR_TABLE_BASE_prof # 41 "e2fsck.h" 2 # 1 "/usr/include/libintl.h" 1 3 4 # 22 "/usr/include/libintl.h" 3 4 #define _LIBINTL_H 1 #define __USE_GNU_GETTEXT 1 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 1 : -1) extern char *gettext (__const char *__msgid) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))); extern char *dgettext (__const char *__domainname, __const char *__msgid) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *__dgettext (__const char *__domainname, __const char *__msgid) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *dcgettext (__const char *__domainname, __const char *__msgid, int __category) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *__dcgettext (__const char *__domainname, __const char *__msgid, int __category) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))); extern char *ngettext (__const char *__msgid1, __const char *__msgid2, unsigned long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); extern char *dngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *dcngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n, int __category) __attribute__ ((__nothrow__)) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *textdomain (__const char *__domainname) __attribute__ ((__nothrow__)); extern char *bindtextdomain (__const char *__domainname, __const char *__dirname) __attribute__ ((__nothrow__)); extern char *bind_textdomain_codeset (__const char *__domainname, __const char *__codeset) __attribute__ ((__nothrow__)); #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 163 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 102 "/usr/include/libintl.h" 2 3 4 # 1 "/usr/include/locale.h" 1 3 4 # 24 "/usr/include/locale.h" 3 4 #define _LOCALE_H 1 #define __need_NULL # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 163 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_ptrdiff_t # 236 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_size_t # 345 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef __need_wchar_t # 398 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 #undef NULL #define NULL ((void *)0) #undef __need_NULL #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) # 30 "/usr/include/locale.h" 2 3 4 # 1 "/usr/include/bits/locale.h" 1 3 4 # 25 "/usr/include/bits/locale.h" 3 4 #define _BITS_LOCALE_H 1 enum { __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE = 3, __LC_MONETARY = 4, __LC_MESSAGES = 5, __LC_ALL = 6, __LC_PAPER = 7, __LC_NAME = 8, __LC_ADDRESS = 9, __LC_TELEPHONE = 10, __LC_MEASUREMENT = 11, __LC_IDENTIFICATION = 12 }; # 31 "/usr/include/locale.h" 2 3 4 #define LC_CTYPE __LC_CTYPE #define LC_NUMERIC __LC_NUMERIC #define LC_TIME __LC_TIME #define LC_COLLATE __LC_COLLATE #define LC_MONETARY __LC_MONETARY #define LC_MESSAGES __LC_MESSAGES #define LC_ALL __LC_ALL #define LC_PAPER __LC_PAPER #define LC_NAME __LC_NAME #define LC_ADDRESS __LC_ADDRESS #define LC_TELEPHONE __LC_TELEPHONE #define LC_MEASUREMENT __LC_MEASUREMENT #define LC_IDENTIFICATION __LC_IDENTIFICATION struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; # 114 "/usr/include/locale.h" 3 4 char __int_p_cs_precedes; char __int_p_sep_by_space; char __int_n_cs_precedes; char __int_n_sep_by_space; char __int_p_sign_posn; char __int_n_sign_posn; }; extern char *setlocale (int __category, __const char *__locale) __attribute__ ((__nothrow__)); extern struct lconv *localeconv (void) __attribute__ ((__nothrow__)); # 208 "/usr/include/locale.h" 3 4 # 105 "/usr/include/libintl.h" 2 3 4 #define gettext(msgid) dgettext (NULL, msgid) #define dgettext(domainname,msgid) dcgettext (domainname, msgid, LC_MESSAGES) #define ngettext(msgid1,msgid2,n) dngettext (NULL, msgid1, msgid2, n) #define dngettext(domainname,msgid1,msgid2,n) dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES) # 44 "e2fsck.h" 2 #define _(a) (gettext (a)) #define N_(a) (a) #define P_(singular,plural,n) (ngettext (singular, plural, n)) #define NLS_CAT_NAME "e2fsprogs" # 67 "e2fsck.h" #define FSCK_OK 0 #define FSCK_NONDESTRUCT 1 #define FSCK_REBOOT 2 #define FSCK_UNCORRECTED 4 #define FSCK_ERROR 8 #define FSCK_USAGE 16 #define FSCK_CANCELED 32 #define FSCK_LIBRARY 128 #define E2FSCK_CURRENT_REV 1 struct dir_info { ext2_ino_t ino; ext2_ino_t dotdot; ext2_ino_t parent; }; struct dx_dir_info { ext2_ino_t ino; int numblocks; int hashversion; short depth; struct dx_dirblock_info *dx_block; }; #define DX_DIRBLOCK_ROOT 1 #define DX_DIRBLOCK_LEAF 2 #define DX_DIRBLOCK_NODE 3 #define DX_DIRBLOCK_CORRUPT 4 #define DX_DIRBLOCK_CLEARED 8 struct dx_dirblock_info { int type; blk_t phys; int flags; blk_t parent; ext2_dirhash_t min_hash; ext2_dirhash_t max_hash; ext2_dirhash_t node_min_hash; ext2_dirhash_t node_max_hash; }; #define DX_FLAG_REFERENCED 1 #define DX_FLAG_DUP_REF 2 #define DX_FLAG_FIRST 4 #define DX_FLAG_LAST 8 struct resource_track { struct timeval time_start; struct timeval user_start; struct timeval system_start; void *brk_start; }; #define E2F_OPT_READONLY 0x0001 #define E2F_OPT_PREEN 0x0002 #define E2F_OPT_YES 0x0004 #define E2F_OPT_NO 0x0008 #define E2F_OPT_TIME 0x0010 #define E2F_OPT_TIME2 0x0020 #define E2F_OPT_CHECKBLOCKS 0x0040 #define E2F_OPT_DEBUG 0x0080 #define E2F_OPT_FORCE 0x0100 #define E2F_OPT_WRITECHECK 0x0200 #define E2F_OPT_COMPRESS_DIRS 0x0400 #define E2F_FLAG_ABORT 0x0001 #define E2F_FLAG_CANCEL 0x0002 #define E2F_FLAG_SIGNAL_MASK 0x0003 #define E2F_FLAG_RESTART 0x0004 #define E2F_FLAG_SETJMP_OK 0x0010 #define E2F_FLAG_PROG_BAR 0x0020 #define E2F_FLAG_PROG_SUPPRESS 0x0040 #define E2F_FLAG_JOURNAL_INODE 0x0080 #define E2F_FLAG_SB_SPECIFIED 0x0100 #define E2F_FLAG_RESTARTED 0x0200 #define E2F_FLAG_RESIZE_INODE 0x0400 #define E2F_FLAG_GOT_DEVSIZE 0x0800 #define E2F_PASS_1 1 #define E2F_PASS_2 2 #define E2F_PASS_3 3 #define E2F_PASS_4 4 #define E2F_PASS_5 5 #define E2F_PASS_1B 6 typedef struct ea_refcount *ext2_refcount_t; typedef struct e2fsck_struct *e2fsck_t; struct e2fsck_struct { ext2_filsys fs; const char *program_name; char *filesystem_name; char *device_name; char *io_options; int flags; int options; blk_t use_superblock; blk_t superblock; int blocksize; blk_t num_blocks; int mount_flags; blkid_cache blkid; jmp_buf abort_loc; unsigned long abort_code; int (*progress)(e2fsck_t ctx, int pass, unsigned long cur, unsigned long max); ext2fs_inode_bitmap inode_used_map; ext2fs_inode_bitmap inode_bad_map; ext2fs_inode_bitmap inode_dir_map; ext2fs_inode_bitmap inode_bb_map; ext2fs_inode_bitmap inode_imagic_map; ext2fs_inode_bitmap inode_reg_map; ext2fs_block_bitmap block_found_map; ext2fs_block_bitmap block_dup_map; ext2fs_block_bitmap block_ea_map; ext2_icount_t inode_count; ext2_icount_t inode_link_info; ext2_refcount_t refcount; ext2_refcount_t refcount_extra; int *invalid_inode_bitmap_flag; int *invalid_block_bitmap_flag; int *invalid_inode_table_flag; int invalid_bitmaps; char *block_buf; ext2_ino_t stashed_ino; struct ext2_inode *stashed_inode; ext2_ino_t lost_and_found; int bad_lost_and_found; struct dir_info_db *dir_info; int dx_dir_info_count; int dx_dir_info_size; struct dx_dir_info *dx_dir_info; ext2_u32_list dirs_to_hash; int process_inode_size; int inode_buffer_blocks; io_channel journal_io; char *journal_name; struct resource_track global_rtrack; int progress_fd; int progress_pos; int progress_last_percent; unsigned int progress_last_time; int interactive; char start_meta[2], stop_meta[2]; __u32 fs_directory_count; __u32 fs_regular_count; __u32 fs_blockdev_count; __u32 fs_chardev_count; __u32 fs_links_count; __u32 fs_symlinks_count; __u32 fs_fast_symlinks_count; __u32 fs_fifo_count; __u32 fs_total_count; __u32 fs_badblocks_count; __u32 fs_sockets_count; __u32 fs_ind_count; __u32 fs_dind_count; __u32 fs_tind_count; __u32 fs_fragmented; __u32 large_files; __u32 fs_ext_attr_inodes; __u32 fs_ext_attr_blocks; time_t now; time_t time_fudge; int ext_attr_ver; profile_t profile; int blocks_per_page; void *priv_data; }; typedef __u32 region_addr_t; typedef struct region_struct *region_t; # 357 "e2fsck.h" extern void e2fsck_pass1(e2fsck_t ctx); extern void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf); extern void e2fsck_pass2(e2fsck_t ctx); extern void e2fsck_pass3(e2fsck_t ctx); extern void e2fsck_pass4(e2fsck_t ctx); extern void e2fsck_pass5(e2fsck_t ctx); extern errcode_t e2fsck_allocate_context(e2fsck_t *ret); extern errcode_t e2fsck_reset_context(e2fsck_t ctx); extern void e2fsck_free_context(e2fsck_t ctx); extern int e2fsck_run(e2fsck_t ctx); extern void read_bad_blocks_file(e2fsck_t ctx, const char *bad_blocks_file, int replace_bad_blocks); extern void e2fsck_add_dir_info(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent); extern void e2fsck_free_dir_info(e2fsck_t ctx); extern int e2fsck_get_num_dirinfo(e2fsck_t ctx); extern struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx); extern struct dir_info *e2fsck_dir_info_iter(e2fsck_t ctx, struct dir_info_iter *); extern void e2fsck_dir_info_iter_end(e2fsck_t ctx, struct dir_info_iter *); extern int e2fsck_dir_info_set_parent(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t parent); extern int e2fsck_dir_info_set_dotdot(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t dotdot); extern int e2fsck_dir_info_get_parent(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t *parent); extern int e2fsck_dir_info_get_dotdot(e2fsck_t ctx, ext2_ino_t ino, ext2_ino_t *dotdot); extern void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino, int num_blocks); extern struct dx_dir_info *e2fsck_get_dx_dir_info(e2fsck_t ctx, ext2_ino_t ino); extern void e2fsck_free_dx_dir_info(e2fsck_t ctx); extern int e2fsck_get_num_dx_dirinfo(e2fsck_t ctx); extern struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control); extern errcode_t ea_refcount_create(int size, ext2_refcount_t *ret); extern void ea_refcount_free(ext2_refcount_t refcount); extern errcode_t ea_refcount_fetch(ext2_refcount_t refcount, blk_t blk, int *ret); extern errcode_t ea_refcount_increment(ext2_refcount_t refcount, blk_t blk, int *ret); extern errcode_t ea_refcount_decrement(ext2_refcount_t refcount, blk_t blk, int *ret); extern errcode_t ea_refcount_store(ext2_refcount_t refcount, blk_t blk, int count); extern blk_t ext2fs_get_refcount_size(ext2_refcount_t refcount); extern void ea_refcount_intr_begin(ext2_refcount_t refcount); extern blk_t ea_refcount_intr_next(ext2_refcount_t refcount, int *ret); extern const char *ehandler_operation(const char *op); extern void ehandler_init(io_channel channel); extern int e2fsck_check_ext3_journal(e2fsck_t ctx); extern int e2fsck_run_ext3_journal(e2fsck_t ctx); extern void e2fsck_move_ext3_journal(e2fsck_t ctx); extern int e2fsck_fix_ext3_journal_hint(e2fsck_t ctx); extern void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags, ext2_icount_t *ret); extern void e2fsck_use_inode_shortcuts(e2fsck_t ctx, int bool); extern int e2fsck_pass1_check_device_inode(ext2_filsys fs, struct ext2_inode *inode); extern int e2fsck_pass1_check_symlink(ext2_filsys fs, struct ext2_inode *inode, char *buf); extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir, ext2_ino_t ino, char *buf); extern int e2fsck_reconnect_file(e2fsck_t ctx, ext2_ino_t inode); extern errcode_t e2fsck_expand_directory(e2fsck_t ctx, ext2_ino_t dir, int num, int gauranteed_size); extern ext2_ino_t e2fsck_get_lost_and_found(e2fsck_t ctx, int fix); extern errcode_t e2fsck_adjust_inode_count(e2fsck_t ctx, ext2_ino_t ino, int adj); extern region_t region_create(region_addr_t min, region_addr_t max); extern void region_free(region_t region); extern int region_allocate(region_t region, region_addr_t start, int n); errcode_t e2fsck_rehash_dir(e2fsck_t ctx, ext2_ino_t ino); void e2fsck_rehash_directories(e2fsck_t ctx); void check_super_block(e2fsck_t ctx); int check_backup_super_block(e2fsck_t ctx); void swap_filesys(e2fsck_t ctx); extern void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size, const char *description); extern int ask(e2fsck_t ctx, const char * string, int def); extern int ask_yn(const char * string, int def); extern void fatal_error(e2fsck_t ctx, const char * fmt_string); extern void e2fsck_read_bitmaps(e2fsck_t ctx); extern void e2fsck_write_bitmaps(e2fsck_t ctx); extern void preenhalt(e2fsck_t ctx); extern char *string_copy(e2fsck_t ctx, const char *str, int len); extern void print_resource_track(const char *desc, struct resource_track *track); extern void init_resource_track(struct resource_track *track); extern int inode_has_valid_blocks(struct ext2_inode *inode); extern void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino, struct ext2_inode * inode, const char * proc); extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino, struct ext2_inode * inode, const char * proc); extern void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino, struct ext2_inode * inode, int bufsize, const char *proc); extern blk_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name, io_manager manager); extern int ext2_file_type(unsigned int mode); extern void e2fsck_clear_progbar(e2fsck_t ctx); extern int e2fsck_simple_progress(e2fsck_t ctx, const char *label, float percent, unsigned int dpynum); # 51 "unix.c" 2 # 1 "problem.h" 1 # 12 "problem.h" typedef __u32 problem_t; struct problem_context { errcode_t errcode; ext2_ino_t ino, ino2, dir; struct ext2_inode *inode; struct ext2_dir_entry *dirent; blk_t blk, blk2; e2_blkcnt_t blkcount; int group; __u64 num; const char *str; }; #define PR_LATCH_MASK 0x0ff0 #define PR_LATCH_BLOCK 0x0010 #define PR_LATCH_BBLOCK 0x0020 #define PR_LATCH_IBITMAP 0x0030 #define PR_LATCH_BBITMAP 0x0040 #define PR_LATCH_RELOC 0x0050 #define PR_LATCH_DBLOCK 0x0060 #define PR_LATCH_LOW_DTIME 0x0070 #define PR_LATCH_TOOBIG 0x0080 #define PR_LATCH_OPTIMIZE_DIR 0x0090 #define PR_LATCH(x) ((((x) & PR_LATCH_MASK) >> 4) - 1) #define PRL_YES 0x0001 #define PRL_NO 0x0002 #define PRL_LATCHED 0x0004 #define PRL_SUPPRESS 0x0008 #define PRL_VARIABLE 0x000f #define PR_0_BB_NOT_GROUP 0x000001 #define PR_0_IB_NOT_GROUP 0x000002 #define PR_0_ITABLE_NOT_GROUP 0x000003 #define PR_0_SB_CORRUPT 0x000004 #define PR_0_FS_SIZE_WRONG 0x000005 #define PR_0_NO_FRAGMENTS 0x000006 #define PR_0_BLOCKS_PER_GROUP 0x000007 #define PR_0_FIRST_DATA_BLOCK 0x000008 #define PR_0_ADD_UUID 0x000009 #define PR_0_RELOCATE_HINT 0x00000A #define PR_0_MISC_CORRUPT_SUPER 0x00000B #define PR_0_GETSIZE_ERROR 0x00000C #define PR_0_INODE_COUNT_WRONG 0x00000D #define PR_0_HURD_CLEAR_FILETYPE 0x00000E #define PR_0_JOURNAL_BAD_INODE 0x00000F #define PR_0_JOURNAL_UNSUPP_MULTIFS 0x000010 #define PR_0_CANT_FIND_JOURNAL 0x000011 #define PR_0_EXT_JOURNAL_BAD_SUPER 0x000012 #define PR_0_JOURNAL_BAD_UUID 0x000013 #define PR_0_JOURNAL_UNSUPP_SUPER 0x000014 #define PR_0_JOURNAL_BAD_SUPER 0x000015 #define PR_0_JOURNAL_HAS_JOURNAL 0x000016 #define PR_0_JOURNAL_RECOVER_SET 0x000017 #define PR_0_JOURNAL_RECOVERY_CLEAR 0x000018 #define PR_0_JOURNAL_RESET_JOURNAL 0x000019 #define PR_0_FS_REV_LEVEL 0x00001A #define PR_0_ORPHAN_CLEAR_INODE 0x000020 #define PR_0_ORPHAN_ILLEGAL_BLOCK_NUM 0x000021 #define PR_0_ORPHAN_ALREADY_CLEARED_BLOCK 0x000022 #define PR_0_ORPHAN_ILLEGAL_HEAD_INODE 0x000023 #define PR_0_ORPHAN_ILLEGAL_INODE 0x000024 #define PR_0_JOURNAL_UNSUPP_ROCOMPAT 0x000025 #define PR_0_JOURNAL_UNSUPP_INCOMPAT 0x000026 #define PR_0_JOURNAL_UNSUPP_VERSION 0x000027 #define PR_0_MOVE_JOURNAL 0x000028 #define PR_0_ERR_MOVE_JOURNAL 0x000029 #define PR_0_CLEAR_V2_JOURNAL 0x00002A #define PR_0_JOURNAL_RUN 0x00002B #define PR_0_JOURNAL_RUN_DEFAULT 0x00002C #define PR_0_BACKUP_JNL 0x00002D #define PR_0_NONZERO_RESERVED_GDT_BLOCKS 0x00002E #define PR_0_CLEAR_RESIZE_INODE 0x00002F #define PR_0_RESIZE_INODE_INVALID 0x000030 #define PR_0_FUTURE_SB_LAST_MOUNT 0x000031 #define PR_0_FUTURE_SB_LAST_WRITE 0x000032 #define PR_0_EXTERNAL_JOURNAL_HINT 0x000033 #define PR_0_DIRHASH_HINT 0x000034 #define PR_1_PASS_HEADER 0x010000 #define PR_1_ROOT_NO_DIR 0x010001 #define PR_1_ROOT_DTIME 0x010002 #define PR_1_RESERVED_BAD_MODE 0x010003 #define PR_1_ZERO_DTIME 0x010004 #define PR_1_SET_DTIME 0x010005 #define PR_1_ZERO_LENGTH_DIR 0x010006 #define PR_1_BB_CONFLICT 0x010007 #define PR_1_IB_CONFLICT 0x010008 #define PR_1_ITABLE_CONFLICT 0x010009 #define PR_1_BB_BAD_BLOCK 0x01000A #define PR_1_IB_BAD_BLOCK 0x01000B #define PR_1_BAD_I_SIZE 0x01000C #define PR_1_BAD_I_BLOCKS 0x01000D #define PR_1_ILLEGAL_BLOCK_NUM 0x01000E #define PR_1_BLOCK_OVERLAPS_METADATA 0x01000F #define PR_1_INODE_BLOCK_LATCH 0x010010 #define PR_1_TOO_MANY_BAD_BLOCKS 0x010011 #define PR_1_BB_ILLEGAL_BLOCK_NUM 0x010012 #define PR_1_INODE_BBLOCK_LATCH 0x010013 #define PR_1_DUP_BLOCKS_PREENSTOP 0x010014 #define PR_1_BBINODE_BAD_METABLOCK 0x010015 #define PR_1_BBINODE_BAD_METABLOCK_PROMPT 0x010016 #define PR_1_BAD_PRIMARY_BLOCK 0x010017 #define PR_1_BAD_PRIMARY_BLOCK_PROMPT 0x010018 #define PR_1_BAD_PRIMARY_SUPERBLOCK 0x010019 #define PR_1_BAD_PRIMARY_GROUP_DESCRIPTOR 0x01001A #define PR_1_BAD_SUPERBLOCK 0x01001B #define PR_1_BAD_GROUP_DESCRIPTORS 0x01001C #define PR_1_PROGERR_CLAIMED_BLOCK 0x01001D #define PR_1_RELOC_BLOCK_ALLOCATE 0x01001E #define PR_1_RELOC_MEMORY_ALLOCATE 0x01001F #define PR_1_RELOC_FROM_TO 0x010020 #define PR_1_RELOC_TO 0x010021 #define PR_1_RELOC_READ_ERR 0x010022 #define PR_1_RELOC_WRITE_ERR 0x010023 #define PR_1_ALLOCATE_IBITMAP_ERROR 0x010024 #define PR_1_ALLOCATE_BBITMAP_ERROR 0x010025 #define PR_1_ALLOCATE_ICOUNT 0x010026 #define PR_1_ALLOCATE_DBCOUNT 0x010027 #define PR_1_ISCAN_ERROR 0x010028 #define PR_1_BLOCK_ITERATE 0x010029 #define PR_1_ICOUNT_STORE 0x01002A #define PR_1_ADD_DBLOCK 0x01002B #define PR_1_READ_INODE 0x01002C #define PR_1_SUPPRESS_MESSAGES 0x01002D #define PR_1_SET_IMAGIC 0x01002F #define PR_1_SET_IMMUTABLE 0x010030 #define PR_1_COMPR_SET 0x010031 #define PR_1_SET_NONZSIZE 0x010032 #define PR_1_FS_REV_LEVEL 0x010033 #define PR_1_JOURNAL_INODE_NOT_CLEAR 0x010034 #define PR_1_JOURNAL_BAD_MODE 0x010035 #define PR_1_LOW_DTIME 0x010036 #define PR_1_ORPHAN_LIST_REFUGEES 0x010037 #define PR_1_ALLOCATE_REFCOUNT 0x010038 #define PR_1_READ_EA_BLOCK 0x010039 #define PR_1_BAD_EA_BLOCK 0x01003A #define PR_1_EXTATTR_READ_ABORT 0x01003B #define PR_1_EXTATTR_REFCOUNT 0x01003C #define PR_1_EXTATTR_WRITE 0x01003D #define PR_1_EA_MULTI_BLOCK 0x01003E #define PR_1_EA_ALLOC_REGION 0x01003F #define PR_1_EA_ALLOC_COLLISION 0x010040 #define PR_1_EA_BAD_NAME 0x010041 #define PR_1_EA_BAD_VALUE 0x010042 #define PR_1_INODE_TOOBIG 0x010043 #define PR_1_TOOBIG_DIR 0x010044 #define PR_1_TOOBIG_REG 0x010045 #define PR_1_TOOBIG_SYMLINK 0x010046 #define PR_1_HTREE_SET 0x010047 #define PR_1_HTREE_NODIR 0x010048 #define PR_1_HTREE_BADROOT 0x010049 #define PR_1_HTREE_HASHV 0x01004A #define PR_1_HTREE_INCOMPAT 0x01004B #define PR_1_HTREE_DEPTH 0x01004C #define PR_1_BB_FS_BLOCK 0x01004D #define PR_1_RESIZE_INODE_CREATE 0x01004E #define PR_1_EXTRA_ISIZE 0x01004F #define PR_1_ATTR_NAME_LEN 0x010050 #define PR_1_ATTR_VALUE_OFFSET 0x010051 #define PR_1_ATTR_VALUE_BLOCK 0x010052 #define PR_1_ATTR_VALUE_SIZE 0x010053 #define PR_1_ATTR_HASH 0x010054 #define PR_1_TREAT_AS_DIRECTORY 0x010055 #define PR_1B_PASS_HEADER 0x011000 #define PR_1B_DUP_BLOCK_HEADER 0x011001 #define PR_1B_DUP_BLOCK 0x011002 #define PR_1B_DUP_BLOCK_END 0x011003 #define PR_1B_ISCAN_ERROR 0x011004 #define PR_1B_ALLOCATE_IBITMAP_ERROR 0x011005 #define PR_1B_BLOCK_ITERATE 0x0110006 #define PR_1B_ADJ_EA_REFCOUNT 0x0110007 #define PR_1C_PASS_HEADER 0x012000 #define PR_1D_PASS_HEADER 0x013000 #define PR_1D_DUP_FILE 0x013001 #define PR_1D_DUP_FILE_LIST 0x013002 #define PR_1D_SHARE_METADATA 0x013003 #define PR_1D_NUM_DUP_INODES 0x013004 #define PR_1D_DUP_BLOCKS_DEALT 0x013005 #define PR_1D_CLONE_QUESTION 0x013006 #define PR_1D_DELETE_QUESTION 0x013007 #define PR_1D_CLONE_ERROR 0x013008 #define PR_2_PASS_HEADER 0x020000 #define PR_2_BAD_INODE_DOT 0x020001 #define PR_2_BAD_INO 0x020002 #define PR_2_UNUSED_INODE 0x020003 #define PR_2_LINK_DOT 0x020004 #define PR_2_BB_INODE 0x020005 #define PR_2_LINK_DIR 0x020006 #define PR_2_LINK_ROOT 0x020007 #define PR_2_BAD_NAME 0x020008 #define PR_2_MISSING_DOT 0x020009 #define PR_2_MISSING_DOT_DOT 0x02000A #define PR_2_1ST_NOT_DOT 0x02000B #define PR_2_2ND_NOT_DOT_DOT 0x02000C #define PR_2_FADDR_ZERO 0x02000D #define PR_2_FILE_ACL_ZERO 0x02000E #define PR_2_DIR_ACL_ZERO 0x02000F #define PR_2_FRAG_ZERO 0x020010 #define PR_2_FSIZE_ZERO 0x020011 #define PR_2_BAD_MODE 0x020012 #define PR_2_DIR_CORRUPTED 0x020013 #define PR_2_FILENAME_LONG 0x020014 #define PR_2_DIRECTORY_HOLE 0x020015 #define PR_2_DOT_NULL_TERM 0x020016 #define PR_2_DOT_DOT_NULL_TERM 0x020017 #define PR_2_BAD_CHAR_DEV 0x020018 #define PR_2_BAD_BLOCK_DEV 0x020019 #define PR_2_DUP_DOT 0x02001A #define PR_2_DUP_DOT_DOT 0x02001B #define PR_2_NO_DIRINFO 0x02001C #define PR_2_FINAL_RECLEN 0x02001D #define PR_2_ALLOCATE_ICOUNT 0x02001E #define PR_2_DBLIST_ITERATE 0x02001F #define PR_2_READ_DIRBLOCK 0x020020 #define PR_2_WRITE_DIRBLOCK 0x020021 #define PR_2_ALLOC_DIRBOCK 0x020022 #define PR_2_DEALLOC_INODE 0x020023 #define PR_2_SPLIT_DOT 0x020024 #define PR_2_BAD_FIFO 0x020025 #define PR_2_BAD_SOCKET 0x020026 #define PR_2_SET_FILETYPE 0x020027 #define PR_2_BAD_FILETYPE 0x020028 #define PR_2_CLEAR_FILETYPE 0x020029 #define PR_2_NULL_NAME 0x020030 #define PR_2_INVALID_SYMLINK 0x020031 #define PR_2_FILE_ACL_BAD 0x020032 #define PR_2_FEATURE_LARGE_FILES 0x020033 #define PR_2_HTREE_NOTREF 0x020034 #define PR_2_HTREE_DUPREF 0x020035 #define PR_2_HTREE_MIN_HASH 0x020036 #define PR_2_HTREE_MAX_HASH 0x020037 #define PR_2_HTREE_CLEAR 0x020038 #define PR_2_HTREE_BADBLK 0x02003A #define PR_2_ADJ_EA_REFCOUNT 0x02003B #define PR_2_HTREE_BAD_ROOT 0x02003C #define PR_2_HTREE_BAD_LIMIT 0x02003D #define PR_2_HTREE_BAD_COUNT 0x02003E #define PR_2_HTREE_HASH_ORDER 0x02003F #define PR_2_HTREE_BAD_DEPTH 0x020040 #define PR_2_DUPLICATE_DIRENT 0x020041 #define PR_2_NON_UNIQUE_FILE 0x020042 #define PR_2_REPORT_DUP_DIRENT 0x020043 #define PR_2_BLOCKS_HI_ZERO 0x020044 #define PR_3_PASS_HEADER 0x030000 #define PR_3_NO_ROOT_INODE 0x030001 #define PR_3_EXPAND_LF_DIR 0x030002 #define PR_3_UNCONNECTED_DIR 0x030003 #define PR_3_NO_LF_DIR 0x030004 #define PR_3_BAD_DOT_DOT 0x030005 #define PR_3_NO_LPF 0x030006 #define PR_3_CANT_EXPAND_LPF 0x030007 #define PR_3_CANT_RECONNECT 0x030008 #define PR_3_ERR_FIND_LPF 0x030009 #define PR_3_ERR_LPF_NEW_BLOCK 0x03000A #define PR_3_ERR_LPF_NEW_INODE 0x03000B #define PR_3_ERR_LPF_NEW_DIR_BLOCK 0x03000C #define PR_3_ERR_LPF_WRITE_BLOCK 0x03000D #define PR_3_ADJUST_INODE 0x03000E #define PR_3_FIX_PARENT_ERR 0x03000F #define PR_3_FIX_PARENT_NOFIND 0x030010 #define PR_3_ALLOCATE_IBITMAP_ERROR 0x030011 #define PR_3_CREATE_ROOT_ERROR 0x030012 #define PR_3_CREATE_LPF_ERROR 0x030013 #define PR_3_ROOT_NOT_DIR_ABORT 0x030014 #define PR_3_NO_ROOT_INODE_ABORT 0x030015 #define PR_3_NO_DIRINFO 0x030016 #define PR_3_LPF_NOTDIR 0x030017 #define PR_3A_PASS_HEADER 0x031000 #define PR_3A_OPTIMIZE_ITER 0x031001 #define PR_3A_OPTIMIZE_DIR_ERR 0x031002 #define PR_3A_OPTIMIZE_DIR_HEADER 0x031003 #define PR_3A_OPTIMIZE_DIR 0x031004 #define PR_3A_OPTIMIZE_DIR_END 0x031005 #define PR_4_PASS_HEADER 0x040000 #define PR_4_ZERO_LEN_INODE 0x040001 #define PR_4_UNATTACHED_INODE 0x040002 #define PR_4_BAD_REF_COUNT 0x040003 #define PR_4_INCONSISTENT_COUNT 0x040004 #define PR_5_PASS_HEADER 0x050000 #define PR_5_INODE_BMAP_PADDING 0x050001 #define PR_5_BLOCK_BMAP_PADDING 0x050002 #define PR_5_BLOCK_BITMAP_HEADER 0x050003 #define PR_5_BLOCK_UNUSED 0x050004 #define PR_5_BLOCK_USED 0x050005 #define PR_5_BLOCK_BITMAP_END 0x050006 #define PR_5_INODE_BITMAP_HEADER 0x050007 #define PR_5_INODE_UNUSED 0x050008 #define PR_5_INODE_USED 0x050009 #define PR_5_INODE_BITMAP_END 0x05000A #define PR_5_FREE_INODE_COUNT_GROUP 0x05000B #define PR_5_FREE_DIR_COUNT_GROUP 0x05000C #define PR_5_FREE_INODE_COUNT 0x05000D #define PR_5_FREE_BLOCK_COUNT_GROUP 0x05000E #define PR_5_FREE_BLOCK_COUNT 0x05000F #define PR_5_BMAP_ENDPOINTS 0x050010 #define PR_5_FUDGE_BITMAP_ERROR 0x050011 #define PR_5_COPY_IBITMAP_ERROR 0x050012 #define PR_5_COPY_BBITMAP_ERROR 0x050013 #define PR_5_BLOCK_RANGE_UNUSED 0x050014 #define PR_5_BLOCK_RANGE_USED 0x050015 #define PR_5_INODE_RANGE_UNUSED 0x050016 #define PR_5_INODE_RANGE_USED 0x050017 #define PR_6_RECREATE_JOURNAL 0x060001 int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx); int end_problem_latch(e2fsck_t ctx, int mask); int set_latch_flags(int mask, int setflags, int clearflags); int get_latch_flags(int mask, int *value); void clear_problem_context(struct problem_context *ctx); void print_e2fsck_message(e2fsck_t ctx, const char *msg, struct problem_context *pctx, int first, int recurse); # 52 "unix.c" 2 # 1 "../version.h" 1 # 10 "../version.h" #define E2FSPROGS_VERSION "1.40.4" #define E2FSPROGS_DATE "31-Dec-2007" # 53 "unix.c" 2 static int swapfs; static int normalize_swapfs; static int cflag; static int show_version_only; static int verbose; static int replace_bad_blocks; static int keep_bad_blocks; static char *bad_blocks_file; e2fsck_t e2fsck_global_ctx; static void usage(e2fsck_t ctx) { fprintf(stderr, (dcgettext (((void *)0), "Usage: %s [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]\n" "\t\t[-I inode_buffer_blocks] [-P process_inode_size]\n" "\t\t[-l|-L bad_blocks_file] [-C fd] [-j external_journal]\n" "\t\t[-E extended-options] device\n", __LC_MESSAGES)), ctx->program_name); fprintf(stderr, (dcgettext (((void *)0), "\nEmergency help:\n" " -p Automatic repair (no questions)\n" " -n Make no changes to the filesystem\n" " -y Assume \"yes\" to all questions\n" " -c Check for bad blocks and add them to the badblock list\n" " -f Force checking even if filesystem is marked clean\n", __LC_MESSAGES))); fprintf(stderr, (dcgettext (((void *)0), "" " -v Be verbose\n" " -b superblock Use alternative superblock\n" " -B blocksize Force blocksize when looking for superblock\n" " -j external_journal Set location of the external journal\n" " -l bad_blocks_file Add to badblocks list\n" " -L bad_blocks_file Set badblocks list\n", __LC_MESSAGES))); # 95 "unix.c" exit(16); } static void show_stats(e2fsck_t ctx) { ext2_filsys fs = ctx->fs; ext2_ino_t inodes, inodes_used; blk_t blocks, blocks_used; int dir_links; int num_files, num_links; int frag_percent; dir_links = 2 * ctx->fs_directory_count - 1; num_files = ctx->fs_total_count - dir_links; num_links = ctx->fs_links_count - dir_links; inodes = fs->super->s_inodes_count; inodes_used = (fs->super->s_inodes_count - fs->super->s_free_inodes_count); blocks = fs->super->s_blocks_count; blocks_used = (fs->super->s_blocks_count - fs->super->s_free_blocks_count); frag_percent = (10000 * ctx->fs_fragmented) / inodes_used; frag_percent = (frag_percent + 5) / 10; if (!verbose) { printf((dcgettext (((void *)0), "%s: %u/%u files (%0d.%d%% non-contiguous), %u/%u blocks\n", __LC_MESSAGES)), ctx->device_name, inodes_used, inodes, frag_percent / 10, frag_percent % 10, blocks_used, blocks); return; } printf ((dcngettext (((void *)0), "\n%8u inode used (%2.2f%%)\n", "\n%8u inodes used (%2.2f%%)\n", inodes_used, __LC_MESSAGES)), inodes_used, 100.0 * inodes_used / inodes); printf ((dcngettext (((void *)0), "%8u non-contiguous inode (%0d.%d%%)\n", "%8u non-contiguous inodes (%0d.%d%%)\n", ctx->fs_fragmented, __LC_MESSAGES)), ctx->fs_fragmented, frag_percent / 10, frag_percent % 10); printf ((dcgettext (((void *)0), " # of inodes with ind/dind/tind blocks: %u/%u/%u\n", __LC_MESSAGES)), ctx->fs_ind_count, ctx->fs_dind_count, ctx->fs_tind_count); printf ((dcngettext (((void *)0), "%8u block used (%2.2f%%)\n", "%8u blocks used (%2.2f%%)\n", blocks_used, __LC_MESSAGES)), blocks_used, 100.0 * blocks_used / blocks); printf ((dcngettext (((void *)0), "%8u bad block\n", "%8u bad blocks\n", ctx->fs_badblocks_count, __LC_MESSAGES)), ctx->fs_badblocks_count); printf ((dcngettext (((void *)0), "%8u large file\n", "%8u large files\n", ctx->large_files, __LC_MESSAGES)), ctx->large_files); printf ((dcngettext (((void *)0), "\n%8u regular file\n", "\n%8u regular files\n", ctx->fs_regular_count, __LC_MESSAGES)), ctx->fs_regular_count); printf ((dcngettext (((void *)0), "%8u directory\n", "%8u directories\n", ctx->fs_directory_count, __LC_MESSAGES)), ctx->fs_directory_count); printf ((dcngettext (((void *)0), "%8u character device file\n", "%8u character device files\n", ctx->fs_chardev_count, __LC_MESSAGES)), ctx->fs_chardev_count); printf ((dcngettext (((void *)0), "%8u block device file\n", "%8u block device files\n", ctx->fs_blockdev_count, __LC_MESSAGES)), ctx->fs_blockdev_count); printf ((dcngettext (((void *)0), "%8u fifo\n", "%8u fifos\n", ctx->fs_fifo_count, __LC_MESSAGES)), ctx->fs_fifo_count); printf ((dcngettext (((void *)0), "%8u link\n", "%8u links\n", ctx->fs_links_count - dir_links, __LC_MESSAGES)), ctx->fs_links_count - dir_links); printf ((dcngettext (((void *)0), "%8u symbolic link", "%8u symbolic links", ctx->fs_symlinks_count, __LC_MESSAGES)), ctx->fs_symlinks_count); printf ((dcngettext (((void *)0), " (%u fast symbolic link)\n", " (%u fast symbolic links)\n", ctx->fs_fast_symlinks_count, __LC_MESSAGES)), ctx->fs_fast_symlinks_count); printf ((dcngettext (((void *)0), "%8u socket\n", "%8u sockets\n", ctx->fs_sockets_count, __LC_MESSAGES)), ctx->fs_sockets_count); printf ("--------\n"); printf ((dcngettext (((void *)0), "%8u file\n", "%8u files\n", ctx->fs_total_count - dir_links, __LC_MESSAGES)), ctx->fs_total_count - dir_links); } static void check_mount(e2fsck_t ctx) { errcode_t retval; int cont; retval = ext2fs_check_if_mounted(ctx->filesystem_name, &ctx->mount_flags); if (retval) { com_err("ext2fs_check_if_mount", retval, (dcgettext (((void *)0), "while determining whether %s is mounted.", __LC_MESSAGES)), ctx->filesystem_name); return; } if ((!(ctx->mount_flags & 1)) || ((ctx->mount_flags & 2) && (ctx->mount_flags & 4) && !(ctx->options & 0x0200))) return; if ((ctx->options & 0x0001) && !(ctx->options & 0x0200)) { printf((dcgettext (((void *)0), "Warning! %s is mounted.\n", __LC_MESSAGES)), ctx->filesystem_name); return; } printf((dcgettext (((void *)0), "%s is mounted. ", __LC_MESSAGES)), ctx->filesystem_name); if (!ctx->interactive) fatal_error(ctx, (dcgettext (((void *)0), "Cannot continue, aborting.\n\n", __LC_MESSAGES))); printf((dcgettext (((void *)0), "\n\n\007\007\007\007WARNING!!! " "Running e2fsck on a mounted filesystem may cause\n" "SEVERE filesystem damage.\007\007\007\n\n", __LC_MESSAGES))); cont = ask_yn((dcgettext (((void *)0), "Do you really want to continue", __LC_MESSAGES)), -1); if (!cont) { printf ((dcgettext (((void *)0), "check aborted.\n", __LC_MESSAGES))); exit (0); } return; } static int is_on_batt(void) { FILE *f; DIR *d; char tmp[80], tmp2[80], fname[80]; unsigned int acflag; struct dirent* de; f = fopen("/proc/apm", "r"); if (f) { if (fscanf(f, "%s %s %s %x", tmp, tmp, tmp, &acflag) != 4) acflag = 1; fclose(f); return (acflag != 1); } d = opendir("/proc/acpi/ac_adapter"); if (d) { while ((de=readdir(d)) != ((void *)0)) { if (!(__extension__ (__builtin_constant_p (1) && ((__builtin_constant_p (".") && strlen (".") < ((size_t) (1))) || (__builtin_constant_p (de->d_name) && strlen (de->d_name) < ((size_t) (1)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (".") && __builtin_constant_p (de->d_name) && (__s1_len = strlen ("."), __s2_len = strlen (de->d_name), (!((size_t)(const void *)((".") + 1) - (size_t)(const void *)(".") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((de->d_name) + 1) - (size_t)(const void *)(de->d_name) == 1) || __s2_len >= 4)) ? __builtin_strcmp (".", de->d_name) : (__builtin_constant_p (".") && ((size_t)(const void *)((".") + 1) - (size_t)(const void *)(".") == 1) && (__s1_len = strlen ("."), __s1_len < 4) ? (__builtin_constant_p (de->d_name) && ((size_t)(const void *)((de->d_name) + 1) - (size_t)(const void *)(de->d_name) == 1) ? __builtin_strcmp (".", de->d_name) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (de->d_name); register int __result = (((__const unsigned char *) (__const char *) ("."))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("."))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("."))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("."))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (de->d_name) && ((size_t)(const void *)((de->d_name) + 1) - (size_t)(const void *)(de->d_name) == 1) && (__s2_len = strlen (de->d_name), __s2_len < 4) ? (__builtin_constant_p (".") && ((size_t)(const void *)((".") + 1) - (size_t)(const void *)(".") == 1) ? __builtin_strcmp (".", de->d_name) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("."); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (de->d_name))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (de->d_name))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (de->d_name))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (de->d_name))[3]); } } __result; }))) : __builtin_strcmp (".", de->d_name)))); }) : strncmp (".", de->d_name, 1)))) continue; snprintf(fname, 80, "/proc/acpi/ac_adapter/%s/state", de->d_name); f = fopen(fname, "r"); if (!f) continue; if (fscanf(f, "%s %s", tmp2, tmp) != 2) tmp[0] = 0; fclose(f); if ((__extension__ (__builtin_constant_p (8) && ((__builtin_constant_p (tmp) && strlen (tmp) < ((size_t) (8))) || (__builtin_constant_p ("off-line") && strlen ("off-line") < ((size_t) (8)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (tmp) && __builtin_constant_p ("off-line") && (__s1_len = strlen (tmp), __s2_len = strlen ("off-line"), (!((size_t)(const void *)((tmp) + 1) - (size_t)(const void *)(tmp) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("off-line") + 1) - (size_t)(const void *)("off-line") == 1) || __s2_len >= 4)) ? __builtin_strcmp (tmp, "off-line") : (__builtin_constant_p (tmp) && ((size_t)(const void *)((tmp) + 1) - (size_t)(const void *)(tmp) == 1) && (__s1_len = strlen (tmp), __s1_len < 4) ? (__builtin_constant_p ("off-line") && ((size_t)(const void *)(("off-line") + 1) - (size_t)(const void *)("off-line") == 1) ? __builtin_strcmp (tmp, "off-line") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("off-line"); register int __result = (((__const unsigned char *) (__const char *) (tmp))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (tmp))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (tmp))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (tmp))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("off-line") && ((size_t)(const void *)(("off-line") + 1) - (size_t)(const void *)("off-line") == 1) && (__s2_len = strlen ("off-line"), __s2_len < 4) ? (__builtin_constant_p (tmp) && ((size_t)(const void *)((tmp) + 1) - (size_t)(const void *)(tmp) == 1) ? __builtin_strcmp (tmp, "off-line") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (tmp); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("off-line"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("off-line"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("off-line"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("off-line"))[3]); } } __result; }))) : __builtin_strcmp (tmp, "off-line")))); }) : strncmp (tmp, "off-line", 8))) == 0) { closedir(d); return 1; } } closedir(d); } return 0; } static void check_if_skip(e2fsck_t ctx) { ext2_filsys fs = ctx->fs; const char *reason = ((void *)0); unsigned int reason_arg = 0; long next_check; int batt = is_on_batt(); int defer_check_on_battery; time_t lastcheck; profile_get_boolean(ctx->profile, "options", "defer_check_on_battery", 0, 1, &defer_check_on_battery); if (!defer_check_on_battery) batt = 0; if ((ctx->options & 0x0100) || bad_blocks_file || cflag || swapfs) return; lastcheck = fs->super->s_lastcheck; if (lastcheck > ctx->now) lastcheck -= ctx->time_fudge; if ((fs->super->s_state & 0x0002) || !ext2fs_test_valid(fs)) reason = (dcgettext (((void *)0), " contains a file system with errors", __LC_MESSAGES)); else if ((fs->super->s_state & 0x0001) == 0) reason = (dcgettext (((void *)0), " was not cleanly unmounted", __LC_MESSAGES)); else if (check_backup_super_block(ctx)) reason = (dcgettext (((void *)0), " primary superblock features different from backup", __LC_MESSAGES)); else if ((fs->super->s_max_mnt_count > 0) && (fs->super->s_mnt_count >= (unsigned) fs->super->s_max_mnt_count)) { reason = (dcgettext (((void *)0), " has been mounted %u times without being checked", __LC_MESSAGES)); reason_arg = fs->super->s_mnt_count; if (batt && (fs->super->s_mnt_count < (unsigned) fs->super->s_max_mnt_count*2)) reason = 0; } else if (fs->super->s_checkinterval && ((ctx->now - lastcheck) >= fs->super->s_checkinterval)) { reason = (dcgettext (((void *)0), " has gone %u days without being checked", __LC_MESSAGES)); reason_arg = (ctx->now - fs->super->s_lastcheck)/(3600*24); if (batt && ((ctx->now - fs->super->s_lastcheck) < fs->super->s_checkinterval*2)) reason = 0; } if (reason) { fputs(ctx->device_name, stdout); printf(reason, reason_arg); fputs((dcgettext (((void *)0), ", check forced.\n", __LC_MESSAGES)), stdout); return; } printf((dcgettext (((void *)0), "%s: clean, %u/%u files, %u/%u blocks", __LC_MESSAGES)), ctx->device_name, fs->super->s_inodes_count - fs->super->s_free_inodes_count, fs->super->s_inodes_count, fs->super->s_blocks_count - fs->super->s_free_blocks_count, fs->super->s_blocks_count); next_check = 100000; if (fs->super->s_max_mnt_count > 0) { next_check = fs->super->s_max_mnt_count - fs->super->s_mnt_count; if (next_check <= 0) next_check = 1; } if (fs->super->s_checkinterval && ((ctx->now - fs->super->s_lastcheck) >= fs->super->s_checkinterval)) next_check = 1; if (next_check <= 5) { if (next_check == 1) { if (batt) fputs((dcgettext (((void *)0), " (check deferred; on battery)", __LC_MESSAGES)), stdout); else fputs((dcgettext (((void *)0), " (check after next mount)", __LC_MESSAGES)), stdout); } else printf((dcgettext (((void *)0), " (check in %ld mounts)", __LC_MESSAGES)), next_check); } fputc('\n', stdout); ext2fs_close(fs); ctx->fs = ((void *)0); e2fsck_free_context(ctx); exit(0); } struct percent_tbl { int max_pass; int table[32]; }; struct percent_tbl e2fsck_tbl = { 5, { 0, 70, 90, 92, 95, 100 } }; static char bar[128], spaces[128]; static float calc_percent(struct percent_tbl *tbl, int pass, int curr, int max) { float percent; if (pass <= 0) return 0.0; if (pass > tbl->max_pass || max == 0) return 100.0; percent = ((float) curr) / ((float) max); return ((percent * (tbl->table[pass] - tbl->table[pass-1])) + tbl->table[pass-1]); } extern void e2fsck_clear_progbar(e2fsck_t ctx) { if (!(ctx->flags & 0x0020)) return; printf("%s%s\r%s", ctx->start_meta, spaces + (sizeof(spaces) - 80), ctx->stop_meta); fflush(stdout); ctx->flags &= ~0x0020; } int e2fsck_simple_progress(e2fsck_t ctx, const char *label, float percent, unsigned int dpynum) { static const char spinner[] = "\\|/-"; int i; unsigned int tick; struct timeval tv; int dpywidth; int fixed_percent; if (ctx->flags & 0x0040) return 0; fixed_percent = (int) ((10 * percent) + 0.5); if (ctx->progress_last_percent == fixed_percent) return 0; ctx->progress_last_percent = fixed_percent; gettimeofday(&tv, ((void *)0)); tick = (tv.tv_sec << 3) + (tv.tv_usec / (1000000 / 8)); if ((tick == ctx->progress_last_time) && (fixed_percent != 0) && (fixed_percent != 1000)) return 0; ctx->progress_last_time = tick; ctx->progress_pos = (ctx->progress_pos+1) & 3; ctx->flags |= 0x0020; dpywidth = 66 - strlen(label); dpywidth = 8 * (dpywidth / 8); if (dpynum) dpywidth -= 8; i = ((percent * dpywidth) + 50) / 100; printf("%s%s: |%s%s", ctx->start_meta, label, bar + (sizeof(bar) - (i+1)), spaces + (sizeof(spaces) - (dpywidth - i + 1))); if (fixed_percent == 1000) fputc('|', stdout); else fputc(spinner[ctx->progress_pos & 3], stdout); printf(" %4.1f%% ", percent); if (dpynum) printf("%u\r", dpynum); else fputs(" \r", stdout); fputs(ctx->stop_meta, stdout); if (fixed_percent == 1000) e2fsck_clear_progbar(ctx); fflush(stdout); return 0; } static int e2fsck_update_progress(e2fsck_t ctx, int pass, unsigned long cur, unsigned long max) { char buf[80]; float percent; if (pass == 0) return 0; if (ctx->progress_fd) { sprintf(buf, "%d %lu %lu\n", pass, cur, max); write(ctx->progress_fd, buf, strlen(buf)); } else { percent = calc_percent(&e2fsck_tbl, pass, cur, max); e2fsck_simple_progress(ctx, ctx->device_name, percent, 0); } return 0; } #define PATH_SET "PATH=/sbin" static void reserve_stdio_fds(void) { int fd; while (1) { fd = open("/dev/null", 02); if (fd > 2) break; if (fd < 0) { fprintf(stderr, (dcgettext (((void *)0), "ERROR: Couldn't open " "/dev/null (%s)\n", __LC_MESSAGES)), strerror((*__errno_location ()))); break; } } close(fd); } static void signal_progress_on(int sig __attribute__((unused))) { e2fsck_t ctx = e2fsck_global_ctx; if (!ctx) return; ctx->progress = e2fsck_update_progress; ctx->progress_fd = 0; } static void signal_progress_off(int sig __attribute__((unused))) { e2fsck_t ctx = e2fsck_global_ctx; if (!ctx) return; e2fsck_clear_progbar(ctx); ctx->progress = 0; } static void signal_cancel(int sig __attribute__((unused))) { e2fsck_t ctx = e2fsck_global_ctx; if (!ctx) exit(32); ctx->flags |= 0x0002; } static void parse_extended_opts(e2fsck_t ctx, const char *opts) { char *buf, *token, *next, *p, *arg; int ea_ver; int extended_usage = 0; buf = string_copy(ctx, opts, 0); for (token = buf; token && *token; token = next) { p = (__extension__ (__builtin_constant_p (',') && !__builtin_constant_p (token) && (',') == '\0' ? (char *) __rawmemchr (token, ',') : __builtin_strchr (token, ','))); next = 0; if (p) { *p = 0; next = p+1; } arg = (__extension__ (__builtin_constant_p ('=') && !__builtin_constant_p (token) && ('=') == '\0' ? (char *) __rawmemchr (token, '=') : __builtin_strchr (token, '='))); if (arg) { *arg = 0; arg++; } if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (token) && __builtin_constant_p ("ea_ver") && (__s1_len = strlen (token), __s2_len = strlen ("ea_ver"), (!((size_t)(const void *)((token) + 1) - (size_t)(const void *)(token) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("ea_ver") + 1) - (size_t)(const void *)("ea_ver") == 1) || __s2_len >= 4)) ? __builtin_strcmp (token, "ea_ver") : (__builtin_constant_p (token) && ((size_t)(const void *)((token) + 1) - (size_t)(const void *)(token) == 1) && (__s1_len = strlen (token), __s1_len < 4) ? (__builtin_constant_p ("ea_ver") && ((size_t)(const void *)(("ea_ver") + 1) - (size_t)(const void *)("ea_ver") == 1) ? __builtin_strcmp (token, "ea_ver") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("ea_ver"); register int __result = (((__const unsigned char *) (__const char *) (token))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (token))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (token))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (token))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("ea_ver") && ((size_t)(const void *)(("ea_ver") + 1) - (size_t)(const void *)("ea_ver") == 1) && (__s2_len = strlen ("ea_ver"), __s2_len < 4) ? (__builtin_constant_p (token) && ((size_t)(const void *)((token) + 1) - (size_t)(const void *)(token) == 1) ? __builtin_strcmp (token, "ea_ver") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (token); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("ea_ver"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("ea_ver"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("ea_ver"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("ea_ver"))[3]); } } __result; }))) : __builtin_strcmp (token, "ea_ver")))); }) == 0) { if (!arg) { extended_usage++; continue; } ea_ver = strtoul(arg, &p, 0); if (*p || ((ea_ver != 1) && (ea_ver != 2))) { fprintf(stderr, (dcgettext (((void *)0), "Invalid EA version.\n", __LC_MESSAGES))); extended_usage++; continue; } ctx->ext_attr_ver = ea_ver; } else { fprintf(stderr, (dcgettext (((void *)0), "Unknown extended option: %s\n", __LC_MESSAGES)), token); extended_usage++; } } free(buf); if (extended_usage) { fputs(("\nExtended options are separated by commas, " "and may take an argument which\n" "is set off by an equals ('=') sign. " "Valid extended options are:\n" "\tea_ver=\n\n"), stderr); exit(1); } } static void syntax_err_report(const char *filename, long err, int line_num) { fprintf(stderr, (dcgettext (((void *)0), "Syntax error in e2fsck config file (%s, line #%d)\n\t%s\n", __LC_MESSAGES)), filename, line_num, error_message(err)); exit(8); } static const char *config_fn[] = { "/etc" "/e2fsck.conf", 0 }; static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) { int flush = 0; int c, fd; e2fsck_t ctx; errcode_t retval; struct sigaction sa; char *extended_opts = 0; char *cp; int res; retval = e2fsck_allocate_context(&ctx); if (retval) return retval; *ret_ctx = ctx; setvbuf(stdout, ((void *)0), 2, 8192); setvbuf(stderr, ((void *)0), 2, 8192); if (isatty(0) && isatty(1)) { ctx->interactive = 1; } else { ctx->start_meta[0] = '\001'; ctx->stop_meta[0] = '\002'; } memset(bar, '=', sizeof(bar)-1); memset(spaces, ' ', sizeof(spaces)-1); add_error_table(&et_ext2_error_table); add_error_table(&et_prof_error_table); blkid_get_cache(&ctx->blkid, ((void *)0)); if (argc && *argv) ctx->program_name = *argv; else ctx->program_name = "e2fsck"; while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != (-1)) switch (c) { case 'C': ctx->progress = e2fsck_update_progress; res = sscanf(optarg, "%d", &ctx->progress_fd); if (res != 1) goto sscanf_err; if (!ctx->progress_fd) break; fd = dup(ctx->progress_fd); if (fd < 0) { fprintf(stderr, (dcgettext (((void *)0), "Error validating file descriptor %d: %s\n", __LC_MESSAGES)), ctx->progress_fd, error_message((*__errno_location ()))); fatal_error(ctx, (dcgettext (((void *)0), "Invalid completion information file descriptor", __LC_MESSAGES))); } else close(fd); break; case 'D': ctx->options |= 0x0400; break; case 'E': extended_opts = optarg; break; case 'p': case 'a': if (ctx->options & (0x0004|0x0008)) { conflict_opt: fatal_error(ctx, (dcgettext (((void *)0), "Only one of the options -p/-a, -n or -y may be specified.", __LC_MESSAGES))); } ctx->options |= 0x0002; break; case 'n': if (ctx->options & (0x0004|0x0002)) goto conflict_opt; ctx->options |= 0x0008; break; case 'y': if (ctx->options & (0x0002|0x0008)) goto conflict_opt; ctx->options |= 0x0004; break; case 't': if (ctx->options & 0x0010) ctx->options |= 0x0020; else ctx->options |= 0x0010; break; case 'c': if (cflag++) ctx->options |= 0x0200; ctx->options |= 0x0040; break; case 'r': break; case 'b': res = sscanf(optarg, "%d", &ctx->use_superblock); if (res != 1) goto sscanf_err; ctx->flags |= 0x0100; break; case 'B': ctx->blocksize = atoi(optarg); break; case 'I': res = sscanf(optarg, "%d", &ctx->inode_buffer_blocks); if (res != 1) goto sscanf_err; break; case 'j': ctx->journal_name = string_copy(ctx, optarg, 0); break; case 'P': res = sscanf(optarg, "%d", &ctx->process_inode_size); if (res != 1) goto sscanf_err; break; case 'L': replace_bad_blocks++; case 'l': bad_blocks_file = string_copy(ctx, optarg, 0); break; case 'd': ctx->options |= 0x0080; break; case 'f': ctx->options |= 0x0100; break; case 'F': flush = 1; break; case 'v': verbose = 1; break; case 'V': show_version_only = 1; break; case 'N': ctx->device_name = optarg; break; case 's': normalize_swapfs = 1; case 'S': swapfs = 1; break; # 752 "unix.c" case 'k': keep_bad_blocks++; break; default: usage(ctx); } if (show_version_only) return 0; if (optind != argc - 1) usage(ctx); if ((ctx->options & 0x0008) && !bad_blocks_file && !cflag && !swapfs && !(ctx->options & 0x0400)) ctx->options |= 0x0001; ctx->io_options = (__extension__ (__builtin_constant_p ('?') && !__builtin_constant_p (argv[optind]) && ('?') == '\0' ? (char *) __rawmemchr (argv[optind], '?') : __builtin_strchr (argv[optind], '?'))); if (ctx->io_options) *ctx->io_options++ = 0; ctx->filesystem_name = blkid_get_devname(ctx->blkid, argv[optind], 0); if (!ctx->filesystem_name) { com_err(ctx->program_name, 0, (dcgettext (((void *)0), "Unable to resolve '%s'", __LC_MESSAGES)), argv[optind]); fatal_error(ctx, 0); } if (extended_opts) parse_extended_opts(ctx, extended_opts); if ((cp = getenv("E2FSCK_CONFIG")) != ((void *)0)) config_fn[0] = cp; profile_set_syntax_err_cb(syntax_err_report); profile_init(config_fn, &ctx->profile); if (flush) { fd = open(ctx->filesystem_name, 00, 0); if (fd < 0) { com_err("open", (*__errno_location ()), (dcgettext (((void *)0), "while opening %s for flushing", __LC_MESSAGES)), ctx->filesystem_name); fatal_error(ctx, 0); } if ((retval = ext2fs_sync_device(fd, 1))) { com_err("ext2fs_sync_device", retval, (dcgettext (((void *)0), "while trying to flush %s", __LC_MESSAGES)), ctx->filesystem_name); fatal_error(ctx, 0); } close(fd); } if (swapfs) { if (cflag || bad_blocks_file) { fprintf(stderr, (dcgettext (((void *)0), "Incompatible options not " "allowed when byte-swapping.\n", __LC_MESSAGES))); exit(16); } } if (cflag && bad_blocks_file) { fprintf(stderr, (dcgettext (((void *)0), "The -c and the -l/-L options may " "not be both used at the same time.\n", __LC_MESSAGES))); exit(16); } memset(&sa, 0, sizeof(struct sigaction)); sa.__sigaction_handler.sa_handler = signal_cancel; sigaction(2, &sa, 0); sigaction(15, &sa, 0); sa.sa_flags = 0x10000000; e2fsck_global_ctx = ctx; sa.__sigaction_handler.sa_handler = signal_progress_on; sigaction(10, &sa, 0); sa.__sigaction_handler.sa_handler = signal_progress_off; sigaction(12, &sa, 0); if (cflag) { char *oldpath = getenv("PATH"); char *newpath; int len = sizeof("PATH=/sbin") + 1; if (oldpath) len += strlen(oldpath); newpath = malloc(len); if (!newpath) fatal_error(ctx, "Couldn't malloc() newpath"); strcpy(newpath, "PATH=/sbin"); if (oldpath) { strcat(newpath, ":"); strcat(newpath, oldpath); } putenv(newpath); } # 861 "unix.c" return 0; sscanf_err: fprintf(stderr, (dcgettext (((void *)0), "\nInvalid non-numeric argument to -%c (\"%s\")\n\n", __LC_MESSAGES)), c, optarg); exit (1); } static const char *my_ver_string = "1.40.4"; static const char *my_ver_date = "31-Dec-2007"; int main (int argc, char *argv[]) { errcode_t retval = 0, orig_retval = 0; int exit_value = 0; ext2_filsys fs = 0; io_manager io_ptr; struct ext2_super_block *sb; const char *lib_ver_date; int my_ver, lib_ver; e2fsck_t ctx; struct problem_context pctx; int flags, run_result; int journal_size; int sysval, sys_page_size = 4096; clear_problem_context(&pctx); setlocale(__LC_MESSAGES, ""); setlocale(__LC_CTYPE, ""); bindtextdomain("e2fsprogs", "/usr/share/locale"); textdomain("e2fsprogs"); my_ver = ext2fs_parse_version_string(my_ver_string); lib_ver = ext2fs_get_library_version(0, &lib_ver_date); if (my_ver > lib_ver) { fprintf( stderr, (dcgettext (((void *)0), "Error: ext2fs library version " "out of date!\n", __LC_MESSAGES))); show_version_only++; } retval = PRS(argc, argv, &ctx); if (retval) { com_err("e2fsck", retval, (dcgettext (((void *)0), "while trying to initialize program", __LC_MESSAGES))); exit(8); } reserve_stdio_fds(); init_resource_track(&ctx->global_rtrack); if (!(ctx->options & 0x0002) || show_version_only) fprintf(stderr, "e2fsck %s (%s)\n", my_ver_string, my_ver_date); if (show_version_only) { fprintf(stderr, (dcgettext (((void *)0), "\tUsing %s, %s\n", __LC_MESSAGES)), error_message((2133571328L)), lib_ver_date); exit(0); } check_mount(ctx); if (!(ctx->options & 0x0002) && !(ctx->options & 0x0008) && !(ctx->options & 0x0004)) { if (!ctx->interactive) fatal_error(ctx, (dcgettext (((void *)0), "need terminal for interactive repairs", __LC_MESSAGES))); } ctx->superblock = ctx->use_superblock; restart: io_ptr = unix_io_manager; flags = 0; if ((ctx->options & 0x0001) == 0) flags |= 0x01; if ((ctx->mount_flags & 1) == 0) flags |= 0x4000; if (ctx->superblock && ctx->blocksize) { retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options, flags, ctx->superblock, ctx->blocksize, io_ptr, &fs); } else if (ctx->superblock) { int blocksize; for (blocksize = (1 << 10); blocksize <= (1 << 16); blocksize *= 2) { retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options, flags, ctx->superblock, blocksize, io_ptr, &fs); if (!retval) break; } } else retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options, flags, 0, 0, io_ptr, &fs); if (!ctx->superblock && !(ctx->options & 0x0002) && !(ctx->flags & 0x0100) && ((retval == (2133571347L)) || (retval == (2133571388L)) || ((retval == 0) && ext2fs_check_desc(fs)))) { if (!fs || (fs->group_desc_count > 1)) { printf((dcgettext (((void *)0), "%s: %s trying backup blocks...\n", __LC_MESSAGES)), ctx->program_name, retval ? (dcgettext (((void *)0), "Superblock invalid,", __LC_MESSAGES)) : (dcgettext (((void *)0), "Group descriptors look bad...", __LC_MESSAGES))); get_backup_sb(ctx, fs, ctx->filesystem_name, io_ptr); if (fs) ext2fs_close(fs); orig_retval = retval; goto restart; } } if (retval) { if (orig_retval) retval = orig_retval; com_err(ctx->program_name, retval, (dcgettext (((void *)0), "while trying to open %s", __LC_MESSAGES)), ctx->filesystem_name); if (retval == (2133571348L)) { printf((dcgettext (((void *)0), "The filesystem revision is apparently " "too high for this version of e2fsck.\n" "(Or the filesystem superblock " "is corrupt)\n\n", __LC_MESSAGES))); fix_problem(ctx, 0x000004, &pctx); } else if (retval == (2133571364L)) printf((dcgettext (((void *)0), "Could this be a zero-length partition?\n", __LC_MESSAGES))); else if ((retval == 1) || (retval == 13)) printf((dcgettext (((void *)0), "You must have %s access to the " "filesystem or be root\n", __LC_MESSAGES)), (ctx->options & 0x0001) ? "r/o" : "r/w"); else if (retval == 6) printf((dcgettext (((void *)0), "Possibly non-existent or swap device?\n", __LC_MESSAGES))); else if (retval == 16) printf((dcgettext (((void *)0), "Filesystem mounted or opened exclusively " "by another program?\n", __LC_MESSAGES))); else if (retval == 30) printf((dcgettext (((void *)0), "Disk write-protected; use the -n option " "to do a read-only\n" "check of the device.\n", __LC_MESSAGES))); else fix_problem(ctx, 0x000004, &pctx); fatal_error(ctx, 0); } # 1032 "unix.c" fs->flags |= 0x200; if (!(ctx->flags & 0x0800)) { __u32 blocksize = ((1 << 10) << (fs->super)->s_log_block_size); int need_restart = 0; pctx.errcode = ext2fs_get_device_size(ctx->filesystem_name, blocksize, &ctx->num_blocks); if (pctx.errcode == 16) { ext2fs_close(fs); need_restart++; pctx.errcode = ext2fs_get_device_size(ctx->filesystem_name, blocksize, &ctx->num_blocks); } if (pctx.errcode == (2133571408L)) ctx->num_blocks = 0; else if (pctx.errcode) { fix_problem(ctx, 0x00000C, &pctx); ctx->flags |= 0x0001; fatal_error(ctx, 0); } ctx->flags |= 0x0800; if (need_restart) goto restart; } ctx->fs = fs; fs->priv_data = ctx; fs->now = ctx->now; sb = fs->super; if (sb->s_rev_level > 1) { com_err(ctx->program_name, (2133571348L), (dcgettext (((void *)0), "while trying to open %s", __LC_MESSAGES)), ctx->filesystem_name); get_newer: fatal_error(ctx, (dcgettext (((void *)0), "Get a newer version of e2fsck!", __LC_MESSAGES))); } if (ctx->device_name == 0 && (sb->s_volume_name[0] != 0)) { ctx->device_name = string_copy(ctx, sb->s_volume_name, sizeof(sb->s_volume_name)); } if (ctx->device_name == 0) ctx->device_name = ctx->filesystem_name; retval = e2fsck_check_ext3_journal(ctx); if (retval) { com_err(ctx->program_name, retval, (dcgettext (((void *)0), "while checking ext3 journal for %s", __LC_MESSAGES)), ctx->device_name); fatal_error(ctx, 0); } if (sb->s_feature_incompat & 0x0004) { if (ctx->options & 0x0001) { printf((dcgettext (((void *)0), "Warning: skipping journal recovery " "because doing a read-only filesystem " "check.\n", __LC_MESSAGES))); ((ctx->fs->io)->manager->flush((ctx->fs->io))); } else { if (ctx->flags & 0x0200) { com_err(ctx->program_name, 0, (dcgettext (((void *)0), "unable to set superblock flags on %s\n", __LC_MESSAGES)), ctx->device_name); fatal_error(ctx, 0); } retval = e2fsck_run_ext3_journal(ctx); if (retval) { com_err(ctx->program_name, retval, (dcgettext (((void *)0), "while recovering ext3 journal of %s", __LC_MESSAGES)), ctx->device_name); fatal_error(ctx, 0); } ext2fs_close(ctx->fs); ctx->fs = 0; ctx->flags |= 0x0200; goto restart; } } if ((sb->s_feature_compat & ~(0x0001| 0x0002| 0x0004| 0x0010| 0x0020| 0x0040| 0x0008)) || (sb->s_feature_incompat & ~(0x0002| 0x0008| 0x0010| 0x0004))) { com_err(ctx->program_name, (2133571395L), "(%s)", ctx->device_name); goto get_newer; } if (sb->s_feature_ro_compat & ~(0x0001| 0x0002)) { com_err(ctx->program_name, (2133571396L), "(%s)", ctx->device_name); goto get_newer; } # 1174 "unix.c" if (ctx->superblock && !(ctx->options & 0x0001)) ext2fs_mark_super_dirty(fs); sysval = sysconf(_SC_PAGESIZE); if (sysval > 0) sys_page_size = sysval; ctx->blocks_per_page = sys_page_size / fs->blocksize; if (ctx->blocks_per_page == 0) ctx->blocks_per_page = 1; ehandler_init(fs->io); if (ctx->superblock) set_latch_flags(0x0050, 0x0004, 0); ext2fs_mark_valid(fs); check_super_block(ctx); if (ctx->flags & 0x0003) fatal_error(ctx, 0); check_if_skip(ctx); if (bad_blocks_file) read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks); else if (cflag) read_bad_blocks_file(ctx, 0, !keep_bad_blocks); if (ctx->flags & 0x0003) fatal_error(ctx, 0); if (normalize_swapfs) { if ((fs->flags & 0x40) == ext2fs_native_flag()) { fprintf(stderr, (dcgettext (((void *)0), "%s: Filesystem byte order " "already normalized.\n", __LC_MESSAGES)), ctx->device_name); fatal_error(ctx, 0); } } if (swapfs) { swap_filesys(ctx); if (ctx->flags & 0x0003) fatal_error(ctx, 0); } ext2fs_mark_valid(fs); retval = ext2fs_read_bb_inode(fs, &fs->badblocks); if (retval) { com_err(ctx->program_name, retval, (dcgettext (((void *)0), "while reading bad blocks inode", __LC_MESSAGES))); preenhalt(ctx); printf((dcgettext (((void *)0), "This doesn't bode well," " but we'll try to go on...\n", __LC_MESSAGES))); } if (sb->s_jnl_backup_type == 1) journal_size = sb->s_jnl_blocks[16] >> 20; else journal_size = -1; run_result = e2fsck_run(ctx); e2fsck_clear_progbar(ctx); if (ctx->flags & 0x0080) { if (fix_problem(ctx, 0x060001, &pctx)) { if (journal_size < 1024) journal_size = ext2fs_default_journal_size(fs->super->s_blocks_count); if (journal_size < 0) { fs->super->s_feature_compat &= ~0x0004; fs->flags &= ~0x200; com_err(ctx->program_name, 0, (dcgettext (((void *)0), "Couldn't determine journal size", __LC_MESSAGES))); goto no_journal; } printf((dcgettext (((void *)0), "Creating journal (%d blocks): ", __LC_MESSAGES)), journal_size); fflush(stdout); retval = ext2fs_add_journal_inode(fs, journal_size, 0); if (retval) { com_err("Error ", retval, (dcgettext (((void *)0), "\n\twhile trying to create journal", __LC_MESSAGES))); goto no_journal; } printf((dcgettext (((void *)0), " Done.\n", __LC_MESSAGES))); printf((dcgettext (((void *)0), "\n*** journal has been re-created - " "filesystem is now ext3 again ***\n", __LC_MESSAGES))); } } no_journal: if (run_result == 0x0004) { printf((dcgettext (((void *)0), "Restarting e2fsck from the beginning...\n", __LC_MESSAGES))); retval = e2fsck_reset_context(ctx); if (retval) { com_err(ctx->program_name, retval, (dcgettext (((void *)0), "while resetting context", __LC_MESSAGES))); fatal_error(ctx, 0); } ext2fs_close(fs); goto restart; } if (run_result & 0x0002) { printf((dcgettext (((void *)0), "%s: e2fsck canceled.\n", __LC_MESSAGES)), ctx->device_name ? ctx->device_name : ctx->filesystem_name); exit_value |= 32; } if (run_result & 0x0001) fatal_error(ctx, (dcgettext (((void *)0), "aborted", __LC_MESSAGES))); if (check_backup_super_block(ctx)) { fs->flags &= ~0x200; ext2fs_mark_super_dirty(fs); } if (ext2fs_test_changed(fs)) { exit_value |= 1; if (!(ctx->options & 0x0002)) printf((dcgettext (((void *)0), "\n%s: ***** FILE SYSTEM WAS MODIFIED *****\n", __LC_MESSAGES)), ctx->device_name); if (ctx->mount_flags & 2) { printf((dcgettext (((void *)0), "%s: ***** REBOOT LINUX *****\n", __LC_MESSAGES)), ctx->device_name); exit_value |= 2; } } if (!ext2fs_test_valid(fs) || ((exit_value & 32) && (sb->s_state & 0x0002))) { printf((dcgettext (((void *)0), "\n%s: ********** WARNING: Filesystem still has " "errors **********\n\n", __LC_MESSAGES)), ctx->device_name); exit_value |= 4; exit_value &= ~1; } if (exit_value & 32) { int allow_cancellation; profile_get_boolean(ctx->profile, "options", "allow_cancellation", 0, 0, &allow_cancellation); exit_value &= ~1; if (allow_cancellation && ext2fs_test_valid(fs) && (sb->s_state & 0x0001) && !(sb->s_state & 0x0002)) exit_value = 0; } else { show_stats(ctx); if (!(ctx->options & 0x0001)) { if (ext2fs_test_valid(fs)) { if (!(sb->s_state & 0x0001)) exit_value |= 1; sb->s_state = 0x0001; } else sb->s_state &= ~0x0001; sb->s_mnt_count = 0; sb->s_lastcheck = ctx->now; ext2fs_mark_super_dirty(fs); } } e2fsck_write_bitmaps(ctx); ext2fs_close(fs); ctx->fs = ((void *)0); free(ctx->filesystem_name); free(ctx->journal_name); if (ctx->options & 0x0010) print_resource_track(((void *)0), &ctx->global_rtrack); e2fsck_free_context(ctx); remove_error_table(&et_ext2_error_table); remove_error_table(&et_prof_error_table); return exit_value; }