params.out = buffer;
params.out_size = ACL_LEN;
-#if defined(AFS_PPC64_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_PPC64_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
if(pioctl(path, VIOCGETAL, ¶ms, 1)) {
-#else /* AFS_PPC_LINUX20_ENV */
+#else /* AFS_PPC_LINUX_ENV */
if(syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, VIOCGETAL, ¶ms, 1)) {
-#endif /* AFS_PPC_LINUX20_ENV */
+#endif /* AFS_PPC_LINUX_ENV */
fprintf(stderr, "ERROR: ACL::getACL -> VIOCGETAL failed: %d, path: %s\n", errno, path);
free(buffer);
return NULL;
params.out = NULL;
params.out_size = 0;
-#if defined(AFS_PPC64_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_PPC64_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
if(pioctl(path, VIOCSETAL, ¶ms, 1)) {
-#else /* AFS_PPC_LINUX20_ENV */
+#else /* AFS_PPC_LINUX_ENV */
if(syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, VIOCSETAL, ¶ms, 1)) {
-#endif /* AFS_PPC_LINUX20_ENV */
+#endif /* AFS_PPC_LINUX_ENV */
fprintf(stderr, "ERROR: ACL::setACL -> VIOCSETAL failed: %d, path: %s\n", errno, path);
return JNI_FALSE;
}
return (-code);
}
-# if defined(AFS_PPC64_LINUX20_ENV)
+# if defined(AFS_PPC64_LINUX_ENV)
/* Intercept the uid16 system call as used by 32bit programs. */
extern asmlinkage long (*sys32_setgroupsp)(int gidsetsize, gid_t *grouplist);
asmlinkage long afs32_xsetgroups(int gidsetsize, gid_t *grouplist)
}
# endif
-# if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_AMD64_LINUX20_ENV)
+# if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_AMD64_LINUX_ENV)
/* Intercept the uid16 system call as used by 32bit programs. */
-# ifdef AFS_AMD64_LINUX20_ENV
+# ifdef AFS_AMD64_LINUX_ENV
extern asmlinkage long (*sys32_setgroupsp) (int gidsetsize, u16 * grouplist);
-# endif /* AFS_AMD64_LINUX20_ENV */
-# ifdef AFS_SPARC64_LINUX26_ENV
+# endif /* AFS_AMD64_LINUX_ENV */
+# ifdef AFS_SPARC64_LINUX_ENV
extern asmlinkage int (*sys32_setgroupsp) (int gidsetsize,
__kernel_gid32_t * grouplist);
-# endif /* AFS_SPARC64_LINUX26_ENV */
+# endif /* AFS_SPARC64_LINUX_ENV */
asmlinkage long
afs32_xsetgroups(int gidsetsize, u16 * grouplist)
{
}
/* Intercept the uid32 system call as used by 32bit programs. */
-# ifdef AFS_AMD64_LINUX20_ENV
+# ifdef AFS_AMD64_LINUX_ENV
extern asmlinkage long (*sys32_setgroups32p) (int gidsetsize, gid_t * grouplist);
-# endif /* AFS_AMD64_LINUX20_ENV */
-# ifdef AFS_SPARC64_LINUX26_ENV
+# endif /* AFS_AMD64_LINUX_ENV */
+# ifdef AFS_SPARC64_LINUX_ENV
extern asmlinkage int (*sys32_setgroups32p) (int gidsetsize,
__kernel_gid32_t * grouplist);
-# endif /* AFS_SPARC64_LINUX26_ENV */
+# endif /* AFS_SPARC64_LINUX_ENV */
asmlinkage long
afs32_xsetgroups32(int gidsetsize, gid_t * grouplist)
{
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
#include <asm/ia32_unistd.h>
#endif
* Test to see for 64/32bit compatibility mode
* Return non-zero if in a 64bit kernel and handing a 32bit syscall
*/
-#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX_ENV) && !defined(AFS_IA64_LINUX_ENV)
static inline int
afs_in_compat_syscall(void)
{
# if defined(HAVE_LINUX_IN_COMPAT_SYSCALL)
return in_compat_syscall();
-# elif defined(AFS_SPARC64_LINUX26_ENV)
+# elif defined(AFS_SPARC64_LINUX_ENV)
return test_thread_flag(TIF_32BIT);
-# elif defined(AFS_SPARC64_LINUX24_ENV)
+# elif defined(AFS_SPARC64_LINUX_ENV)
return (current->thread.flags & SPARC_FLAG_32BIT) != 0;
-# elif defined(AFS_SPARC64_LINUX20_ENV)
+# elif defined(AFS_SPARC64_LINUX_ENV)
return (current->tss.flags & SPARC_FLAG_32BIT) != 0;
-# elif defined(AFS_AMD64_LINUX26_ENV)
+# elif defined(AFS_AMD64_LINUX_ENV)
return test_thread_flag(TIF_IA32);
-# elif defined(AFS_AMD64_LINUX20_ENV)
+# elif defined(AFS_AMD64_LINUX_ENV)
return (current->thread.flags & THREAD_IA32) != 0;
-# elif defined(AFS_PPC64_LINUX26_ENV)
+# elif defined(AFS_PPC64_LINUX_ENV)
# if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
return (current->thread_info->flags & _TIF_32BIT) != 0;
# else
return (task_thread_info(current)->flags & _TIF_32BIT) != 0;
# endif
-# elif defined(AFS_PPC64_LINUX20_ENV)
+# elif defined(AFS_PPC64_LINUX_ENV)
return (current->thread.flags & PPC_FLAG_32BIT) != 0;
-# elif defined(AFS_S390X_LINUX26_ENV)
+# elif defined(AFS_S390X_LINUX_ENV)
return test_thread_flag(TIF_31BIT);
-# elif defined(AFS_S390X_LINUX20_ENV)
+# elif defined(AFS_S390X_LINUX_ENV)
return (current->thread.flags & S390_FLAG_31BIT) != 0;
-# elif defined(AFS_ARM64_LINUX26_ENV)
+# elif defined(AFS_ARM64_LINUX_ENV)
return is_compat_task();
# else
# error afs_in_compat_syscall not done for this linux
#define OSIFILE_INODE(a) FILE_INODE((a)->filp)
-#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX_ENV) && !defined(AFS_IA64_LINUX_ENV)
# define NEED_IOCTL32
#endif
#define osi_InitGlock()
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
/* RHEL5 beta's kernel doesn't define these. They aren't gonna change, so... */
# ifndef __NR_ia32_afs_syscall
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
#include <asm/ia32_unistd.h>
#endif
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
#include <asm/ia32_unistd.h>
#endif
#include <linux/unistd.h>
#include <linux/mm.h>
-#if defined(AFS_PPC64_LINUX26_ENV)
+#if defined(AFS_PPC64_LINUX_ENV)
# include <asm/abs_addr.h>
#endif
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
# include <asm/ia32_unistd.h>
#endif
#endif
/* lower bound of valid kernel text pointers */
-#ifdef AFS_IA64_LINUX20_ENV
+#ifdef AFS_IA64_LINUX_ENV
#define ktxt_lower_bound (((unsigned long)&kernel_thread ) & 0xfff00000L)
-#elif defined(AFS_PPC64_LINUX20_ENV)
+#elif defined(AFS_PPC64_LINUX_ENV)
#define ktxt_lower_bound (KERNELBASE)
#else
#define ktxt_lower_bound (((unsigned long)&kernel_thread ) & ~0xfffffL)
/* On SPARC64 and S390X, sys_call_table contains 32-bit entries
* even though pointers are 64 bit quantities.
*/
-#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_S390X_LINUX24_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
#define SYSCALLTYPE unsigned int
#define PROBETYPE int
#else
#define PROBETYPE long
#endif
-#if defined(AFS_S390X_LINUX20_ENV) && !defined(AFS_S390X_LINUX26_ENV)
+#if defined(AFS_S390X_LINUX_ENV) && !defined(AFS_S390X_LINUX_ENV)
#define _SS(x) ((x) << 1)
#define _SX(x) ((x) &~ 1)
#else
int debug_ignore_NR[4]; /* syscalls to ignore for debugging */
} probectl;
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+#if defined(AFS_I386_LINUX_ENV) || defined(AFS_AMD64_LINUX_ENV)
static int check_access(unsigned long, int);
static int check_table_readable(probectl *, PROBETYPE *);
#endif
/* syscall pairs/triplets to probe */
/* On PPC64 and SPARC64, we need to omit the ones that might match both tables */
static tryctl main_try[] = {
-#if !defined(AFS_PPC64_LINUX20_ENV) && !defined(AFS_SPARC64_LINUX20_ENV)
+#if !defined(AFS_PPC64_LINUX_ENV) && !defined(AFS_SPARC64_LINUX_ENV)
#if defined(EXPORTED_SYS_CHDIR)
{ "scan: close+chdir+write", __NR_close, &sys_close, __NR_chdir, &sys_chdir, __NR_write, &sys_write },
#endif
#endif
{ "scan: close+wait4", __NR_close, &sys_close, __NR_wait4, &sys_wait4, -1, 0 },
-#if !defined(AFS_PPC64_LINUX20_ENV) && !defined(AFS_SPARC64_LINUX20_ENV)
+#if !defined(AFS_PPC64_LINUX_ENV) && !defined(AFS_SPARC64_LINUX_ENV)
#if defined(EXPORTED_SYS_CHDIR)
{ "scan: close+chdir", __NR_close, &sys_close, __NR_chdir, &sys_chdir, -1, 0 },
#endif
* other entries, or we might get a sys_ni_syscall into the list and
* the test would no longer work.
*/
-#if defined(AFS_SPARC64_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV)
/* mmap2, fstat64, getmsg, putmsg, modify_ldt */
56, 63, 151, 152, 218,
-#elif defined(AFS_SPARC_LINUX20_ENV)
+#elif defined(AFS_SPARC_LINUX_ENV)
/* memory_ordering, getmsg, putmsg, unimplemented, modify_ldt */
52, 151, 152, 164, 218,
-#else /* !AFS_SPARC_LINUX20_ENV */
+#else /* !AFS_SPARC_LINUX_ENV */
/*
* These 7 syscalls are present in the syscall table on most "older"
* corresponding __NR macros are not defined, so the tests above fail.
* Instead, we just have to know the numbers for these.
*/
-#if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_S390_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
/* break, stty, gtty, ftime, prof, lock, mpx */
17, 31, 32, 35, 44, 53, 56,
#endif
* unimplemented, but the __NR macros are not defined. Again,
* we simply have to know their numbers.
*/
-#ifdef AFS_IA64_LINUX26_ENV
+#ifdef AFS_IA64_LINUX_ENV
/* create_module, query_module, get_kernel_sysms */
1132, 1136, 1135,
#endif
* unimplemented calls are very similar.
* mmap2 and fstat64 are implemented only for 32-bit calls
*/
-#ifdef AFS_PPC64_LINUX20_ENV
+#ifdef AFS_PPC64_LINUX_ENV
/* _mmap2, _fstat64 */
192, 197,
-#endif /* AFS_PPC64_LINUX20_ENV */
+#endif /* AFS_PPC64_LINUX_ENV */
/* Similarly for S390X, with lcown16 and fstat64 */
-#ifdef AFS_S390X_LINUX20_ENV
+#ifdef AFS_S390X_LINUX_ENV
/* lchown16, fstat64 */
16, 197,
#endif
-#endif /* !AFS_SPARC_LINUX20_ENV */
+#endif /* !AFS_SPARC_LINUX_ENV */
0
};
/* unique syscalls for try_harder */
static int main_unique_syscalls[] = {
-#if defined(AFS_SPARC64_LINUX24_ENV) || defined(AFS_SPARC_LINUX24_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_SPARC_LINUX_ENV)
/*
* On SPARC, we need some additional unique calls to make sure
* we don't match the SunOS-compatibility table.
"system call table",
/* syscall number of first entry in table */
-#ifdef AFS_IA64_LINUX20_ENV
+#ifdef AFS_IA64_LINUX_ENV
1024,
#else
0,
main_try, /* array of combinations to try */
/* symbol in section to try scanning */
-#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_S390_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
(unsigned long)&sys_close,
-#elif defined(AFS_AMD64_LINUX26_ENV)
+#elif defined(AFS_AMD64_LINUX_ENV)
/* On this platform, it's in a different section! */
(unsigned long)&generic_ro_fops,
#else
/* default base address for scan */
/* base address bits to force to zero */
/* default length for scan */
-#if defined(AFS_SPARC64_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV)
(unsigned long)(&sys_close),
0xfffff,
0x10000,
-#elif defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#elif defined(AFS_S390_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
/* bleah; this is so suboptimal */
(unsigned long)(&sys_close),
0xfffff,
0x20000,
-#elif defined(AFS_IA64_LINUX20_ENV)
+#elif defined(AFS_IA64_LINUX_ENV)
(unsigned long)(&init_mm),
0x1fffff,
0x30000,
-#elif defined(AFS_AMD64_LINUX26_ENV)
+#elif defined(AFS_AMD64_LINUX_ENV)
(unsigned long)(&generic_ro_fops) - 0x30000,
0,
0x6000,
-#elif defined(AFS_PPC64_LINUX26_ENV)
+#elif defined(AFS_PPC64_LINUX_ENV)
(unsigned long)(&do_signal),
0xfff,
0x400,
/* syscalls to ignore for debugging */
{
-#if defined(AFS_ALPHA_LINUX20_ENV)
+#if defined(AFS_ALPHA_LINUX_ENV)
338,
-#elif defined(AFS_AMD64_LINUX20_ENV)
+#elif defined(AFS_AMD64_LINUX_ENV)
183,
-#elif defined(AFS_IA64_LINUX20_ENV)
+#elif defined(AFS_IA64_LINUX_ENV)
1141,
-#elif defined(AFS_SPARC_LINUX20_ENV) || defined(AFS_SPARC64_LINUX20_ENV)
+#elif defined(AFS_SPARC_LINUX_ENV) || defined(AFS_SPARC64_LINUX_ENV)
227,
#else
137,
/********** Probing Configuration: amd64 ia32_sys_call_table **********/
-#if defined(AFS_AMD64_LINUX20_ENV)
+#if defined(AFS_AMD64_LINUX_ENV)
/* syscall pairs/triplets to probe */
static tryctl ia32_try[] = {
/********** Probing Configuration: IA64 **********/
-#elif defined(AFS_IA64_LINUX20_ENV)
+#elif defined(AFS_IA64_LINUX_ENV)
struct fptr {
void *ip;
unsigned long gp;
/********** Probing Configuration: ppc64, sparc64 sys_call_table32 **********/
-#elif defined(AFS_PPC64_LINUX20_ENV) || defined(AFS_SPARC64_LINUX20_ENV)
+#elif defined(AFS_PPC64_LINUX_ENV) || defined(AFS_SPARC64_LINUX_ENV)
struct fptr {
void *ip;
unsigned long gp;
/* zapped syscalls for try_harder */
static int sct32_zapped_syscalls[] = {
-#ifdef AFS_PPC64_LINUX20_ENV
+#ifdef AFS_PPC64_LINUX_ENV
/* These should be sufficient */
__NR_break, __NR_stty, __NR_gtty, __NR_ftime,
__NR_prof, __NR_lock, __NR_mpx,
#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
/* memory_ordering, getmsg, putmsg, unimplemented, modify_ldt */
52, 151, 152, 164, 218,
#endif
/* unique syscalls for try_harder */
/* mmap2 and fstat64 are implemented only for 32-bit calls */
static int sct32_unique_syscalls[] = {
-#ifdef AFS_PPC64_LINUX20_ENV
+#ifdef AFS_PPC64_LINUX_ENV
/* _mmap2, _fstat64 */
192, 197,
#endif
-#ifdef AFS_SPARC64_LINUX24_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
/*
* On SPARC, we need some additional unique calls to make sure
* we don't match the SunOS-compatibility table.
sct32_try, /* array of combinations to try */
/* symbol in section to try scanning */
-#if defined(AFS_SPARC64_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV)
(unsigned long)&sys_close,
#else
(unsigned long)&init_mm,
/* default base address for scan */
/* base address bits to force to zero */
/* default length for scan */
-#if defined(AFS_SPARC64_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV)
(unsigned long)(&sys_close),
0xfffff,
0x10000,
-#elif defined(AFS_PPC64_LINUX26_ENV)
+#elif defined(AFS_PPC64_LINUX_ENV)
(unsigned long)(&do_signal),
0xfff,
0x400,
/* syscalls to ignore for debugging */
{
-#if defined(AFS_SPARC64_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV)
227,
#else
137,
* On earlier versions, the two tables were interleaved and so
* have related base addresses.
*/
-#elif defined(AFS_S390X_LINUX26_ENV)
+#elif defined(AFS_S390X_LINUX_ENV)
/* syscall pairs/triplets to probe */
/* nothing worthwhile is exported, so this is empty */
PROBETYPE *x;
int i, j;
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+#if defined(AFS_I386_LINUX_ENV) || defined(AFS_AMD64_LINUX_ENV)
i = check_table_readable(P, ptr);
if (i >= 0) return i;
#endif
int ret;
PROBETYPE *ptr;
-#if defined(AFS_IA64_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
+#if defined(AFS_IA64_LINUX_ENV) || defined(AFS_PPC64_LINUX_ENV)
ip1 = T->fn1 ? (unsigned long)((struct fptr *)T->fn1)->ip : 0;
ip2 = T->fn2 ? (unsigned long)((struct fptr *)T->fn2)->ip : 0;
ip3 = T->fn3 ? (unsigned long)((struct fptr *)T->fn3)->ip : 0;
return 0;
for (offset = 0; offset < datalen; offset++, aptr++) {
-#if defined(AFS_PPC64_LINUX20_ENV)
+#if defined(AFS_PPC64_LINUX_ENV)
ptr = (PROBETYPE*)(*aptr);
if ((unsigned long)ptr <= KERNELBASE) {
continue;
ptr = aptr;
#endif
if ((unsigned long)ptr < init_mm.start_code ||
-#if defined(AFS_AMD64_LINUX20_ENV)
+#if defined(AFS_AMD64_LINUX_ENV)
(unsigned long)ptr > init_mm.brk)
#else
(unsigned long)ptr > init_mm.end_data)
unsigned long ip1;
int i, s;
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+#if defined(AFS_I386_LINUX_ENV) || defined(AFS_AMD64_LINUX_ENV)
i = check_table_readable(P, p);
if (i >= 0) return 0;
#endif
}
}
-#if defined(AFS_IA64_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
+#if defined(AFS_IA64_LINUX_ENV) || defined(AFS_PPC64_LINUX_ENV)
ip1 = P->verify_fn ? (unsigned long)((struct fptr *)(P->verify_fn))->ip : 0;
#else
ip1 = (unsigned long)(P->verify_fn);
#endif
for (offset = 0; offset < datalen; offset++, ptr++) {
if ((unsigned long)ptr < init_mm.start_code ||
-#if defined(AFS_AMD64_LINUX20_ENV)
+#if defined(AFS_AMD64_LINUX_ENV)
(unsigned long)ptr > init_mm.brk)
#else
(unsigned long)ptr > init_mm.end_data)
{
tryctl *T;
void *answer;
-#if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_S390_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
void *answer2;
#endif
#ifdef OSI_PROBE_DEBUG
for (T = P->trylist; T->name; T++) {
answer = try(P, T, B, L);
-#if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_S390_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
answer2 = try(P, T, (PROBETYPE *)(2 + (void *)B), L);
#ifdef OSI_PROBE_DEBUG
if (probe_debug & 0x0003) {
/* XXX more checks here */
answer = try_harder(P, B, L);
-#if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+#if defined(AFS_S390_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
answer2 = try_harder(P, (PROBETYPE *)(2 + (void *)B), L);
#ifdef OSI_PROBE_DEBUG
if (probe_debug & 0x0005) {
#endif
}
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+#if defined(AFS_I386_LINUX_ENV) || defined(AFS_AMD64_LINUX_ENV)
static int check_access(unsigned long address, int mode)
{
pgd_t *pgd = pgd_offset_k(address);
return 0;
}
printk("Found %s at 0x%lx (%s)\n", P->desc, (unsigned long)answer, method);
-#if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+#if defined(AFS_I386_LINUX_ENV) || defined(AFS_AMD64_LINUX_ENV)
if (!check_access((unsigned long)answer, 1)) {
printk("Address 0x%lx is not writable.\n", (unsigned long)answer);
printk("System call hooks will not be installed; proceeding anyway\n");
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
# include <asm/ia32_unistd.h>
#endif
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
#include <asm/ia32_unistd.h>
#endif
* even though pointers are 64 bit quantities.
* XXX unify this with osi_probe.c
*/
-#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_S390X_LINUX24_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_S390X_LINUX_ENV)
#define SYSCALLTYPE unsigned int
#define POINTER2SYSCALL (unsigned int)(unsigned long)
#define SYSCALL2POINTER (void *)(long)
#define SYSCALL2POINTER (void *)
#endif
-#if defined(AFS_S390X_LINUX24_ENV)
+#if defined(AFS_S390X_LINUX_ENV)
#define INSERT_SYSCALL(SLOT, TMPPAGE, FUNC) \
if (SYSCALL2POINTER FUNC > 0x7fffffff) { \
TMPPAGE = kmalloc ( PAGE_SIZE, GFP_DMA|GFP_KERNEL ); \
afs_sys_call_table[_S(SLOT)] = POINTER2SYSCALL FUNC;
#endif
-#if defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_IA64_LINUX_ENV)
#define _S(x) ((x)-1024)
#else
#define _S(x) x
static SYSCALLTYPE *afs_sys_call_table;
static SYSCALLTYPE afs_ni_syscall = 0;
-#ifdef AFS_S390X_LINUX24_ENV
+#ifdef AFS_S390X_LINUX_ENV
static void *afs_sys_setgroups_page = 0;
#if defined(__NR_setgroups32)
static void *afs_sys_setgroups32_page = 0;
__kernel_gid32_t * grouplist);
/***** AMD64 *****/
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
static SYSCALLTYPE *afs_ia32_sys_call_table;
static SYSCALLTYPE ia32_ni_syscall = 0;
asmlinkage long (*sys32_setgroupsp) (int gidsetsize, u16 * grouplist);
extern asmlinkage long afs32_xsetgroups32(int gidsetsize, gid_t * grouplist);
asmlinkage long (*sys32_setgroups32p) (int gidsetsize, gid_t * grouplist);
-#endif /* AFS_AMD64_LINUX20_ENV */
+#endif /* AFS_AMD64_LINUX_ENV */
/***** PPC64 *****/
-#ifdef AFS_PPC64_LINUX26_ENV
+#ifdef AFS_PPC64_LINUX_ENV
static SYSCALLTYPE *afs_sys_call_table32;
static SYSCALLTYPE afs_ni_syscall32 = 0;
static SYSCALLTYPE old_sys_setgroupsp = 0;
printf("*** error! sys32_setgroups_stub called\n");
}
-#endif /* AFS_PPC64_LINUX26_ENV */
+#endif /* AFS_PPC64_LINUX_ENV */
/***** SPARC64 *****/
-#ifdef AFS_SPARC64_LINUX26_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
static SYSCALLTYPE *afs_sys_call_table32;
static SYSCALLTYPE afs_ni_syscall32 = 0;
"ret\n\t"
"nop");
}
-#endif /* AFS_SPARC64_LINUX20_ENV */
+#endif /* AFS_SPARC64_LINUX_ENV */
/***** IA64 *****/
-#ifdef AFS_IA64_LINUX20_ENV
+#ifdef AFS_IA64_LINUX_ENV
asmlinkage long
afs_syscall_stub(int r0, int r1, long r2, long r3, long r4, long gp)
unsigned long gp;
};
-#endif /* AFS_IA64_LINUX20_ENV */
+#endif /* AFS_IA64_LINUX_ENV */
/***** PPC64 *****
* Spring 2005
* Horst Birthelmer <Horst.Birthelmer@sysgo.de>
* Marius Groeger <Marius.Groeger@sysgo.de>
*/
-#if defined(AFS_PPC64_LINUX26_ENV)
+#if defined(AFS_PPC64_LINUX_ENV)
extern void flush_cache(void *, unsigned long);
#define PPC_LO(v) ((v) & 0xffff)
#define PPC_HI(v) (((v) >> 16) & 0xffff)
PPC64_STUB(afs_sys_call_stub);
PPC64_STUB(afs_xsetgroups_stub);
PPC64_STUB(afs_xsetgroups32_stub);
-#endif /* AFS_PPC64_LINUX26_ENV */
+#endif /* AFS_PPC64_LINUX_ENV */
/**********************************************************************/
int osi_syscall_init(void)
{
/***** IA64 *****/
-#ifdef AFS_IA64_LINUX20_ENV
+#ifdef AFS_IA64_LINUX_ENV
/* This needs to be first because we are declaring variables, and
* also because the handling of syscall pointers is bizarre enough
* that we want to special-case even the "common" part.
/* XXX no 32-bit syscalls on IA64? */
-#elif defined(AFS_PPC64_LINUX26_ENV)
+#elif defined(AFS_PPC64_LINUX_ENV)
afs_sys_call_table = osi_find_syscall_table(0);
if (afs_sys_call_table) {
sys32_setgroupsp = POINTER2SYSCALL sys32_setgroups_stub;
}
/***** COMMON (except IA64 or PPC64) *****/
-#else /* !AFS_IA64_LINUX20_ENV */
+#else /* !AFS_IA64_LINUX_ENV */
afs_sys_call_table = osi_find_syscall_table(0);
if (afs_sys_call_table) {
INSERT_SYSCALL(__NR_setgroups32, afs_sys_setgroups32_page, afs_xsetgroups32)
#endif
}
-#endif /* !AFS_IA64_LINUX20_ENV */
+#endif /* !AFS_IA64_LINUX_ENV */
/***** AMD64 *****/
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
afs_ia32_sys_call_table = osi_find_syscall_table(1);
if (afs_ia32_sys_call_table) {
/* setup AFS entry point for IA32 */
afs_ia32_sys_call_table[__NR_ia32_setgroups32] =
POINTER2SYSCALL afs32_xsetgroups32;
}
-#endif /* AFS_AMD64_LINUX20_ENV */
+#endif /* AFS_AMD64_LINUX_ENV */
/***** SPARC64 *****/
-#ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
afs_sys_call_table32 = osi_find_syscall_table(1);
if (afs_sys_call_table32) {
/* setup AFS entry point for 32-bit SPARC */
afs_sys_call_table32[__NR_setgroups32] =
POINTER2SYSCALL afs32_xsetgroups32;
}
-#endif /* AFS_SPARC64_LINUX20_ENV */
+#endif /* AFS_SPARC64_LINUX_ENV */
return 0;
}
afs_sys_call_table[_S(__NR_afs_syscall)] = afs_ni_syscall;
/* put back setgroups */
-#if defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_IA64_LINUX_ENV)
afs_sys_call_table[_S(__NR_setgroups)] =
POINTER2SYSCALL((struct fptr *)sys_setgroupsp)->ip;
-#elif defined(AFS_PPC64_LINUX26_ENV)
+#elif defined(AFS_PPC64_LINUX_ENV)
afs_sys_call_table[_S(__NR_setgroups)] =
POINTER2SYSCALL old_sys_setgroupsp;
/* put back setgroups32 for PPC64 */
afs_sys_call_table32[__NR_setgroups] =
POINTER2SYSCALL old_sys32_setgroupsp;
-#else /* AFS_IA64_LINUX20_ENV */
+#else /* AFS_IA64_LINUX_ENV */
afs_sys_call_table[_S(__NR_setgroups)] =
POINTER2SYSCALL sys_setgroupsp;
#endif
-#if defined(__NR_setgroups32) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(__NR_setgroups32) && !defined(AFS_IA64_LINUX_ENV)
/* put back setgroups32 */
afs_sys_call_table[__NR_setgroups32] = POINTER2SYSCALL sys_setgroups32p;
#endif
-#if defined(AFS_S390X_LINUX24_ENV)
-#if defined(__NR_setgroups32) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_S390X_LINUX_ENV)
+#if defined(__NR_setgroups32) && !defined(AFS_IA64_LINUX_ENV)
if (afs_sys_setgroups32_page)
kfree(afs_sys_setgroups32_page);
#endif
/***** IA64 *****/
-#ifdef AFS_IA64_LINUX20_ENV
+#ifdef AFS_IA64_LINUX_ENV
/* XXX no 32-bit syscalls on IA64? */
#endif
/***** AMD64 *****/
-#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef AFS_AMD64_LINUX_ENV
if (afs_ia32_sys_call_table) {
/* put back AFS entry point for IA32 */
afs_ia32_sys_call_table[__NR_ia32_afs_syscall] =
/***** SPARC64 *****/
-#ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
if (afs_sys_call_table32) {
/* put back AFS entry point for 32-bit SPARC */
afs_sys_call_table32[__NR_afs_syscall] = afs_ni_syscall32;
#include <arpa/inet.h>
#endif /* AFS_USR_HPUX_ENV */
-#ifdef AFS_USR_LINUX22_ENV
+#ifdef AFS_USR_LINUX_ENV
#include <sys/ioctl.h> /* _IOW() */
#include <sys/uio.h> /* struct iovec */
#include <sys/time.h> /* struct timeval */
#include <netdb.h>
#include <arpa/inet.h>
#define FREAD 0x0001
-#endif /* AFS_USR_LINUX22_ENV */
+#endif /* AFS_USR_LINUX_ENV */
#if defined(AFS_USR_DARWIN_ENV) || defined(AFS_USR_FBSD_ENV) || defined(AFS_USR_DFBSD_ENV)
#ifdef _KERNEL
#include <resolv.h>
/* glibc 2.2 has pthread_attr_setstacksize */
-#if (defined(AFS_LINUX22_ENV) && !defined(AFS_USR_LINUX22_ENV)) || (defined(AFS_USR_LINUX22_ENV) && (__GLIBC_MINOR__ < 2))
+#if (defined(AFS_LINUX_ENV) && !defined(AFS_USR_LINUX_ENV)) || (defined(AFS_USR_LINUX_ENV) && (__GLIBC_MINOR__ < 2))
#define pthread_attr_setstacksize(a,b) 0
#endif
attrs->va_atime.tv_nsec = attrs->va_mtime.tv_nsec =
attrs->va_ctime.tv_nsec = 0;
attrs->va_gen = hgetlo(avc->f.m.DataVersion);
-#elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV) || defined(AFS_LINUX26_ENV)
+#elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV) || defined(AFS_LINUX_ENV)
attrs->va_atime.tv_nsec = attrs->va_mtime.tv_nsec =
attrs->va_ctime.tv_nsec =
(hgetlo(avc->f.m.DataVersion) & 0x7ffff) * 1000;
/* If it's the root of AFS, replace the inode number with the
* inode number of the mounted on directory; otherwise this
* confuses getwd()... */
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
if (avc == afs_globalVp) {
struct inode *ip = AFSTOV(avc)->i_sb->s_root->d_inode;
attrs->va_nodeid = ip->i_ino; /* VTOI()? */
}
# endif /* AFS_DARWIN80_ENV */
}
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
}
afs_PutUser(au, READ_LOCK);
}
#elif defined(AFS_AIX_ENV)
/* Boy, was this machine dependent bogosity hard to swallow????.... */
if (av->va_mode != -1) {
-#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_MODE) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_MODE) {
}
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(av, va_gid)) {
-#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_GID) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_GID) {
}
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(av, va_uid)) {
-#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_UID) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_UID) {
}
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(av, va_modify_time)) {
-#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
if (av->va_mask & ATTR_MTIME) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (av->va_mask & AT_MTIME) {
#endif /* AFS_DARWIN80_ENV */
mask |= AFS_SETMODTIME;
#ifndef AFS_SGI_ENV
-# if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_LINUX26_ENV)
+# if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_LINUX_ENV)
if (av->va_mtime.tv_nsec == -1)
# else
if (av->va_mtime.tv_usec == -1)
OSI_VC_CONVERT(avc);
AFS_STATCNT(afs_setattr);
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX_ENV)
afs_Trace4(afs_iclSetp, CM_TRACE_SETATTR, ICL_TYPE_POINTER, avc,
ICL_TYPE_INT32, attrs->va_mask, ICL_TYPE_OFFSET,
ICL_HANDLE_OFFSET(attrs->va_size), ICL_TYPE_OFFSET,
*/
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(attrs, va_data_size)) {
-#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
if (attrs->va_mask & ATTR_SIZE) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (attrs->va_mask & AT_SIZE) {
#endif
#if defined(AFS_DARWIN80_ENV)
if (VATTR_IS_ACTIVE(attrs, va_data_size)) {
-#elif defined(AFS_LINUX22_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
if (attrs->va_mask & ATTR_SIZE) {
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
if (attrs->va_mask & AT_SIZE) {
} else {
code = afs_TruncateAllSegments(avc, tsize, treq, acred);
}
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/* We must update the Linux kernel's idea of file size as soon as
* possible, to avoid racing with delayed writepages delivered by
* pdflush */
if (code == 0)
i_size_write(AFSTOV(avc), tsize);
-#endif /* AFS_LINUX26_ENV */
+#endif /* AFS_LINUX_ENV */
#if defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV)
vnode_pager_setsize(vp, (u_long) tsize);
#endif
#include "afs/param.h"
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_OBSD_ENV) && !defined(AFS_NBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_OBSD_ENV) && !defined(AFS_NBSD_ENV)
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* statistics */
}
-#endif /* !AFS_LINUX20_ENV */
+#endif /* !AFS_LINUX_ENV */
flock->l_pid = clid;
}
}
-#elif defined(AFS_LINUX20_ENV) || defined(AFS_HPUX_ENV)
+#elif defined(AFS_LINUX_ENV) || defined(AFS_HPUX_ENV)
void
lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp, int clid)
{
#if defined(AFS_SUN5_ENV)
proc_t *procp = ttoproc(curthread);
#else
-#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
+#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#ifdef AFS_SGI64_ENV
afs_proc_t *procp = curprocp;
#elif defined(UKERNEL)
}
#endif
if ((flock1->l_pid == alp->pid) ||
-#if defined(AFS_AIX41_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_HPUX_ENV)
+#if defined(AFS_AIX41_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_HPUX_ENV)
(!onlymine && (flock1->l_pid == getppid()))
#else
#if defined(AFS_SGI65_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
lastWarnTime = avc->lastBRLWarnTime = now;
lastWarnPid = pid;
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
message = "byte-range locks only enforced for processes on this machine";
#else
message = "byte-range lock/unlock ignored; make sure no one else is running this program";
* We only do this if the entry looks clear.
*/
afs_ProcessFS(tvcp, &statsp[i], areqp);
-#if defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX_ENV)
afs_fill_inode(AFSTOV(tvcp), NULL); /* reset inode operations */
#endif
goto done;
}
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/*
* Special case of the dynamic mount volume in a static root.
* This is really unfortunate, but we need this for the translator.
code = EACCES;
goto done;
}
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
if (tvc->mvstat == AFS_MVSTAT_ROOT) { /* we don't trust the dnlc for root vcaches */
AFS_RELE(AFSTOV(tvc));
*avcp = 0;
code = 0;
hit = 1;
goto done;
-#endif /* linux22 */
+#endif /* AFS_LINUX_ENV */
}
{ /* sub-block just to reduce stack usage */
if (!hit && (force_eval || tvc->mvstat != AFS_MVSTAT_MTPT)) {
osi_dnlc_enter(adp, aname, tvc, &versionNo);
} else {
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
/* So Linux inode cache is up to date. */
code = afs_VerifyVCache(tvc, treq);
#else
if (writing)
tvc->execsOrWriters++;
tvc->opens++;
-#if defined(AFS_SGI_ENV) || defined (AFS_LINUX26_ENV)
+#if defined(AFS_SGI_ENV) || defined (AFS_LINUX_ENV)
if (writing && tvc->cred == NULL) {
crhold(acred);
tvc->cred = acred;
AFS_GUNLOCK();
code = VOP_RDWR(tfile->vnode, tuiop, UIO_READ, 0, afs_osi_credp);
AFS_GLOCK();
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
AFS_GUNLOCK();
code = osi_rdwr(tfile, tuiop, UIO_READ);
AFS_GLOCK();
}
-#if !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_LINUX_ENV)
/* Changes to afs_readdir which affect dcache or vcache handling or use of
* bulk stat data should also be reflected in the Linux specific verison of
* the readdir routine.
return code;
}
-#endif /* !AFS_LINUX20_ENV */
+#endif /* !AFS_LINUX_ENV */
#include "afs/param.h"
-#if !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
+#if !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN80_ENV)
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
return code;
}
-#endif /* !AFS_HPUX_ENV && !AFS_SGI_ENV && !AFS_LINUX20_ENV */
+#endif /* !AFS_HPUX_ENV && !AFS_SGI_ENV && !AFS_LINUX_ENV */
code = VOP_RDWR(tfile->vnode, tuiop, UIO_WRITE, 0, afs_osi_credp);
AFS_GLOCK();
}
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
AFS_GUNLOCK();
code = osi_rdwr(tfile, tuiop, UIO_WRITE);
AFS_GLOCK();
#if defined(AFS_HPUX102_ENV)
#define AFS_FLOCK k_flock
#else
-#if defined(AFS_SUN5_ENV) || (defined(AFS_LINUX24_ENV) && !(defined(AFS_LINUX26_ENV) && defined(AFS_LINUX_64BIT_KERNEL)))
+#if defined(AFS_SUN5_ENV) || (defined(AFS_LINUX_ENV) && !(defined(AFS_LINUX_ENV) && defined(AFS_LINUX_64BIT_KERNEL)))
#define AFS_FLOCK flock64
#else
#define AFS_FLOCK flock
struct AFSFid fid;
};
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
/* On Linux, we have to be able to allocate the storage for this using
* kmalloc, as otherwise we may deadlock. So, it needs to be able to fit
* in a single page
#elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV)
#define VREFCOUNT(v) ((v)->vrefCount)
#define VREFCOUNT_GT(v, y) (AFSTOV(v)->v_usecount > (y))
-#elif defined(AFS_LINUX24_ENV)
+#elif defined(AFS_LINUX_ENV)
#define VREFCOUNT(v) atomic_read(&(AFSTOV(v)->v_count))
#define VREFCOUNT_GT(v, y) (VREFCOUNT(v)>y)
#define VREFCOUNT_SET(v, c) atomic_set(&(AFSTOV(v)->v_count), c)
};
#define VTOAFS(v) ((((struct nbvdata *)((v)->v_data)))->afsvc)
#define AFSTOV(vc) ((vc)->v)
-#elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_SUN511_ENV) || (defined(AFS_LINUX22_ENV) && !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE))
+#elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_SUN511_ENV) || (defined(AFS_LINUX_ENV) && !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE))
#define VTOAFS(v) ((struct vcache *)(v)->v_data)
#define AFSTOV(vc) ((vc)->v)
#else
* !(avc->nextfree) && !avc->vlruq.next => (FreeVCList == avc->nextfree)
*/
struct vcache {
-#if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_SUN511_ENV) || (defined(AFS_LINUX22_ENV) && !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE))
+#if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_SUN511_ENV) || (defined(AFS_LINUX_ENV) && !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE))
struct vnode *v;
#else
struct vnode v; /* Has reference count in v.v_count */
#endif
struct afs_q vlruq; /* lru q next and prev */
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
struct vcache *nextfree; /* next on free list (if free) */
#endif
struct vcache *hnext; /* Hash next */
char cachingStates; /* Caching policies for this file */
afs_uint32 cachingTransitions; /* # of times file has flopped between caching and not */
-#if defined(AFS_LINUX24_ENV)
+#if defined(AFS_LINUX_ENV)
off_t next_seq_offset; /* Next sequential offset (used by prefetch/readahead) */
#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI65_ENV)
off_t next_seq_blk_offset; /* accounted in blocks for Solaris & IRIX */
struct bhv_desc vc_bhv_desc; /* vnode's behavior data. */
#endif
#endif /* AFS_SGI_ENV */
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
cred_t *cred; /* last writer's cred */
#endif
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
struct dentry *target_link; /* dentry we prefer, when we are redirecting
* all requests due to duplicate dentry aliases.
* See LINUX/osi_vnodeops.c. Note that this is
void *vpacRock; /* used to read or write in visible partitions */
#endif
afs_uint32 lastBRLWarnTime; /* last time we warned about byte-range locks */
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
spinlock_t pagewriter_lock;
struct list_head pagewriters; /* threads that are writing vm pages */
#endif
};
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
struct pagewriter {
struct list_head link;
pid_t writer;
* the size correctly.
*/
typedef ino64_t afs_ufs_dcache_id_t;
-#elif defined(AFS_LINUX26_ENV)
+#elif defined(AFS_LINUX_ENV)
#define MAX_FH_LEN 10
typedef union {
#if defined(NEW_EXPORT_OPS)
} afs_ufs_dcache_id_t;
extern int cache_fh_type;
extern int cache_fh_len;
-#elif defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_S390X_LINUX24_ENV)
+#elif defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_S390X_LINUX_ENV)
typedef long afs_ufs_dcache_id_t;
#elif defined(AFS_AIX51_ENV) || defined(AFS_HPUX1123_ENV)
typedef ino_t afs_ufs_dcache_id_t;
#elif defined (AFS_DARWIN110_ENV)
#define afs_cr_uid(cred) kauth_cred_getuid((kauth_cred_t)(cred))
#define afs_cr_gid(cred) kauth_cred_getgid((kauth_cred_t)(cred))
-#elif !(defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED))
+#elif !(defined(AFS_LINUX_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED))
#define afs_cr_uid(cred) ((cred)->cr_uid)
#define afs_cr_gid(cred) ((cred)->cr_gid)
#if !defined(AFS_OBSD_ENV)
/* no cond member */
#elif defined(AFS_FBSD_ENV) || defined(AFS_OBSD_ENV)
int cond; /* "all this gluck should probably be replaced by CVs" */
-#elif defined(AFS_LINUX24_ENV)
+#elif defined(AFS_LINUX_ENV)
wait_queue_head_t cond;
#elif defined(AFS_NBSD_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
kcondvar_t cond; /* Currently associated condition variable */
#include "afs/sysincludes.h" /* Standard vendor system headers */
#ifndef UKERNEL
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_FBSD_ENV)
#include <net/if.h>
#include <netinet/in.h>
#endif
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif
#endif /* !UKERNEL */
#include "afs/sysincludes.h"
#include "afsincludes.h"
#if !defined(UKERNEL)
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
# include "h/param.h"
#endif
#include "h/types.h"
#if defined(AFS_AIX31_ENV)
#include "h/limits.h"
#endif
-#if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX_ENV)
#include "h/kernel.h" /* Doesn't needed, so it should go */
#endif
#endif /* !defined(UKERNEL) */
#include "afsint.h"
#include "afs/lock.h"
-#if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
+#if !defined(UKERNEL) && !defined(AFS_LINUX_ENV)
#include "h/buf.h"
#endif /* !defined(UKERNEL) */
u_offset_t offset;
struct seg *segment;
caddr_t address;
-#elif defined(AFS_LINUX24_ENV) || defined(UKERNEL)
+#elif defined(AFS_LINUX_ENV) || defined(UKERNEL)
/* The tested platform, as CITI impl. just packs ab->parms */
struct uio *auio;
struct vrequest *areq;
#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
#if !defined(UKERNEL)
-# if !defined(AFS_LINUX20_ENV)
+# if !defined(AFS_LINUX_ENV)
# include "net/if.h"
# ifdef AFS_SGI62_ENV
# include "h/hashing.h"
#define AFS_MINBUFFERS 50
#endif
-#if (defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV) || defined(AFS_DARWIN80_ENV)) && !defined(UKERNEL)
+#if (defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_DARWIN80_ENV)) && !defined(UKERNEL)
/* If AFS_DAEMONOP_ENV is defined, it indicates we run "daemon" AFS syscalls by
* spawning a kernel thread to do the work, instead of running them in the
* calling process. */
#endif
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
struct afsd_thread_info {
# if !defined(INIT_WORK_HAS_DATA)
struct work_struct tq;
int (*sys_setpriority) (int, int, int) = sys_call_table[__NR_setpriority];
# endif
# if !defined(HAVE_LINUX_KTHREAD_RUN)
-# if defined(AFS_LINUX26_ENV)
+# if defined(AFS_LINUX_ENV)
daemonize("afsd");
# else
daemonize();
/* doesn't do much, since we were forked from keventd, but
* does call mm_release, which wakes up our parent (since it
* used CLONE_VFORK) */
-# if !defined(AFS_LINUX26_ENV)
+# if !defined(AFS_LINUX_ENV)
reparent_to_init();
# endif
afs_osi_MaskSignals();
}
void
-# if defined(AFS_LINUX26_ENV) && !defined(INIT_WORK_HAS_DATA)
+# if defined(AFS_LINUX_ENV) && !defined(INIT_WORK_HAS_DATA)
afsd_launcher(struct work_struct *work)
# else
afsd_launcher(void *rock)
# endif
{
-# if defined(AFS_LINUX26_ENV) && !defined(INIT_WORK_HAS_DATA)
+# if defined(AFS_LINUX_ENV) && !defined(INIT_WORK_HAS_DATA)
struct afsd_thread_info *rock = container_of(work, struct afsd_thread_info, tq);
# endif
long parm6)
{
DECLARE_COMPLETION(c);
-# if defined(AFS_LINUX26_ENV)
+# if defined(AFS_LINUX_ENV)
# if defined(INIT_WORK_HAS_DATA)
struct work_struct tq;
# endif
}
info.complete = &c;
info.parm = parm;
-# if defined(AFS_LINUX26_ENV)
+# if defined(AFS_LINUX_ENV)
# if !defined(INIT_WORK_HAS_DATA)
INIT_WORK(&info.tq, afsd_launcher);
schedule_work(&info.tq);
while (!afs_InitSetup_done)
afs_osi_Sleep(&afs_InitSetup_done);
-#if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SUN5_ENV)
+#if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SUN5_ENV)
temp = AFS_MINBUFFERS; /* Should fix this soon */
#else
/* number of 2k buffers we could get from all of the buffer space */
afs_SynchronousCloses = 'S';
} else if (parm == AFSOP_GETMTU) {
afs_uint32 mtu = 0;
-#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX_ENV)
# ifdef AFS_USERSPACE_IP_ADDR
afs_int32 i;
i = rxi_Findcbi(parm2);
out:
AFS_GUNLOCK();
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
return -code;
#else
return code;
*/
/* Sanity check on the callback queue. Allow for slop in the computation. */
-#if defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX_ENV)
#define CBQ_LIMIT (afs_maxvcount + 10)
#else
#define CBQ_LIMIT (afs_cacheStats + afs_stats_cmperf.vcacheXAllocs + 10)
#include "afs/sysincludes.h" /* Standard vendor system headers */
#if !defined(UKERNEL)
-#if !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <net/if.h>
#endif
#include <netinet/in.h>
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif /* ! AFS_HPUX110_ENV */
#endif /* !defined(UKERNEL) */
* count to zero and fs checkv is executed when the current
* directory is /afs.
*/
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
osi_ResetRootVCache(volid);
#else
# ifdef AFS_DARWIN80_ENV
struct dcache *tdc = NULL;
struct vcache *tvc = NULL;
struct vnode *tvn = NULL;
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
struct dentry *dp = NULL;
#endif
afs_size_t offset, len;
return;
}
AFS_GUNLOCK();
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
code = gop_lookupname((char *)ab->ptr_parm[0], AFS_UIOSYS, 1, &dp);
if (dp)
tvn = (struct vnode *)dp->d_inode;
if (!tvn || !IsAfsVnode(tvn)) {
/* release it and give up */
if (tvn) {
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
dput(dp);
#else
AFS_RELE(tvn);
if (tdc) {
afs_PutDCache(tdc);
}
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
dput(dp);
#else
AFS_RELE(tvn);
}
} else {
/* Add any other 'complex' inode types here ... */
-#if !defined(AFS_LINUX26_ENV) && !defined(AFS_CACHE_VNODE_PATH)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_CACHE_VNODE_PATH)
tdc->f.inode.ufs = ainode;
#else
osi_Panic("Can't init cache with inode numbers when complex inodes are "
#include "afs/sysincludes.h" /* Standard vendor system headers */
#ifndef UKERNEL
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_FBSD_ENV)
#include <net/if.h>
#include <netinet/in.h>
#endif
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif
#endif /* !UKERNEL */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
-#if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
+#if !defined(UKERNEL) && !defined(AFS_LINUX_ENV)
#include "net/if.h"
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* afs statistics */
#include "rx/rxstat.h"
-#if defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
+#if defined(AFS_LINUX_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
# include <linux/cred.h>
#endif
afs_int32 cacheInfoModTime; /*Last time cache info modified */
#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV)
struct mount *afs_cacheVfsp = 0;
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
struct super_block *afs_cacheSBp = 0;
#else
struct vfs *afs_cacheVfsp = 0;
#endif
afs_rwlock_t afs_discon_lock;
extern afs_rwlock_t afs_disconDirtyLock;
-#if defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
+#if defined(AFS_LINUX_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
const struct cred *cache_creds;
#endif
if (code) {
return code;
}
-#if defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
+#if defined(AFS_LINUX_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
/*
* Save current credentials for later access to disk cache files.
* If selinux, apparmor or other security modules are enabled,
{
afs_int32 code;
-#if defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX_ENV)
struct dentry *dp;
code = gop_lookupname(filename, AFS_UIOSYS, 0, &dp);
if (code)
return code;
osi_get_fh(dp, inode);
dput(dp);
-#else /* AFS_LINUX22_ENV */
+#else /* AFS_LINUX_ENV */
struct vnode *filevp;
code = gop_lookupname(filename, AFS_UIOSYS, 0, &filevp);
if (code)
else {
AFS_RELE(filevp);
}
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
return 0;
}
struct osi_stat tstat;
struct osi_file *tfile;
struct afs_fheader theader;
-#ifndef AFS_LINUX22_ENV
+#ifndef AFS_LINUX_ENV
struct vnode *filevp;
#endif
int goodFile;
AFS_STATCNT(afs_InitCacheInfo);
if (cacheDiskType != AFS_FCACHE_TYPE_UFS)
osi_Panic("afs_InitCacheInfo --- called for non-ufs cache!");
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
code = osi_InitCacheInfo(afile);
if (code)
return code;
if (!VFS_STATVFS(filevp->v_vfsp, &st))
# elif defined(AFS_AIX41_ENV)
if (!VFS_STATFS(filevp->v_vfsp, &st, &afs_osi_cred))
-# elif defined(AFS_LINUX20_ENV)
+# elif defined(AFS_LINUX_ENV)
{
KERNEL_SPACE_DECL;
TO_USER_SPACE();
afs_fsfragsize = st.f_bsize - 1;
# endif /* AFS_SUN5_ENV || AFS_HPUX100_ENV */
}
-# if defined(AFS_LINUX20_ENV)
+# if defined(AFS_LINUX_ENV)
cacheInode.ufs = filevp->i_ino;
afs_cacheSBp = filevp->i_sb;
# elif defined(AFS_XBSD_ENV)
afs_LookupInodeByPath(afile, &cacheInode.ufs, NULL);
# endif /* !AFS_CACHE_VNODE_PATH */
cacheDev.dev = afs_vnodeToDev(filevp);
-# endif /* AFS_LINUX20_ENV */
+# endif /* AFS_LINUX_ENV */
AFS_RELE(filevp);
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
if (afs_fsfragsize < AFS_MIN_FRAGSIZE) {
afs_fsfragsize = AFS_MIN_FRAGSIZE;
}
memset(&cacheDev, 0, sizeof(struct osi_dev));
osi_dnlc_shutdown();
}
-#if defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
+#if defined(AFS_LINUX_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED)
put_cred(cache_creds);
#endif
} /*shutdown_cache */
{
AFS_STATCNT(shutdown_vnodeops);
if (afs_cold_shutdown) {
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
afs_rd_stash_i = 0;
#endif
shutdown_mariner();
afs_osi_credp = kcred;
#else
memset(&afs_osi_cred, 0, sizeof(afs_ucred_t));
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
afs_set_cr_group_info(&afs_osi_cred, groups_alloc(0));
#endif
#if defined(AFS_DARWIN80_ENV)
afs_osi_cred.cr_ref = 1; /* kauth_cred_get_ref needs 1 existing ref */
#else
-# if !(defined(AFS_LINUX26_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED))
+# if !(defined(AFS_LINUX_ENV) && defined(STRUCT_TASK_STRUCT_HAS_CRED))
crhold(&afs_osi_cred); /* don't let it evaporate */
# endif
#endif
void
afs_osi_MaskSignals(void)
{
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
osi_linux_mask();
#endif
}
void
afs_osi_UnmaskRxkSignals(void)
{
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
osi_linux_unmaskrxk();
#endif
}
void
afs_osi_Invisible(void)
{
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
afs_osi_MaskSignals();
#elif defined(AFS_SUN5_ENV)
curproc->p_flag |= SSYS;
afs_osi_ctxtp_initialized = 0;
}
#endif
-#if !defined(AFS_HPUX_ENV) && !defined(UKERNEL) && !defined(AFS_DFBSD_ENV) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_HPUX_ENV) && !defined(UKERNEL) && !defined(AFS_DFBSD_ENV) && !defined(AFS_LINUX_ENV)
/* LINUX calls this from afs_cleanup() which hooks into module_exit */
shutdown_osisleep();
#endif
afs_osi_Free(tmp, sizeof(*tmp));
#elif defined(AFS_SGI_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_SUN5_ENV)
osi_FreeSmallSpace(tmp);
-#elif defined(AFS_LINUX26_ENV)
+#elif defined(AFS_LINUX_ENV)
kfree(tmp);
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
osi_linux_free(tmp);
#endif
}
#define _AFS_OSI_
#include "h/types.h"
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
#include "h/param.h"
#endif
#include <sys/lock.h>
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#ifndef _LINUX_CODA_FS_I
#define _LINUX_CODA_FS_I
#define _CODA_HEADER_
struct osi_file {
afs_int32 size; /* file size in bytes XXX Must be first field XXX */
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
struct file *filp; /* May need this if we really open the file. */
#else
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
struct dentry dentry; /* merely to hold the pointer to the inode. */
struct file file; /* May need this if we really open the file. */
#else
*
* Darwin, all of the BSDs, and Linux have their own
*/
-#if !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_LINUX_ENV)
# define vType(vc) AFSTOV(vc)->v_type
# define vSetType(vc,type) AFSTOV(vc)->v_type = (type)
# define vSetVfsp(vc,vfsp) AFSTOV(vc)->v_vfsp = (vfsp)
AFS_STATS(afs_stats_cmperf.OutStandingAllocs++);
AFS_STATS(afs_stats_cmperf.OutStandingMemUsage += size);
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
return osi_linux_alloc(size, 1);
#else
return AFS_KALLOC(size);
AFS_STATS(afs_stats_cmperf.OutStandingAllocs--);
AFS_STATS(afs_stats_cmperf.OutStandingMemUsage -= asize);
-#if defined(AFS_LINUX20_ENV)
+#if defined(AFS_LINUX_ENV)
osi_linux_free(x);
#else
AFS_KFREE(x, asize);
genpag(void)
{
AFS_STATCNT(genpag);
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
/* Ensure unique PAG's (mod 200 days) when reloading the client. */
return (('A' << 24) + ((pag_epoch + pagCounter++) & 0xffffff));
-#else /* AFS_LINUX20_ENV */
+#else /* AFS_LINUX_ENV */
return (('A' << 24) + (pagCounter++ & 0xffffff));
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
}
afs_uint32
getpag(void)
{
AFS_STATCNT(getpag);
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
/* Ensure unique PAG's (mod 200 days) when reloading the client. */
return (('A' << 24) + ((pag_epoch + pagCounter) & 0xffffff));
#else
genpag(void)
{
AFS_STATCNT(genpag);
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
return (pag_epoch + pagCounter++);
#else
return (pagCounter++);
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
}
afs_uint32
getpag(void)
{
AFS_STATCNT(getpag);
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
/* Ensure unique PAG's (mod 200 days) when reloading the client. */
return (pag_epoch + pagCounter);
#else
credp = OSI_GET_CURRENT_CRED();
code = AddPag(genpag(), &credp);
}
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
{
afs_ucred_t *credp = crref();
code = AddPag(genpag(), &credp);
credp = OSI_GET_CURRENT_CRED();
code = AddPag(pagval, &credp);
}
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
{
afs_ucred_t *credp = crref();
code = AddPag(pagval, &credp);
int
afs_InitReq(struct vrequest *av, afs_ucred_t *acred)
{
-#if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS)
+#if defined(AFS_LINUX_ENV) && !defined(AFS_NONFSTRANS)
int code;
#endif
if (afs_shuttingdown == AFS_SHUTDOWN)
return EIO;
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
#if !defined(AFS_NONFSTRANS)
if (osi_linux_nfs_initreq(av, acred, &code))
return code;
}
#endif
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/* osi_get_group_pag is defined in <ARCH>/osi_groups.c */
#elif defined(AFS_PAG_ONEGROUP_ENV)
/* osi_get_group_pag is defined in <ARCH>/osi_groups.c */
# if defined(AFS_AIX_ENV)
if (cred->cr_ngrps < 2)
return NOPAG;
-# elif defined(AFS_LINUX26_ENV)
+# elif defined(AFS_LINUX_ENV)
if (afs_cr_group_info(cred)->ngroups < AFS_NUMPAGGROUPS)
return NOPAG;
-# elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_XBSD_ENV)
+# elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_XBSD_ENV)
# if defined(AFS_SUN510_ENV)
if (ngroups < 2) {
# else
return NOPAG;
}
#ifndef AFS_DARWIN110_ENV
-#if defined(AFS_LINUX26_ENV) && defined(LINUX_KEYRING_SUPPORT)
+#if defined(AFS_LINUX_ENV) && defined(LINUX_KEYRING_SUPPORT)
/*
* If linux keyrings are in use and we carry the session keyring in our credentials
* structure, they should be the only criteria for determining
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN80_ENV)
/* This is the common part of the vget VFS call. */
int
afs_osi_vget(struct vcache **avcpp, struct fid *afidp, struct vrequest *areqp)
return code;
}
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
osi_Active(struct vcache *avc)
{
AFS_STATCNT(osi_Active);
-#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || (AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || (AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if ((avc->opens > 0) || (avc->f.states & CMAPPED))
return 1; /* XXX: Warning, verify this XXX */
#elif defined(AFS_SGI_ENV)
#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
#include "rx/rxstat.h"
-#if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
+#if !defined(UKERNEL) && !defined(AFS_LINUX_ENV)
#include "net/if.h"
#include "netinet/in_var.h"
#endif /* !defined(UKERNEL) */
DECL_PIOCTL(PNewUuid);
DECL_PIOCTL(PPrecache);
DECL_PIOCTL(PGetPAG);
-#if defined(AFS_CACHE_BYPASS) && defined(AFS_LINUX24_ENV)
+#if defined(AFS_CACHE_BYPASS) && defined(AFS_LINUX_ENV)
DECL_PIOCTL(PSetCachingThreshold);
#endif
static pioctlFunction OpioctlSw[] = {
PBogus, /* 0 */
PNFSNukeCreds, /* 1 -- nuke all creds for NFS client */
-#if defined(AFS_CACHE_BYPASS) && defined(AFS_LINUX24_ENV)
+#if defined(AFS_CACHE_BYPASS) && defined(AFS_LINUX_ENV)
PSetCachingThreshold /* 2 -- get/set cache-bypass size threshold */
#else
PNoop /* 2 -- get/set cache-bypass size threshold */
return (code);
}
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX_ENV)
struct afs_ioctl_sys {
unsigned int com;
unsigned long arg;
#endif
/* macro to avoid adding any more #ifdef's to pioctl code. */
-#if defined(AFS_LINUX22_ENV) || defined(AFS_AIX41_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_AIX41_ENV)
#define PIOCTL_FREE_CRED() crfree(credp)
#else
#define PIOCTL_FREE_CRED()
#ifdef AFS_NEED_CLIENTCONTEXT
afs_ucred_t *tmpcred = NULL;
#endif
-#if defined(AFS_NEED_CLIENTCONTEXT) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_NEED_CLIENTCONTEXT) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_ucred_t *foreigncreds = NULL;
#endif
afs_int32 code = 0;
#ifdef AFS_AIX41_ENV
struct ucred *credp = crref(); /* don't free until done! */
#endif
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
cred_t *credp = crref(); /* don't free until done! */
struct dentry *dp;
#endif
}
if ((com & 0xff) == PSetClientContext) {
#ifdef AFS_NEED_CLIENTCONTEXT
-#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX_ENV)
code = HandleClientContext(&data, &com, &foreigncreds, credp);
#else
code = HandleClientContext(&data, &com, &foreigncreds, osi_curcred());
* like afs_osi_suser(cred) which, I think, is better since it
* generalizes and supports multi cred environments...
*/
-#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
tmpcred = credp;
credp = foreigncreds;
#elif defined(AFS_AIX41_ENV)
if ((com & 0xff00) >> 8 == 'V' && (com & 0xff) == 15) {
/* special case prefetch so entire pathname eval occurs in helper process.
* otherwise, the pioctl call is essentially useless */
-#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
code =
Prefetch(path, &data, follow,
foreigncreds ? foreigncreds : credp);
lookupname(path, USR, follow, NULL, &vp,
foreigncreds ? foreigncreds : credp);
#else
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
code = gop_lookupname_user(path, AFS_UIOUSER, follow, &dp);
if (!code)
vp = (struct vnode *)dp->d_inode;
#else
code = gop_lookupname_user(path, AFS_UIOUSER, follow, &vp);
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
#endif /* AFS_AIX41_ENV */
AFS_GLOCK();
if (code) {
credp = OSI_GET_CURRENT_CRED();
code = afs_HandlePioctl(vp, com, &data, follow, &credp);
}
-#elif defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#elif defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
code = afs_HandlePioctl(vp, com, &data, follow, &credp);
#elif defined(UKERNEL)
code = afs_HandlePioctl(vp, com, &data, follow,
set_p_cred(u.u_procp, tmpcred); /* restore original credentials */
#elif defined(AFS_SGI_ENV)
OSI_SET_CURRENT_CRED(tmpcred); /* restore original credentials */
-#elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX22_ENV)
+#elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
credp = tmpcred; /* restore original credentials */
#else
osi_curcred() = tmpcred; /* restore original credentials */
}
#endif /* AFS_NEED_CLIENTCONTEXT */
if (vp) {
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
/*
* Holding the global lock when calling dput can cause a deadlock
* when the kernel calls back into afs_dentry_iput
}
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
static_inline int
_settok_setParentPag(afs_ucred_t **cred)
{
#ifdef AFS_AIX51_ENV
newcred->cr_groupset.gs_union.un_groups[0] = g0;
newcred->cr_groupset.gs_union.un_groups[1] = g1;
-#elif defined(AFS_LINUX26_ENV)
+#elif defined(AFS_LINUX_ENV)
# ifdef AFS_PAG_ONEGROUP_ENV
afs_set_cr_group_info(newcred, groups_alloc(1)); /* nothing sets this */
l = (((g0-0x3f00) & 0x3fff) << 14) | ((g1-0x3f00) & 0x3fff);
#endif
#ifdef AFS_AIX_ENV
newcred->cr_ngrps = 2;
-#elif !defined(AFS_LINUX26_ENV) && !defined(AFS_SUN510_ENV)
-# if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_FBSD_ENV)
+#elif !defined(AFS_LINUX_ENV) && !defined(AFS_SUN510_ENV)
+# if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV)
newcred->cr_ngroups = 2;
# else
for (i = 2; i < NGROUPS; i++)
return 0;
}
-#if defined(AFS_CACHE_BYPASS) && defined(AFS_LINUX24_ENV)
+#if defined(AFS_CACHE_BYPASS) && defined(AFS_LINUX_ENV)
DECL_PIOCTL(PSetCachingThreshold)
{
extern int osi_readRandom(void *, afs_size_t);
/* LINUX/osi_misc.c */
-#ifdef AFS_LINUX20_ENV
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
+#ifdef AFS_LINUX_ENV
extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
struct dentry **dpp);
extern int osi_InitCacheInfo(char *aname);
/* ARCH/osi_file.c */
extern int afs_osicred_initialized;
extern void *osi_UFSOpen(afs_dcache_id_t *ainode);
-#if defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX_ENV)
extern void osi_get_fh(struct dentry *dp, afs_ufs_dcache_id_t *ainode);
#endif
extern int afs_osi_Stat(struct osi_file *afile,
# endif /* AFS_XBSD_ENV */
#endif /* UKERNEL */
-#if defined(AFS_LINUX26_ENV) || defined(AFS_PAG_ONEGROUP_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_PAG_ONEGROUP_ENV)
extern afs_int32 osi_get_group_pag(afs_ucred_t *cred);
#endif
extern struct vfs *afs_globalVFS;
#endif
extern struct vcache *afs_globalVp;
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
extern void vcache2inode(struct vcache *avc);
extern void vcache2fakeinode(struct vcache *rootvp, struct vcache *mpvp);
#endif
extern afs_int32 afs_uuid_create(afsUUID * uuid);
extern u_short afs_uuid_hash(afsUUID * uuid);
-#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI62_ENV) || defined(UKERNEL)
+#if defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI62_ENV) || defined(UKERNEL)
#include "osi_prototypes.h"
#endif
#include "afs/sysincludes.h" /* Standard vendor system headers */
#if !defined(UKERNEL)
-# if !defined(AFS_LINUX20_ENV)
+# if !defined(AFS_LINUX_ENV)
# include <net/if.h>
# endif
# include <netinet/in.h>
# ifdef AFS_SGI62_ENV
# include "h/hashing.h"
# endif
-# if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+# if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
# include <netinet/in_var.h>
# endif /* AFS_HPUX110_ENV */
# ifdef AFS_DARWIN_ENV
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h"
#include "rx/rx_globals.h"
-#if !defined(UKERNEL) && !defined(AFS_LINUX20_ENV)
+#if !defined(UKERNEL) && !defined(AFS_LINUX_ENV)
#include "net/if.h"
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
}
#endif /* defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64) */
-#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX_ENV) && !defined(AFS_IA64_LINUX_ENV)
if (afs_in_compat_syscall()) {
struct afs_ioctl32 dst32;
};
-#if defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN5_64BIT_ENV) || (defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)) || defined(NEED_IOCTL32)
+#if defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN5_64BIT_ENV) || (defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX_ENV) && !defined(AFS_IA64_LINUX_ENV)) || defined(NEED_IOCTL32)
static void
iparam32_to_iparam(const struct iparam32 *src, struct iparam *dst)
{
}
#endif /* AFS_SUN5_64BIT_ENV */
-#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX_ENV) && !defined(AFS_IA64_LINUX_ENV)
if (afs_in_compat_syscall()) {
struct iparam32 dst32;
long parm5;
long parm6;
} *uap = (struct a *)args;
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
struct afssysargs {
long syscall;
long parm1;
long linux_ret = 0;
long *retval = &linux_ret;
long eparm[4]; /* matches AFSCALL_ICL in fstrace.c */
-# ifdef AFS_SPARC64_LINUX24_ENV
+# ifdef AFS_SPARC64_LINUX_ENV
afs_int32 eparm32[4];
# endif
/* eparm is also used by AFSCALL_CALL in afsd.c */
return (ENODEV);
}
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
/* setup uap for use below - pull out the magic decoder ring to know
* which syscalls have folded argument lists.
*/
uap->parm2 = parm2;
uap->parm3 = parm3;
if (syscall == AFSCALL_ICL || syscall == AFSCALL_CALL) {
-#ifdef AFS_SPARC64_LINUX24_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
/* from arch/sparc64/kernel/sys_sparc32.c */
#define AA(__x) \
({ unsigned long __ret; \
})
-#ifdef AFS_SPARC64_LINUX26_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
if (test_thread_flag(TIF_32BIT))
#else
if (current->thread.flags & SPARC_FLAG_32BIT)
uap->parm5, (long *)retval);
#endif /* !AFS_NBSD40_ENV */
AFS_GUNLOCK();
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
if (!code) {
/* ICL commands can return values. */
code = -linux_ret; /* Gets negated again at exit below */
setuerror(code);
#endif
}
-#endif /* !AFS_LINUX20_ENV */
+#endif /* !AFS_LINUX_ENV */
} else {
#if defined(KERNEL_HAVE_UERROR)
setuerror(EINVAL);
} /* 32 bit procs */
#endif
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
code = -code;
#endif
return code;
#include "afs/sysincludes.h" /* Standard vendor system headers */
#if !defined(UKERNEL)
-#if !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <net/if.h>
#endif
#include <netinet/in.h>
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif /* ! AFS_HPUX110_ENV */
#endif /* !defined(UKERNEL) */
afs_GCPAGs_cred_count++;
pag = PagInCred(pcred);
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_LINUX22_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_LINUX_ENV)
uid = (pag != NOPAG ? pag : afs_cr_uid(pcred));
#elif defined(AFS_SUN510_ENV)
uid = (pag != NOPAG ? pag : crgetruid(pcred));
#include "afs/sysincludes.h" /* Standard vendor system headers */
#if !defined(UKERNEL)
-#if !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <net/if.h>
#endif
#include <netinet/in.h>
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif /* ! AFS_HPUX110_ENV */
#endif /* !defined(UKERNEL) */
afs_rwlock_t afs_xvcache; /*Lock: alloc new stat cache entries */
afs_rwlock_t afs_xvreclaim; /*Lock: entries reclaimed, not on free list */
afs_lock_t afs_xvcb; /*Lock: fids on which there are callbacks */
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
static struct vcache *freeVCList; /*Free list for stat cache entries */
struct vcache *ReclaimedVCList; /*Reclaimed list for stat entries */
static struct vcache *Initial_freeVCList; /*Initial list for above */
code = EBUSY;
goto bad;
}
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
if (avc->nextfree || !avc->vlruq.prev || !avc->vlruq.next) { /* qv afs.h */
refpanic("LRU vs. Free inconsistency");
}
/* remove entry from the volume hash table */
QRemove(&avc->vhashq);
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
{
struct pagewriter *pw, *store;
struct list_head tofree;
afs_evenZaps++;
afs_vcount--;
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
/* put the entry in the free list */
avc->nextfree = freeVCList;
freeVCList = avc;
} else
osi_Panic("flush vc refcnt < 1");
}
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
return 0;
bad:
void
afs_FlushReclaimedVcaches(void)
{
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
struct vcache *tvc;
int code, fv_slept;
struct vcache *tmpReclaimedVCList = NULL;
*
* Returns 1 if the stat cache looks stressed, and 0 otherwise.
*/
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
int
afs_VCacheStressed(void)
{
return 0;
}
}
-#else /* AFS_LINUX26_ENV */
+#else /* AFS_LINUX_ENV */
int
afs_VCacheStressed(void)
{
}
return 1;
}
-#endif /* AFS_LINUX26_ENV */
+#endif /* AFS_LINUX_ENV */
int
afs_ShakeLooseVCaches(afs_int32 anumber)
afs_FlushReclaimedVcaches();
-#if defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX_ENV)
if(!afsd_dynamic_vcaches && afs_vcount >= afs_maxvcount) {
afs_ShakeLooseVCaches(anumber);
if (afs_vcount >= afs_maxvcount) {
if (tvc == NULL) {
return NULL;
}
-#else /* AFS_LINUX22_ENV */
+#else /* AFS_LINUX_ENV */
/* pull out a free cache entry */
if (!freeVCList) {
afs_ShakeLooseVCaches(anumber);
afs_vcount++; /* balanced by FlushVCache */
} /* end of if (!freeVCList) */
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
#if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV)
if (tvc->v)
* we have to do this after attaching the vnode, because the reference
* count may be held in the vnode itself */
-#if defined(AFS_LINUX22_ENV)
+#if defined(AFS_LINUX_ENV)
/* Hold it for the LRU (should make count 2) */
osi_Assert(osi_vnhold(tvc) == 0);
#elif !(defined (AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV))
void
afs_vcacheInit(int astatSize)
{
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
struct vcache *tvp;
#endif
int i;
if (!afs_maxvcount) {
afs_maxvcount = astatSize; /* no particular limit on linux? */
}
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
freeVCList = NULL;
#endif
AFS_RWLOCK_INIT(&afs_xvcache, "afs_xvcache");
LOCK_INIT(&afs_xvcb, "afs_xvcb");
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
/* Allocate and thread the struct vcache entries */
tvp = afs_osi_Alloc(astatSize * sizeof(struct vcache));
osi_Assert(tvp != NULL);
}
afs_cbrSpace = 0;
-#if !defined(AFS_LINUX22_ENV)
+#if !defined(AFS_LINUX_ENV)
afs_osi_Free(Initial_freeVCList, afs_cacheStats * sizeof(struct vcache));
# ifdef KERNEL_HAVE_PIN
#include "afs/sysincludes.h" /* Standard vendor system headers */
#if !defined(UKERNEL)
-#if !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <net/if.h>
#endif
#include <netinet/in.h>
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif /* ! AFS_HPUX110_ENV */
#endif /* !defined(UKERNEL) */
#if !defined(UKERNEL)
-#if !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_LINUX_ENV)
# include <net/if.h>
# if defined(AFS_SUN5_ENV)
# include <sys/varargs.h>
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include <netinet/in_var.h>
#endif /* ! AFS_HPUX110_ENV */
#endif /* !defined(UKERNEL) */
#include <sys/fp_io.h>
#endif
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
# define afs_vprintf(fmt, ap) vprintk(fmt, ap)
#elif defined(AFS_SGI_ENV)
# define afs_vprintf(fmt, ap) icmn_err(CE_WARN, fmt, ap)
-#elif (defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)) || (defined(AFS_LINUX22_ENV))
+#elif (defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)) || (defined(AFS_LINUX_ENV))
static_inline void
afs_vprintf(const char *fmt, va_list ap)
{
{
va_list ap;
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
AFS_STATCNT(afs_warn);
if ((afs_showflags & GAGCONSOLE) || (afs_showflags & GAGUSER)) {
va_start(ap, fmt);
afs_vwarn(fmt, ap);
va_end(ap);
}
-# else /* AFS_LINUX20_ENV */
+# else /* AFS_LINUX_ENV */
AFS_STATCNT(afs_warn);
if (afs_showflags & GAGCONSOLE) {
va_start(ap, fmt);
afs_vwarnuser(fmt, ap);
va_end(ap);
}
-# endif /* AFS_LINUX20_ENV */
+# endif /* AFS_LINUX_ENV */
}
#endif /* AFS_AIX_ENV */
# elif defined(AFS_HPUX_ENV) || defined(AFS_NBSD_ENV)
# include "osi_vfs.h"
# endif
-# if defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
+# if defined(AFS_SGI_ENV) || defined(AFS_LINUX_ENV)
# include "osi_vfs.h"
# endif
# include "rx/rx.h"
# include "afs/lock.h"
# include "afs/volerrors.h"
# include "afs/voldefs.h"
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# ifdef TRUE
# undef TRUE
# undef FALSE
# endif
# endif
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# undef __NFDBITS
# undef __FDMASK
# endif
# include "afs/afs_stats.h"
# include "afs/afs_prototypes.h"
# include "afs/discon.h"
-# if defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+# if defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
# include "osi_machdep.h"
# endif
# define MyPidxx current_pid()
# define MyPidxx2Pid(x) (x)
# endif
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
typedef struct task_struct * afs_lock_tracker_t;
# define MyPidxx (current)
# define MyPidxx2Pid(x) (x? (x)->pid : 0)
# include <sys/protosw.h>
# include <sys/ioctl.h>
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX_ENV)
# include <linux/version.h>
# ifdef HAVE_LINUX_CONFIG_H
# include <linux/config.h>
# include <linux/net.h>
# include <linux/kdev_t.h>
# include <linux/ioctl.h>
-# if defined(AFS_LINUX26_ENV)
+# if defined(AFS_LINUX_ENV)
# include <linux/compat.h>
# include <linux/backing-dev.h>
# include <linux/pagemap.h>
# if defined(HAVE_LINUX_EXPORTFS_H)
# include <linux/exportfs.h>
# endif
-# ifdef AFS_LINUX24_ENV
+# ifdef AFS_LINUX_ENV
# include <linux/pagemap.h>
# endif
-#else /* AFS_LINUX22_ENV */
+#else /* AFS_LINUX_ENV */
# include "h/errno.h"
# include "h/types.h"
# include <sys/debug.h>
# endif
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
#endif /* __AFS_SYSINCLUDESH__ so idempotent */
* -2: file exists in top-level
* >=0: file exists in Dxxx
*/
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
AFSD_INO_T *inode_for_V; /* Array of inodes for desired
* cache files */
#endif
* file's inode, directory, and bump the number of files found
* total and in this directory.
*/
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
inode_for_V[vFileNum] = currp->d_ino;
#endif
dir_for_V[vFileNum] = dirNum; /* remember this directory */
SetNoBackupAttr(fullpn_CellInfoFile);
} else if ((strcmp(currp->d_name, ".") == 0)
|| (strcmp(currp->d_name, "..") == 0) ||
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
/* this is the ext3 journal file */
(strcmp(currp->d_name, ".journal") == 0) ||
#endif
vFileNum);
else {
struct stat statb;
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
assert(inode_for_V[vFileNum] == (AFSD_INO_T) 0);
#endif
sprintf(vFilePtr, "D%d/V%d", thisDir, vFileNum);
if (CreateCacheFile(fullpn_VFile, &statb))
printf("%s: Can't create '%s'\n", rn, fullpn_VFile);
else {
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
inode_for_V[vFileNum] = statb.st_ino;
#endif
dir_for_V[vFileNum] = thisDir;
/* might want to check here for anything else goofy, like cache pointed at a non-dedicated directory, etc */
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
{
int res;
struct statfs statfsbuf;
if (res != 0) {
return "unable to statfs cache base directory";
}
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
if (statfsbuf.f_type == 0x52654973) { /* REISERFS_SUPER_MAGIC */
return "cannot use reiserfs as cache partition";
} else if (statfsbuf.f_type == 0x58465342) { /* XFS_SUPER_MAGIC */
cacheStatEntries);
}
-#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_CACHE_VNODE_PATH) && !defined(AFS_LINUX_ENV)
/*
* Create and zero the inode table for the desired cache files.
*/
}
/* fall through to setup-by-inode */
}
-#if defined(AFS_SGI62_ENV) || !(defined(AFS_LINUX26_ENV) || defined(AFS_CACHE_VNODE_PATH))
+#if defined(AFS_SGI62_ENV) || !(defined(AFS_LINUX_ENV) || defined(AFS_CACHE_VNODE_PATH))
afsd_syscall(AFSOP_CACHEINODE, inode_for_V[currVFile]);
#else
printf
#include <sys/file.h>
#include <sys/wait.h>
-#if defined(AFS_LINUX20_ENV)
+#if defined(AFS_LINUX_ENV)
#include <sys/resource.h>
#endif
# define SET_AFSD_RTPRI() SET_RTPRI(68)
# define SET_RX_RTPRI() SET_RTPRI(199)
#else
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# define SET_AFSD_RTPRI()
# define SET_RX_RTPRI() do { \
if (setpriority(PRIO_PROCESS, 0, -10) < 0) \
SET_AFSD_RTPRI();
}
-#if defined(AFS_LINUX20_ENV)
+#if defined(AFS_LINUX_ENV)
int
os_syscall(struct afsd_syscall_args *args)
{
static int
HandleMTab(char *cacheMountDir)
{
-#if (defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV))
+#if (defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX_ENV))
FILE *tfilep;
-#if defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
+#if defined(AFS_SGI_ENV) || defined(AFS_LINUX_ENV)
struct mntent tmntent;
char *dir;
int i;
mountFlags = MS_FSS;
if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, (caddr_t) MOUNT_AFS))
< 0) {
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
if ((mount("AFS", cacheMountDir, MOUNT_AFS, 0, NULL)) < 0) {
#elif defined(AFS_NBSD50_ENV)
if ((mount(MOUNT_AFS, cacheMountDir, mountFlags, NULL, 0)) < 0) {
#include <afs/sys_prototypes.h>
#endif
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
#include <sys/syscall.h>
#if defined(SYS_keyctl)
/* Open code this value to avoid a dependency on keyutils */
#endif /* NO_AFS_CLIENT */
if (code)
return KTC_PIOCTLFAIL;
-#if defined(AFS_LINUX26_ENV) && defined(SYS_keyctl)
+#if defined(AFS_LINUX_ENV) && defined(SYS_keyctl)
else
/*
* If we're using keyring based PAGs and the SESSION_TO_PARENT keyctl
if (code)
return KTC_PIOCTLFAIL;
-#if defined(AFS_LINUX26_ENV) && defined(SYS_keyctl)
+#if defined(AFS_LINUX_ENV) && defined(SYS_keyctl)
else
/*
* If we're using keyring based PAGs and the SESSION_TO_PARENT keyctl
setsid();
#elif defined(AFS_DARWIN90_ENV)
setpgid(0, 0);
-#elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV)
+#elif defined(AFS_LINUX_ENV) || defined(AFS_AIX_ENV)
setpgrp();
#else
setpgrp(0, 0);
#include <ctype.h>
-#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
#include <dlfcn.h>
#endif
#endif
#if defined(AFS_AIX_ENV)
dynlib = dlopen("/usr/lib/libApiDS.a(dsmapish.o)", RTLD_NOW | RTLD_LOCAL | RTLD_MEMBER);
-#elif defined (AFS_AMD64_LINUX26_ENV)
+#elif defined (AFS_AMD64_LINUX_ENV)
dynlib = dlopen("/usr/lib64/libApiTSM64.so", RTLD_NOW | RTLD_LOCAL);
-#elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
+#elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
dynlib = dlopen("/usr/lib/libApiDS.so", RTLD_NOW | RTLD_LOCAL);
#else
dynlib = NULL;
#ifdef DEBUG_BUTC
printf("dsm_MountLibrary : SUCCESS to Open the libApiDS shared library. \n");
#endif
-#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
AFSdsmBeginQuery = (dsInt16_t (*)( dsUint32_t dsmHandle, dsmQueryType queryType, dsmQueryBuff *queryBuffer)) dlsym((void *)dynlib, "dsmBeginQuery");
AFSdsmGetNextQObj = (dsInt16_t (*)( dsUint32_t dsmHandle, DataBlk *dataBlkPtr))dlsym((void *)dynlib, "dsmGetNextQObj") ;
AFSdsmEndQuery = (dsInt16_t (*)( dsUint32_t dsmHandle))dlsym((void *)dynlib, "dsmEndQuery");
XBSAQueryApiVersion(&(info->apiVersion));
#endif
#else
-#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
XBSAInit = BSAInit;
XBSABeginTxn = BSABeginTxn;
XBSAEndTxn = BSAEndTxn;
if (info->posCount >= 2147467264) { /* 2GB - 16K */
info->posCount = 0;
-#if (defined(AFS_SUN_ENV) || defined(AFS_LINUX24_ENV))
+#if (defined(AFS_SUN_ENV) || defined(AFS_LINUX_ENV))
if (!isafile) {
afs_int64 off;
/* Defines and structures for the AFS proc replacement layer for the original syscall (AFS_SYSCALL) strategy */
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#define PROC_FSDIRNAME "openafs"
#define PROC_SYSCALL_NAME "afs_ioctl"
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_ALPHA_LINUX20_ENV 1
-#define AFS_ALPHA_LINUX22_ENV 1
-#define AFS_ALPHA_LINUX24_ENV 1
-#define AFS_ALPHA_LINUX26_ENV 1
+#define AFS_ALPHA_LINUX_ENV 1
#define __alpha 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_AMD64_LINUX20_ENV 1
-#define AFS_AMD64_LINUX22_ENV 1
-#define AFS_AMD64_LINUX24_ENV 1
-#define AFS_AMD64_LINUX26_ENV 1
+#define AFS_AMD64_LINUX_ENV 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_ARM64_LINUX26_ENV 1
+#define AFS_ARM64_LINUX_ENV 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_ARM_LINUX20_ENV 1
-#define AFS_ARM_LINUX22_ENV 1
-#define AFS_ARM_LINUX24_ENV 1
-#define AFS_ARM_LINUX26_ENV 1
+#define AFS_ARM_LINUX_ENV 1
#else /* !defined(UKERNEL) */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_I386_LINUX20_ENV 1
-#define AFS_I386_LINUX22_ENV 1
-#define AFS_I386_LINUX24_ENV 1
-#define AFS_I386_LINUX26_ENV 1
+#define AFS_I386_LINUX_ENV 1
#else /* !defined(UKERNEL) */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_I386_LINUX20_ENV 1
-#define AFS_I386_LINUX22_ENV 1
-#define AFS_I386_LINUX24_ENV 1
-#define AFS_I386_LINUX26_ENV 1
+#define AFS_I386_LINUX_ENV 1
#else /* !defined(UKERNEL) */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_IA64_LINUX20_ENV 1
-#define AFS_IA64_LINUX22_ENV 1
-#define AFS_IA64_LINUX24_ENV 1
-#define AFS_IA64_LINUX26_ENV 1
+#define AFS_IA64_LINUX_ENV 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#define AFS_64BITUSERPOINTER_ENV 1
/* This section for kernel libafs compiles only */
#include <linux/version.h>
-#define AFS_LINUX20_ENV 1
-#define AFS_LINUX22_ENV 1
-#define AFS_LINUX24_ENV 1
-#define AFS_LINUX26_ENV 1
+#define AFS_LINUX_ENV 1
#define AFS_64BIT_IOPS_ENV 1
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#else /* !defined(UKERNEL) */
/* This section for user space compiles only */
-#define AFS_USR_LINUX20_ENV 1
-#define AFS_USR_LINUX22_ENV 1
-#define AFS_USR_LINUX24_ENV 1
-#define AFS_USR_LINUX26_ENV 1
+
+#define AFS_USR_LINUX_ENV 1
#define AFS_ENV 1
#define AFS_64BIT_CLIENT 1
#ifndef UKERNEL
/* This section for kernel space compiles only */
-#define AFS_PPC64_LINUX20_ENV 1
-#define AFS_PPC64_LINUX22_ENV 1
-#define AFS_PPC64_LINUX24_ENV 1
-#define AFS_PPC64_LINUX26_ENV 1
+#define AFS_PPC64_LINUX_ENV 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel space compiles only */
-#define AFS_PPC64_LINUX20_ENV 1
-#define AFS_PPC64_LINUX22_ENV 1
-#define AFS_PPC64_LINUX24_ENV 1
-#define AFS_PPC64_LINUX26_ENV 1
+#define AFS_PPC64_LINUX_ENV 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits */
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_PPC_LINUX20_ENV 1
-#define AFS_PPC_LINUX22_ENV 1
-#define AFS_PPC_LINUX24_ENV 1
-#define AFS_PPC_LINUX26_ENV 1
+#define AFS_PPC_LINUX_ENV 1
#else /* !defined(UKERNEL) */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_S390_LINUX20_ENV 1
-#define AFS_S390_LINUX22_ENV 1
-#define AFS_S390_LINUX24_ENV 1
-#define AFS_S390_LINUX26_ENV 1
+#define AFS_S390_LINUX_ENV 1
#else /* !defined(UKERNEL) */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_S390_LINUX20_ENV 1
-#define AFS_S390_LINUX22_ENV 1
-#define AFS_S390_LINUX24_ENV 1
-#define AFS_S390_LINUX26_ENV 1
-#define AFS_S390X_LINUX20_ENV 1
-#define AFS_S390X_LINUX22_ENV 1
-#define AFS_S390X_LINUX24_ENV 1
-#define AFS_S390X_LINUX26_ENV 1
+#define AFS_S390_LINUX_ENV 1
+#define AFS_S390X_LINUX_ENV 1
#define AFS_64BITPOINTER_ENV 1
#define AFS_64BITUSERPOINTER_ENV 1
/* This section for user space compiles only */
#define UKERNEL 1 /* user space kernel */
-#define AFS_S390X_LINUX20_ENV 1
-#define AFS_S390X_LINUX22_ENV 1
-#define AFS_S390X_LINUX24_ENV 1
-#define AFS_S390X_LINUX26_ENV 1
+#define AFS_S390X_LINUX_ENV 1
#define AFS_64BITPOINTER_ENV 1
#define AFS_64BITUSERPOINTER_ENV 1
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_SPARC64_LINUX20_ENV 1
-#define AFS_SPARC64_LINUX22_ENV 1
-#define AFS_SPARC64_LINUX24_ENV 1
-#define AFS_SPARC64_LINUX26_ENV 1
+#define AFS_SPARC64_LINUX_ENV 1
#define AFS_LINUX_64BIT_KERNEL 1
#define AFS_64BITPOINTER_ENV 1 /* pointers are 64 bits. */
#define AFS_32BIT_USR_ENV 1 /* user level processes are 32bit */
#ifndef UKERNEL
/* This section for kernel libafs compiles only */
-#define AFS_SPARC_LINUX20_ENV 1
-#define AFS_SPARC_LINUX22_ENV 1
-#define AFS_SPARC_LINUX24_ENV 1
+#define AFS_SPARC_LINUX_ENV 1
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#if defined(AFS_SMP) && defined(CONFIG_MODVERSIONS)
# define AFS_NONNULL(x)
#endif
-#if defined(AFS_LINUX26_ENV) && defined(fallthrough)
+#if defined(AFS_LINUX_ENV) && defined(fallthrough)
# define AFS_FALLTHROUGH fallthrough
#elif defined(HAVE_FUNC_ATTRIBUTE_FALLTHROUGH)
# define AFS_FALLTHROUGH __attribute__((fallthrough))
# undef HAVE_ARC4RANDOM
#endif
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
/*
* gettimeofday is only used in rand-fortuna.c, not built for Linux.
* Linux 5.6 removes the native struct timeval, so this stub would not build.
{if (tp == NULL) return -1; tp->tv_sec = osi_Time(); tp->tv_usec = 0; return 0;}
#endif
-#if defined(KERNEL) && (defined(AFS_SUN5_ENV) || defined(AFS_ARM64_LINUX26_ENV))
+#if defined(KERNEL) && (defined(AFS_SUN5_ENV) || defined(AFS_ARM64_LINUX_ENV))
/*
* Some functions such as RAND_add take a 'double' as an argument, but floating
* point code generally cannot be used in kernelspace. We never actually use
#ifdef KERNEL
# if !defined(UKERNEL)
# include "h/types.h"
-# if !defined(AFS_LINUX26_ENV)
+# if !defined(AFS_LINUX_ENV)
# include "h/param.h"
# endif
# ifdef AFS_AUX_ENV
# include "h/errno.h"
# endif
# include "h/time.h"
-# if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV)
+# if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX_ENV)
# include "h/errno.h"
# else
-# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV)
+# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX_ENV)
# include "h/kernel.h"
# endif
# endif
# include "h/user.h"
# endif /* AFS_SGI64_ENV */
# include "h/uio.h"
-# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
+# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_HPUX110_ENV)
# include "h/mbuf.h"
# endif
-# ifndef AFS_LINUX20_ENV
+# ifndef AFS_LINUX_ENV
# include "netinet/in.h"
# endif
# else /* !defined(UKERNEL) */
# include "afs/dir.h"
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# include "h/string.h"
# endif
#include <roken.h>
-#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_FBSD_ENV)
#include <sgtty.h>
#endif
#define LOG_TGTREQUEST 8
#ifdef AUTH_DBM_LOG
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include <gdbm.h>
#define dbm_store gdbm_store
#define dbm_firstkey gdbm_firstkey
#define DBM GDBM_FILE
#define DBM_REPLACE GDBM_REPLACE
-#else /* AFS_LINUX20_ENV */
+#else /* AFS_LINUX_ENV */
#include <ndbm.h>
#define afs_dbm_nextkey(d, k) dbm_nextkey(d)
#endif
int MinHours = 0;
int npwSums = KA_NPWSUMS; /* needs to be variable sometime */
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#undef vfprintf
#define vfprintf(stream,fmt,args) _doprnt(fmt,args,stream)
#endif
* On Linux, dbm is not part of the standard installation, and we can't
* statically link it in. So, ignore it for now.
*/
-%#if !defined(AFS_HPUX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+%#if !defined(AFS_HPUX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV)
%#define AUTH_DBM_LOG
%#endif
}
#endif
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_USR_LINUX20_ENV) && (!defined(AFS_XBSD_ENV) || defined(AFS_FBSD_ENV))
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_USR_LINUX_ENV) && (!defined(AFS_XBSD_ENV) || defined(AFS_FBSD_ENV))
/* handle smoothly the case where no AFS system calls exists (yet) */
(void)signal(SIGSYS, SIG_IGN);
#endif
UAFS_CFLAGS=-fPIC
endif
-TEST_CFLAGS=-pthread -D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_LINUX22_ENV $(XCFLAGS)
+TEST_CFLAGS=-pthread -D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_LINUX_ENV $(XCFLAGS)
TEST_LDFLAGS=
TEST_LIBS=-lpthread @LIB_crypt@
/* On Linux without __USE_XOPEN, we have __fds_bits. With __USE_XOPEN, or
* non-Linux, we have fds_bits. */
-#if defined(AFS_LINUX22_ENV) && (__GLIBC_MINOR__ > 0) && !defined(__USE_XOPEN)
+#if defined(AFS_LINUX_ENV) && (__GLIBC_MINOR__ > 0) && !defined(__USE_XOPEN)
# define FDS_BITS __fds_bits
#else
# define FDS_BITS fds_bits
iomgr_timeout.tv_sec = 100000000;
iomgr_timeout.tv_usec = 0;
}
-#if defined(AFS_NT40_ENV) || defined(AFS_LINUX24_ENV)
+#if defined(AFS_NT40_ENV) || defined(AFS_LINUX_ENV)
/* On NT, signals don't interrupt a select call. So this can potentially
* lead to long wait times before a signal is honored. To avoid this we
* dont do select() for longer than IOMGR_MAXWAITTIME (5 secs) */
/* Real timeout only if signal handler hasn't set
iomgr_timeout to zero. */
-#if defined(AFS_NT40_ENV) || defined(AFS_LINUX24_ENV)
+#if defined(AFS_NT40_ENV) || defined(AFS_LINUX_ENV)
/* On NT, real timeout only if above and if iomgr_timeout
* interval is equal to timeout interval (i.e., not adjusted
* to check for pseudo-signals).
int setlim(int limcon, uchar_t hard, int limit);
#endif
-#ifndef AFS_ARM_LINUX20_ENV
-#if defined(AFS_S390_LINUX20_ENV)
+#ifndef AFS_ARM_LINUX_ENV
+#if defined(AFS_S390_LINUX_ENV)
int PRE_Block; /* Remnants of preemption support. */
#else
char PRE_Block; /* Remnants of preemption support. */
Initialize_PCB(temp, priority, stackmemory, stacksize, ep, parm, name);
insert(temp, &runnable[priority]);
temp2 = lwp_cpptr;
-#if !defined(AFS_ARM_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
+#if !defined(AFS_ARM_LINUX_ENV) && !defined(AFS_ARM_DARWIN_ENV)
if (PRE_Block != 0)
Abort_LWP("PRE_Block not 0");
savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16); /* 16 = 2 * jmp_buf_type */
#endif /* !sys_x86_darwin_80 */
#else
-#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_SPARC_LINUX_ENV)
savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 0x40); /* lomgjmp does something
* with %fp + 0x38 */
#else
-#if defined(AFS_S390_LINUX20_ENV)
+#if defined(AFS_S390_LINUX_ENV)
savecontext(Create_Process_Part2, &temp2->context,
stackptr + stacksize - MINFRAME);
-#else /* !AFS_S390_LINUX20_ENV */
+#else /* !AFS_S390_LINUX_ENV */
savecontext(Create_Process_Part2, &temp2->context,
stackptr + stacksize - sizeof(void *));
-#endif /* AFS_S390_LINUX20_ENV */
-#endif /* AFS_SPARC64_LINUX20_ENV || AFS_SPARC_LINUX20_ENV */
+#endif /* AFS_S390_LINUX_ENV */
+#endif /* AFS_SPARC64_LINUX_ENV || AFS_SPARC_LINUX_ENV */
#endif /* AFS_SGI62_ENV */
#endif
/* End of gross hack */
Initialize_PCB(temp, priority, stackptr, stacksize, ep, parm, name);
insert(temp, &runnable[priority]);
temp2 = lwp_cpptr;
-#if !defined(AFS_ARM_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
+#if !defined(AFS_ARM_LINUX_ENV) && !defined(AFS_ARM_DARWIN_ENV)
if (PRE_Block != 0)
Abort_LWP("PRE_Block not 0");
savecontext(Dispatcher, &(temp->context),
&(LWPANCHOR.
dsptchstack[(sizeof LWPANCHOR.dsptchstack) - 8]));
-#elif defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
+#elif defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_SPARC_LINUX_ENV)
savecontext(Dispatcher, &(temp->context),
&(LWPANCHOR.
dsptchstack[(sizeof LWPANCHOR.dsptchstack) -
0x40]));
-#elif defined(AFS_S390_LINUX20_ENV)
+#elif defined(AFS_S390_LINUX_ENV)
savecontext(Dispatcher, &(temp->context),
&(LWPANCHOR.
dsptchstack[(sizeof LWPANCHOR.dsptchstack) -
printf("Dispatch %d [PCB at 0x%x] \"%s\"\n", ++dispatch_count,
runnable[i].head, runnable[i].head->name);
#endif
-#if !defined(AFS_ARM_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
+#if !defined(AFS_ARM_LINUX_ENV) && !defined(AFS_ARM_DARWIN_ENV)
if (PRE_Block != 1)
Abort_LWP("PRE_Block not 1");
#endif
#ifndef _MFC_VER /*skip if doing Microsoft foundation class */
#include <winsock2.h>
#endif
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
*/
#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H)
#define AFS_LWP_MINSTACKSIZE (288 * 1024)
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX_ENV)
#define AFS_LWP_MINSTACKSIZE (192 * 1024)
#else
#define AFS_LWP_MINSTACKSIZE (48 * 1024)
struct lwp_context *savearea, char *sp);
extern void returnto(struct lwp_context *savearea);
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
/* max time we are allowed to spend in a select call on Linux to avoid
lost signal issues */
#define IOMGR_MAXWAITTIME 60 /* seconds */
#include "lwp.h"
-#if defined(AFS_S390_LINUX20_ENV)
+#if defined(AFS_S390_LINUX_ENV)
extern int PRE_Block; /* used in lwp.c and process.s */
#else
extern char PRE_Block; /* used in lwp.c and process.s */
#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H)
-# if defined(AFS_LINUX20_ENV) || defined(AFS_XBSD_ENV)
+# if defined(AFS_LINUX_ENV) || defined(AFS_XBSD_ENV)
# define AFS_UCONTEXT_NOSTACK
# endif
# endif
#elif defined(AFS_HPUX_ENV)
#define LWP_SP 1
-#elif defined(AFS_LINUX20_ENV)
-#if defined(AFS_PPC_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
+#if defined(AFS_PPC_LINUX_ENV) || defined(AFS_PPC64_LINUX_ENV)
#define LWP_SP 0
-#elif defined(AFS_I386_LINUX20_ENV)
+#elif defined(AFS_I386_LINUX_ENV)
#define LWP_SP 4
-#elif defined(AFS_S390_LINUX20_ENV)
+#elif defined(AFS_S390_LINUX_ENV)
#define LWP_SP 9
#define LWP_FP 5
-#elif defined(AFS_SPARC_LINUX20_ENV)
+#elif defined(AFS_SPARC_LINUX_ENV)
#define LWP_SP 0
#define LWP_FP 1
-#elif defined(AFS_SPARC64_LINUX20_ENV) && defined(AFS_32BIT_USR_ENV)
+#elif defined(AFS_SPARC64_LINUX_ENV) && defined(AFS_32BIT_USR_ENV)
#define LWP_SP 0
#define LWP_FP 1
-#elif defined(AFS_ALPHA_LINUX20_ENV)
+#elif defined(AFS_ALPHA_LINUX_ENV)
#define LWP_SP 8
#define LWP_FP 7
#else
typedef __uint64_t jmp_buf_type;
#endif
#else
-#if defined(AFS_ALPHA_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
+#if defined(AFS_ALPHA_LINUX_ENV) || defined(AFS_PPC64_LINUX_ENV)
typedef long jmp_buf_type;
#else
typedef int jmp_buf_type;
-#endif /*AFS_ALPHA_LINUX20_ENV */
+#endif /*AFS_ALPHA_LINUX_ENV */
#endif /*SGI*/
static jmp_buf jmp_tmp;
* On Sparc ucontext functions are not implemented.
*/
#define ptr_mangle(x) (x)
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#ifdef __GLIBC__
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
-#if defined(AFS_SPARC64_LINUX24_ENV) || defined(AFS_SPARC_LINUX24_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_SPARC_LINUX_ENV)
/* technically we should use POINTER_GUARD
* ( == offsetof (tcbhead_t, pointer_guard) )
* instead of 0x18
case 0:
jmpBuffer = (jmp_buf_type *) jmp_tmp;
jmpBuffer[LWP_SP] = ptr_mangle((jmp_buf_type) sp);
-#if defined(AFS_S390_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) || (defined(AFS_SPARC64_LINUX20_ENV) && defined(AFS_32BIT_USR_ENV))
+#if defined(AFS_S390_LINUX_ENV) || defined(AFS_SPARC_LINUX_ENV) || (defined(AFS_SPARC64_LINUX_ENV) && defined(AFS_32BIT_USR_ENV))
jmpBuffer[LWP_FP] = ptr_mangle((jmp_buf_type) sp);
#endif
longjmp(jmp_tmp, 1);
#if defined(HAVE_STDIO_EXT_H)
if (__fbufsize(stdin) > 0)
return 1;
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
if (stdin->_IO_read_ptr < stdin->_IO_read_end)
return 1;
#elif (defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)) && defined(AFS_DFBSD_ENV)
pid_t cpid, rcpid;
int status;
struct sigaction newAction, origAction;
-#if !(defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV))
+#if !(defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV))
char upwd_buf[2048]; /* size is a guess. */
struct passwd unix_pwd;
#endif
RET(PAM_AUTH_ERR);
}
#else
-#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV)
upwd = getpwnam(user);
#else
upwd = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf));
struct ubik_client *conn = 0;
PAM_CONST struct pam_conv *pam_convp = NULL;
struct passwd *upwd = NULL;
-#if !(defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV))
+#if !(defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV))
char upwd_buf[2048]; /* size is a guess. */
struct passwd unix_pwd;
#endif
RET(PAM_AUTH_ERR);
}
#else
-#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV)
upwd = getpwnam(user);
#else
upwd = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf));
case -1: /* error */
return (PAM_SESSION_ERR);
case 0: /* child */
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
setpgrp();
#endif
setsid();
int password_expires = -1;
char *reason = NULL;
struct passwd *upwd = NULL;
-#if !(defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV))
+#if !(defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV))
char upwd_buf[2048]; /* size is a guess. */
struct passwd unix_pwd;
#endif
RET(PAM_AUTH_ERR);
}
#else
-#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV)
upwd = getpwnam(user);
#else
upwd = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf));
static const char *new_envstring = "GOTHEREVIATESTPAM=1";
static const char *new_homestring = "HOME=/tmp";
-#if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV) || defined(AFS_DARWIN_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_NBSD_ENV) || defined(AFS_DARWIN_ENV)
#define getpassphrase getpass
#endif
#endif
char **ahost;
u_short rport;
-#if defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
const char *locuser, *remuser, *cmd;
#else
char *locuser, *remuser, *cmd;
int _check_rhosts_file = 1;
-#if defined(AFS_HPUX102_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_HPUX102_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
ruserok(rhost, superuser, ruser, luser)
const char *rhost;
int superuser;
len = sizeof(struct sockaddr_in);
rc = getsockname(sock, (struct sockaddr *)&lcladdr, &len);
usr_assert(rc >= 0);
-#ifdef AFS_USR_LINUX22_ENV
+#ifdef AFS_USR_LINUX_ENV
optval0 = 131070;
#else
optval0 = 131072;
rc = getsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *)&optval, &optlen);
usr_assert(rc == 0);
/* usr_assert(optval == optval0); */
-#ifdef AFS_USR_LINUX22_ENV
+#ifdef AFS_USR_LINUX_ENV
optval0 = 131070;
#else
optval0 = 131072;
# include "h/types.h"
# include "h/time.h"
# include "h/stat.h"
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# include "h/socket.h"
# endif
# include "netinet/in.h"
rx_atomic_sub(rx_atomic_t *atomic, int change) {
OSAtomicAdd32(0 - change, &atomic->var);
}
-#elif defined(AFS_LINUX26_ENV) && defined(KERNEL)
+#elif defined(AFS_LINUX_ENV) && defined(KERNEL)
#include <asm/atomic.h>
typedef atomic_t rx_atomic_t;
*/
#ifdef AFS_RXERRQ_ENV
-# if defined(AFS_LINUX26_ENV) || defined(AFS_USR_LINUX26_ENV)
+# if defined(AFS_LINUX_ENV) || defined(AFS_USR_LINUX_ENV)
# include <linux/types.h>
# include <linux/errqueue.h>
# include <linux/icmp.h>
return 0;
}
-#ifndef AFS_LINUX26_ENV
+#ifndef AFS_LINUX_ENV
/*
* osi_AssertFailK() -- used by the osi_Assert() macro.
*
osi_Panic("%s", buf);
}
-#endif /* !AFS_LINUX26_ENV */
+#endif /* !AFS_LINUX_ENV */
#ifndef UKERNEL
/* This is the server process request loop. Kernel server
*/
-#if ! defined(AFS_AIX_ENV) && ! defined(AFS_SUN5_ENV) && ! defined(UKERNEL) && ! defined(AFS_LINUX20_ENV) && !defined (AFS_DARWIN_ENV) && !defined (AFS_XBSD_ENV)
+#if ! defined(AFS_AIX_ENV) && ! defined(AFS_SUN5_ENV) && ! defined(UKERNEL) && ! defined(AFS_LINUX_ENV) && !defined (AFS_DARWIN_ENV) && !defined (AFS_XBSD_ENV)
/* Routine called during the afsd "-shutdown" process to put things back to
* the initial state.
*/
* most of it is simple to follow common code.
*/
#if !defined(UKERNEL)
-# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SOCKPROXY_ENV)
+# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_SOCKPROXY_ENV)
/* rxk_NewSocket creates a new socket on the specified port. The port is
* in network byte order.
*/
# endif
return 0;
}
-# endif /* !SUN5 && !LINUX20 && !AFS_SOCKPROXY_ENV */
+# endif /* !AFS_SUN5_ENV && !AFS_LINUX_ENV && !AFS_SOCKPROXY_ENV */
# if defined(RXK_LISTENER_ENV) || defined(AFS_SUN5_ENV) || defined(RXK_UPCALL_ENV)
# ifdef RXK_TIMEDSLEEP_ENV
* OS's socket receive routine returns as a result of a signal.
*/
int rxk_ListenerPid; /* Used to signal process to wakeup at shutdown */
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
struct task_struct *rxk_ListenerTask;
# endif
int code;
int host, port;
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
rxk_ListenerPid = current->pid;
rxk_ListenerTask = current;
allow_signal(SIGKILL); /* Allowed, but blocked until shutdown */
osi_rxWakeup(&afs_termState);
}
rxk_ListenerPid = 0;
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
rxk_ListenerTask = 0;
osi_rxWakeup(&rxk_ListenerTask);
# endif
# endif
}
-# if !defined(AFS_LINUX20_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
+# if !defined(AFS_LINUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
/* The manner of stopping the rx listener thread may vary. Most unix's should
* be able to call soclose.
*/
# endif /* RXK_LISTENER_ENV */
#endif /* !UKERNEL */
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
void
# if defined(AFS_AIX_ENV)
osi_Panic(char *msg, void *a1, void *a2, void *a3)
icmn_err(CE_PANIC, msg, ap);
va_end(ap);
}
-# elif defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_FBSD_ENV) || defined(UKERNEL)
+# elif defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX_ENV) || defined(AFS_FBSD_ENV) || defined(UKERNEL)
char buf[256];
va_list ap;
if (!msg)
va_end(ap);
printf("%s", buf);
panic("%s", buf);
-# else /* DARWIN80 || LINUX22 || FBSD || UKERNEL */
+# else /* DARWIN80 || LINUX || FBSD || UKERNEL */
va_list ap;
if (!msg)
msg = "Unknown AFS panic";
va_start(ap, msg);
vprintf(msg, ap);
va_end(ap);
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
* ((char *) 0) = 0;
# else
panic("%s", msg);
# endif
-# endif /* else DARWIN80 || LINUX22 || FBSD || UKERNEL */
+# endif /* else DARWIN80 || LINUX || FBSD || UKERNEL */
}
-#endif /* !AFS_LINUX26_ENV */
+#endif /* !AFS_LINUX_ENV */
#ifndef _RX_KCOMMON_H_
#define _RX_KCOMMON_H_
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
#ifndef _LINUX_CODA_FS_I
#define _LINUX_CODA_FS_I 1
#define _CODA_HEADER_ 1
#include "h/types.h"
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
#include "h/param.h"
#endif
-#ifndef AFS_LINUX22_ENV
+#ifndef AFS_LINUX_ENV
#include "h/systm.h"
#endif
#include "h/time.h"
#include "h/disp.h"
#endif
#include "h/socket.h"
-#if !defined(AFS_LINUX22_ENV) && !defined(AFS_OBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_OBSD_ENV)
#include "h/socketvar.h"
#if !defined(AFS_SUN5_ENV) && !defined(AFS_XBSD_ENV)
#include "h/domain.h"
#include "h/mbuf.h"
#endif
#endif /* !defined(AFS_SUN5_ENV) && !defined(AFS_XBSD_ENV) */
-#endif /* !defined(AFS_LINUX22_ENV) && !defined(AFS_OBSD_ENV) */
+#endif /* !defined(AFS_LINUX_ENV) && !defined(AFS_OBSD_ENV) */
#ifdef AFS_SGI62_ENV
#include "h/hashing.h"
#endif
#include "h/signalvar.h"
#endif /* AFS_OBSD_ENV */
#include "netinet/in.h"
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
#include "linux/route.h"
#else
#include "net/route.h"
#endif
-#if defined(HAVE_IN_SYSTM_H) || !defined(AFS_LINUX22_ENV)
+#if defined(HAVE_IN_SYSTM_H) || !defined(AFS_LINUX_ENV)
#include "netinet/in_systm.h"
#endif
#include "netinet/ip.h"
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_OBSD_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_OBSD_ENV)
#include "netinet/in_pcb.h"
-#endif /* ! AFS_HPUX110_ENV && ! AFS_LINUX22_ENV */
-#ifndef AFS_LINUX22_ENV
+#endif /* ! AFS_HPUX110_ENV && ! AFS_LINUX_ENV */
+#ifndef AFS_LINUX_ENV
#if !defined(AFS_DARWIN_ENV)
#include "netinet/ip_var.h"
#endif
#include "netinet/ip_icmp.h"
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
#include "netinet/udp.h"
-#if !defined(AFS_SGI62_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_SGI62_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include "netinet/udp_var.h"
#endif
#if defined(AFS_HPUX102_ENV) || (defined(AFS_SGI62_ENV) && !defined(AFS_SGI64_ENV))
#include "h/user.h"
#endif
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
#include "h/sched.h"
#include "h/netdevice.h"
#include "linux/if.h"
# include <net/if_var.h>
# endif
#endif
-#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV)
#include "netinet/in_var.h"
-#endif /* ! AFS_HPUX110_ENV && ! AFS_LINUX22_ENV */
+#endif /* ! AFS_HPUX110_ENV && ! AFS_LINUX_ENV */
#include "afs/afs_osi.h"
#include "rx_kmutex.h"
#include "afs/lock.h"
extern int osi_utoa(char *buf, size_t len, unsigned long val);
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX_ENV)
# define osi_Panic(msg...) \
do { printk(KERN_CRIT "openafs: " msg); BUG(); } while (0)
# define osi_Assert(expr) \
(void)((exp) || (osi_AssertFailK( #exp , __FILE__, __LINE__), 0))
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
# define osi_Msg printk)(
#else
# define osi_Msg printf)(
}
#ifdef AFS_NT40_ENV
if (err)
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX_ENV)
/* linux unfortunately returns ECONNREFUSED if the target port
* is no longer in use */
/* and EAGAIN if a UDP checksum is incorrect */
# include "rx_kcommon.h"
# endif
# include "h/types.h"
-# ifndef AFS_LINUX20_ENV
+# ifndef AFS_LINUX_ENV
# include "h/systm.h"
# endif
# if defined(AFS_SGI_ENV) || defined(AFS_HPUX110_ENV) || defined(AFS_NBSD50_ENV)
# include "h/proc.h"
# endif
# include "h/socket.h"
-# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
+# if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_HPUX110_ENV)
# if !defined(AFS_AIX41_ENV)
# include "sys/mount.h" /* it gets pulled in by something later anyway */
# endif
#define m_cpytoc(a, b, c, d) cpytoc(a, b, c, d)
#define m_cpytoiovec(a, b, c, d, e) cpytoiovec(a, b, c, d, e)
#else
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN80_ENV)
static int
m_cpytoiovec(struct mbuf *m, int off, int len, struct iovec iovs[], int niovs)
{
return len;
}
-#endif /* LINUX */
+#endif /* !AFS_LINUX_ENV && !AFS_DARWIN80_ENV */
#endif /* AFS_SUN5_ENV */
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN80_ENV)
#if defined(AFS_NBSD_ENV)
int
rx_mb_to_packet(struct mbuf *amb, void (*free) (struct mbuf *), int hdr_len, int data_len, struct rx_packet *phandle)
if (code == -WSAEHOSTUNREACH) {
down = 1;
}
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
if (code == -ENETUNREACH) {
down = 1;
}
#else /* AFS_NT40_ENV */
# if !defined(AFS_DARWIN_ENV) && !defined(AFS_USR_DARWIN_ENV) \
&& !defined(AFS_XBSD_ENV) && !defined(AFS_USR_FBSD_ENV) \
- && !defined(AFS_USR_DFBSD_ENV) && !defined(AFS_LINUX20_ENV)
+ && !defined(AFS_USR_DFBSD_ENV) && !defined(AFS_LINUX_ENV)
# include <sys/sysmacros.h> /* MIN, MAX on most commercial UNIX */
# endif
/* Linux 3.7 doesn't have sys/param.h in kernel space, and afs/param.h ensures
* that MIN and MAX are available for kernel builds. */
-# if !(defined(AFS_LINUX26_ENV) && defined(KERNEL))
+# if !(defined(AFS_LINUX_ENV) && defined(KERNEL))
# include <sys/param.h> /* MIN, MAX elsewhere */
# endif
#endif /* !AFS_NT40_ENV */
# ifdef UKERNEL
extern void *rx_ServerProc(void *);
# endif
-# ifndef AFS_LINUX26_ENV
+# ifndef AFS_LINUX_ENV
extern void osi_AssertFailK(const char *expr, const char *file, int line) AFS_NORETURN;
# endif
extern void rxk_Listener(void);
extern void osi_StopListener(void);
/* ARCH/rx_kmutex.c */
-# if defined(AFS_LINUX20_ENV)
+# if defined(AFS_LINUX_ENV)
extern void afs_mutex_init(afs_kmutex_t * l);
extern void afs_mutex_enter(afs_kmutex_t * l);
extern int afs_mutex_tryenter(afs_kmutex_t * l);
#endif
#ifndef AFS_RXERRQ_ENV
-# ifdef AFS_LINUX22_ENV
+# ifdef AFS_LINUX_ENV
/* linux unfortunately returns ECONNREFUSED if the target port
* is no longer in use */
/* and EAGAIN if a UDP checksum is incorrect */
# if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
# include "h/systm.h"
# endif
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# include "h/socket.h"
# endif
# include "netinet/in.h"
#define IPPORT_USERRESERVED 5000
# endif
-#if defined(AFS_LINUX22_ENV) && defined(AFS_RXERRQ_ENV)
+#if defined(AFS_LINUX_ENV) && defined(AFS_RXERRQ_ENV)
# include <linux/types.h>
# include <linux/errqueue.h>
# if defined(AFS_ADAPT_PMTU) && !defined(IP_MTU)
osi_socket socketFd = OSI_NULLSOCKET;
struct sockaddr_in taddr;
char *name = "rxi_GetUDPSocket: ";
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
# if defined(AFS_ADAPT_PMTU)
int pmtu = IP_PMTUDISC_WANT;
# else
rx_atomic_set(&rx_stats.socketGreedy, greedy);
}
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
setsockopt(socketFd, SOL_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu));
#endif
#ifdef AFS_RXERRQ_ENV
-#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN160_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN160_ENV)
int
rxi_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
}
#endif /* SIOCGIFFLAGS */
-#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN160_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN160_ENV)
/* this won't run on an AIX system w/o a cache manager */
rxi_syscallp = rxi_syscall;
#endif
rx_PrintStats(debugFile);
}
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV)
int
test_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
int setFD = 0;
int jumbo = 0;
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV)
setlinebuf(stdout);
rxi_syscallp = test_syscall;
#endif
rx_PrintStats(debugFile);
}
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV)
int
test_syscall(a3, a4, a5)
afs_uint32 a3, a4;
int setFD = 0;
int jumbo = 0;
-#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX_ENV)
setlinebuf(stdout);
rxi_syscallp = test_syscall;
#endif
#ifndef NeXT
#if defined(KERNEL) && !defined(UKERNEL)
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <sys/param.h>
#endif
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
#include <sys/systm.h>
#endif
#endif
x.x_op = XDR_FREE;
/* See note in xdr.h for the method behind this madness */
-#if defined(AFS_I386_LINUX26_ENV) && defined(KERNEL) && !defined(UKERNEL)
+#if defined(AFS_I386_LINUX_ENV) && defined(KERNEL) && !defined(UKERNEL)
(*proc)(&x, obj, 0);
#else
(*proc)(&x, obj);
* normal va_args prototype results in the arguments being placed on the
* stack, where they aren't accessible to the 'real' function.
*/
-#if defined(AFS_I386_LINUX26_ENV) && defined(KERNEL) && !defined(UKERNEL)
+#if defined(AFS_I386_LINUX_ENV) && defined(KERNEL) && !defined(UKERNEL)
typedef bool_t(*xdrproc_t) (void *, caddr_t, u_int);
#else
typedef bool_t(*xdrproc_t) (void *, ...);
#include <afs/param.h>
#if defined(KERNEL) && !defined(UKERNEL)
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include "h/string.h"
#else
#include <sys/param.h>
*/
#if defined(KERNEL) && !defined(UKERNEL)
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <sys/param.h>
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include "h/string.h"
#else
#ifndef AFS_DARWIN90_ENV
#include <sys/systm.h>
#endif
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
#endif
#include "xdr.h"
*/
#if defined(KERNEL) && !defined(UKERNEL)
-#if !defined(AFS_LINUX26_ENV)
+#if !defined(AFS_LINUX_ENV)
#include <sys/param.h>
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include "h/string.h"
#else
#include <sys/systm.h>
#ifndef NeXT
#if defined(KERNEL) && !defined(UKERNEL)
-# if !defined(AFS_LINUX26_ENV)
+# if !defined(AFS_LINUX_ENV)
# include <sys/param.h>
# endif
#else
#if defined(KERNEL) && !defined(UKERNEL)
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include "h/string.h"
#else
#include <sys/param.h>
# ifndef UKERNEL
# include "h/types.h"
# include "h/uio.h"
-# ifdef AFS_LINUX20_ENV
+# ifdef AFS_LINUX_ENV
# include "h/socket.h"
# endif
-# ifdef AFS_LINUX22_ENV
+# ifdef AFS_LINUX_ENV
# ifndef quad_t
# define quad_t __quad_t
# define u_quad_t __u_quad_t
f_print(fout, "#include \"h/socket.h\"\n");
f_print(fout, "#endif\n");
f_print(fout, "#ifndef DTYPE_SOCKET /* XXXXX */\n");
- f_print(fout, "#ifndef AFS_LINUX22_ENV\n");
+ f_print(fout, "#ifndef AFS_LINUX_ENV\n");
f_print(fout, "#include \"h/file.h\"\n");
f_print(fout, "#endif\n");
f_print(fout, "#endif\n");
f_print(fout, "#include \"h/time.h\"\n");
f_print(fout, "#endif\n");
f_print(fout, "#ifndef XDR_GETLONG /* XXXXX */\n");
- f_print(fout, "#ifdef AFS_LINUX22_ENV\n");
+ f_print(fout, "#ifdef AFS_LINUX_ENV\n");
f_print(fout, "#ifndef quad_t\n");
f_print(fout, "#define quad_t __quad_t\n");
f_print(fout, "#define u_quad_t __u_quad_t\n");
#ifdef KERNEL
#ifndef UKERNEL
#include "h/types.h"
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_OBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_OBSD_ENV)
#include "netinet/in.h"
#endif
#else /* UKERNEL */
#include "afs/sysincludes.h"
#endif /* UKERNEL */
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
#include <asm/byteorder.h>
#endif
#include "h/systm.h"
#endif
#include "h/types.h"
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_OBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_OBSD_ENV)
#include "netinet/in.h"
#endif
#else /* UKERNEL */
#include "afs/sysincludes.h"
#endif /* UKERNEL */
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
#include <asm/byteorder.h>
#endif
#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_XBSD_ENV)
#include "h/systm.h"
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include "h/socket.h"
#endif
#ifndef AFS_OBSD_ENV
#endif
/* Glue layer. */
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
int proc_afs_syscall(long syscall, long param1, long param2, long param3,
long param4, int *rval);
#endif
#include "afssyscalls.h"
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
int proc_afs_syscall(long syscall, long param1, long param2, long param3,
long param4, int *rval) {
struct afsprocdata syscall_data;
return (syscall(AFS_PIOCTL, path, cmd, cmarg, follow));
}
-#elif defined(AFS_LINUX20_ENV)
+#elif defined(AFS_LINUX_ENV)
int
lpioctl(char *path, int cmd, void *cmarg, int follow)
{
int errcode;
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
int rval;
rval = proc_afs_syscall(AFSCALL_SETPAG,0,0,0,0,&errcode);
#define _SYS_PROTOTYPES_H
/* glue.c */
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
extern int proc_afs_syscall(long, long, long, long, long, int *);
#endif
#ifdef AFS_DARWIN80_ENV
#include <afs/vnode.h>
#include <afs/volume.h>
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
#define _LARGEFILE64_SOURCE 1
#endif
#ifdef RESIDENCY
#define uss_VolumeLen 300
#define uss_DirPoolLen 300
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
extern char *sys_errlist[];
#endif
# include <rpc.h>
# else
# include <net/if.h>
-# if !defined(AFS_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
+# if !defined(AFS_LINUX_ENV) && !defined(AFS_ARM_DARWIN_ENV)
# include <netinet/if_ether.h>
# endif
# endif
#include <sys/types.h>
#if !defined(AFS_NT40_ENV)
-# if (!defined(AFS_FBSD_ENV) && !defined(AFS_LINUX26_ENV)) || !defined(KERNEL) || defined(UKERNEL)
+# if (!defined(AFS_FBSD_ENV) && !defined(AFS_LINUX_ENV)) || !defined(KERNEL) || defined(UKERNEL)
# include <sys/ioctl.h>
# endif
#endif /* AFS_NT40_ENV */
long parm4, long parm5, long parm6)
{
int code;
-#if defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX20_ENV)
+#if defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX_ENV)
int rval;
#endif
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#if defined AFS_LINUX_64BIT_KERNEL
long long eparm[4];
/* don't want to sign extend it to 64bit, so using ulong */
#endif
}
}
-#if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
+#if defined(AFS_SPARC64_LINUX_ENV) || defined(AFS_SPARC_LINUX_ENV)
/* on sparc this function returns none value, so do it myself */
__asm__ __volatile__("mov %o0, %i0; ret; restore");
#endif
#endif
#endif
#endif
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
return code;
}
#endif
#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
/* Here be hacks. */
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
#define __KERNEL__
#include <linux/string.h>
#define _STRING_H 1
#undef USE_UCONTEXT
#endif
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/* For some reason, this doesn't get defined in linux/types.h
if __KERNEL_STRICT_NAMES is defined. But the definition of
struct inode uses it.
#define _KERNEL 1
#endif
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
#include <nlist.h>
#endif
#include <sys/user.h>
#endif
-#ifndef AFS_LINUX26_ENV
+#ifndef AFS_LINUX_ENV
#include <sys/file.h>
#endif
#include <ufs/ffs/fs.h>
#else
#include "sys/vfs.h"
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#ifndef UIO_MAXIOV
#define UIO_MAXIOV 1 /* don't care */
#endif
#undef LONG_MAX
#undef ULONG_MAX
#define _LINUX_TIME_H
-#ifndef AFS_LINUX26_ENV
+#ifndef AFS_LINUX_ENV
#define _LINUX_FCNTL_H
#endif
-#ifdef AFS_IA64_LINUX24_ENV
+#ifdef AFS_IA64_LINUX_ENV
#define flock64 flock
-#endif /* AFS_IA64_LINUX24_ENV */
-#ifdef AFS_S390_LINUX20_ENV
+#endif /* AFS_IA64_LINUX_ENV */
+#ifdef AFS_S390_LINUX_ENV
#define _S390_STATFS_H
#else
-#ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX_ENV
#define _SPARC64_STATFS_H
#define _SPARC_STATFS_H
#else
-#ifdef AFS_SPARC_LINUX20_ENV
+#ifdef AFS_SPARC_LINUX_ENV
#define _SPARC_STATFS_H
#else
-#ifdef AFS_ALPHA_LINUX20_ENV
+#ifdef AFS_ALPHA_LINUX_ENV
#define _ALPHA_STATFS_H
#else
#define _I386_STATFS_H
-#endif /* AFS_ALPHA_LINUX20_ENV */
-#endif /* AFS_SPARC_LINUX20_ENV */
-#endif /* AFS_SPARC64_LINUX20_ENV */
-#endif /* AFS_S390_LINUX20_ENV */
+#endif /* AFS_ALPHA_LINUX_ENV */
+#endif /* AFS_SPARC_LINUX_ENV */
+#endif /* AFS_SPARC64_LINUX_ENV */
+#endif /* AFS_S390_LINUX_ENV */
struct timezone {
int a, b;
};
#define timer_t ktimer_t
#define timer_t_redefined
#endif
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/* For some reason, this doesn't get defined in linux/types.h
if __KERNEL_STRICT_NAMES is defined. But the definition of
struct inode uses it.
/* got it from linux/types.h */
typedef unsigned long sector_t;
#endif /* HAVE_SECTOR_T */
-#endif /* AFS_LINUX26_ENV */
+#endif /* AFS_LINUX_ENV */
#include <linux/version.h>
#include <linux/fs.h>
#include <osi_vfs.h>
#undef timer_t
#undef timer_t_redefined
#endif
-#else /* AFS_LINUX20_ENV */
+#else /* AFS_LINUX_ENV */
#ifdef AFS_HPUX110_ENV
#define KERNEL
#define _KERNEL 1
#else /* AFS_HPUX110_ENV */
#include "sys/vnode.h"
#endif /* else AFS_HPUX110_ENV */
-#endif /* else AFS_LINUX20_ENV */
+#endif /* else AFS_LINUX_ENV */
#ifdef AFS_HPUX_ENV
#include "sys/inode.h"
#else
#ifdef AFS_SUN5_ENV
#include "sys/fs/ufs_inode.h"
#else
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
#include "ufs/inode.h"
#endif
#endif
} afs_kcondvar_t;
#endif /* AFS_SGI65_ENV */
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#include <asm/atomic.h>
#include <asm/semaphore.h>
#define RX_ENABLE_LOCKS 1
int opaque2;
} afs_kmutex_t;
typedef void *afs_kcondvar_t;
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
#include <afs/exporter.h>
/*#include "afs/osi.h"*/
} osi_timeval32_t; /* Needed here since KERNEL defined. */
/*#include "afs/volerrors.h"*/
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
#define _SYS_TIME_H
#endif
#define AFSNLIST(N, C) nlist64((N), (C))
#endif /* AFS_32BIT_KERNEL_ENV */
#else /* AFS_SGI61_ENV */
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
struct afs_nlist {
char *n_name;
unsigned long n_value;
};
-#else /* AFS_LINUX20_ENV */
+#else /* AFS_LINUX_ENV */
#define afs_nlist nlist
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
#define AFSNLIST(N, C) nlist((N), (C))
#endif /* AFS_SGI61_ENV */
#endif /* defined(AFS_HPUX_ENV) && defined(__LP64__) */
return (char *)str;
}
-#ifdef AFS_LINUX20_ENV
+#ifdef AFS_LINUX_ENV
/* Find symbols in a live kernel. */
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
#define KSYMS "/proc/kallsyms"
#else
#define KSYMS "/proc/ksyms"
ksyms[nksyms].s_value = (int)strtoul(line, &p, 16);
#endif /* AFS_LINUX_64BIT_KERNEL */
p++;
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/* Linux 2.6 /proc/kallsyms has a one-char symbol type
between address and name, so step over it and the following
blank.
#endif
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
/* This is replicated from LINUX/osi_alloc.c */
#define MEM_SPACE sizeof(int)
printf
("\n\nNOTE:\n\tAll [...]* entries above aren't counted towards the total mem since they're redundant\n");
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
if (pnt)
print_alloced_memlist();
#endif
#endif
printf(", v_mregb=0x%lx\n", vep->v_mregb);
#endif
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
/* Print out the stat cache and other inode info. */
printf
("\ti_ino=%d, i_mode=%x, i_nlink=%d, i_uid=%d, i_gid=%d, i_size=%d\n",
vep->i_ino, vep->i_mode, vep->i_nlink, vep->i_uid, vep->i_gid,
vep->i_size);
-#ifdef AFS_LINUX24_ENV
+#ifdef AFS_LINUX_ENV
printf
("\ti_atime=%u, i_mtime=%u, i_ctime=%u, i_version=%u, i_nrpages=%u\n",
vep->i_atime, vep->i_mtime, vep->i_ctime, vep->i_version,
vep->i_atime, vep->i_mtime, vep->i_ctime, vep->i_version,
vep->i_nrpages);
#endif
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
printf("\ti_op=0x%x, i_rdev=0x%x, i_sb=0x%x\n", vep->i_op,
vep->i_rdev, vep->i_sb);
-#else /* AFS_LINUX26_ENV */
+#else /* AFS_LINUX_ENV */
printf("\ti_op=0x%x, i_dev=0x%x, i_rdev=0x%x, i_sb=0x%x\n", vep->i_op,
vep->i_dev, vep->i_rdev, vep->i_sb);
-#endif /* AFS_LINUX26_ENV */
-#ifdef AFS_LINUX24_ENV
+#endif /* AFS_LINUX_ENV */
+
+#ifdef AFS_LINUX_ENV
printf("\ti_sem: count=%d, sleepers=%d, wait=0x%x\n", vep->i_sem.count,
vep->i_sem.sleepers, vep->i_sem.wait);
#else
printf("\ti_sem: count=%d, waking=%d, wait=0x%x\n", vep->i_sem.count,
vep->i_sem.waking, vep->i_sem.wait);
#endif
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
printf("\ti_hash=0x%x:0x%x, i_list=0x%x:0x%x, i_dentry=0x%x:0x%x\n",
vep->i_hash.pprev, vep->i_hash.next, vep->i_list.prev,
vep->i_list.next, vep->i_dentry.prev, vep->i_dentry.next);
-#else /* AFS_LINUX26_ENV */
+#else /* AFS_LINUX_ENV */
printf("\ti_hash=0x%x:0x%x, i_list=0x%x:0x%x, i_dentry=0x%x:0x%x\n",
vep->i_hash.prev, vep->i_hash.next, vep->i_list.prev,
vep->i_list.next, vep->i_dentry.prev, vep->i_dentry.next);
-#endif /* AFS_LINUX26_ENV */
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
+#endif /* AFS_LINUX_ENV */
}
void
}
}
}
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
printf("\tmapcnt=%d\n", vep->mapcnt);
#endif
}
viced_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
afs_uint32 rcode;
-# ifndef AFS_LINUX20_ENV
+# ifndef AFS_LINUX_ENV
void (*old) (int);
old = (void (*)(int))signal(SIGSYS, SIG_IGN);
# endif
rcode = syscall(AFS_SYSCALL, 28 /* AFSCALL_CALL */ , a3, a4, a5);
-# ifndef AFS_LINUX20_ENV
+# ifndef AFS_LINUX_ENV
signal(SIGSYS, old);
# endif
afs_int64 _##buf##_l[SYNC_PROTO_MAX_LEN/sizeof(afs_int64)]; \
char * buf = (char *)(_##buf##_l)
-#ifdef AFS_LINUX26_ENV
+#ifdef AFS_LINUX_ENV
/* Some Linux kernels have a bug where we are not woken up immediately from a
* select() when data is available. Work around this by having a low select()
* timeout, so we don't hang in those situations. */
# define IH_CREATE(H, D, P, N, P1, P2, P3, P4) \
ih_icreate(H, D, P, N, P1, P2, P3, P4)
-# ifdef AFS_LINUX22_ENV
+# ifdef AFS_LINUX_ENV
# define OS_IOPEN(H) -1
# else
# ifdef O_LARGEFILE
# define OS_SYNC(FD) fsync(FD)
-# ifdef AFS_LINUX22_ENV
+# ifdef AFS_LINUX_ENV
# define IH_INC(H, I, P) -1
# define IH_DEC(H, I, P) -1
# define IH_IREAD(H, O, B, S) -1
O, B, S)
# define IH_IWRITE(H, O, B, S) \
inode_write((H)->ih_dev, (H)->ih_ino, (H)->ih_vid, O, B, S)
-# endif /* AFS_LINUX22_ENV */
+# endif /* AFS_LINUX_ENV */
#endif /* AFS_NAMEI_ENV */
#include <ctype.h>
#ifndef AFS_NAMEI_ENV
-#if defined(AFS_LINUX20_ENV)
+#if defined(AFS_LINUX_ENV)
/* ListViceInodes
*
* Return codes:
return 0;
}
-#endif /* AFS_LINUX20_ENV */
+#endif /* AFS_LINUX_ENV */
static afs_int32
convertVolumeInfo(FdHandle_t *fdhr, FdHandle_t *fdhw, VolumeId vid)
{
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#include <sys/mnttab.h>
#include <sys/mntent.h>
#else
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
#include <mntent.h>
#include <sys/statfs.h>
#else
VCheckPartition(char *part, char *devname, int logging)
{
struct afs_stat_st status;
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_NT40_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_NT40_ENV)
char AFSIDatPath[MAXPATHLEN];
#endif
}
#endif
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_NT40_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_NT40_ENV)
strcpy(AFSIDatPath, part);
strcat(AFSIDatPath, "/AFSIDat");
#ifdef AFS_NAMEI_ENV
return -1;
#endif
#endif /* AFS_NAMEI_ENV */
-#endif /* !AFS_LINUX20_ENV && !AFS_NT40_ENV */
+#endif /* !AFS_LINUX_ENV && !AFS_NT40_ENV */
VInitPartition(part, devname, status.st_dev);
}
#endif
-#ifdef AFS_LINUX22_ENV
+#ifdef AFS_LINUX_ENV
int
VAttachPartitions(void)
{
return errors;
}
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
/* This routine is to be called whenever the actual name of the partition
* is required. The canonical name is still in part->name.
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <sys/inode.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <sys/inode.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_LINUX_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <sys/inode.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_DARWIN_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */
#if defined(AFS_SGI_ENV)
#include <mntent.h>
#else
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
#include <fstab.h> /* Need to find in libc 5, present in libc 6 */
#endif
#endif
volser_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
afs_uint32 rcode;
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
void (*old) (int);
old = signal(SIGSYS, SIG_IGN);
rcode =
syscall(AFS_SYSCALL /* AFS_SYSCALL */ , 28 /* AFSCALL_CALL */ , a3,
a4, a5);
-#ifndef AFS_LINUX20_ENV
+#ifndef AFS_LINUX_ENV
signal(SIGSYS, old);
#endif