Give functions that need them return values
Add prototyping for server_proc and rx_ts_tinfo_init
Make debug functions only build when RXDEBUG is enabled
Reviewed-on: http://gerrit.openafs.org/61
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
The vlcient.h header file just provides definitions for functions that
are now protoyped elsewhere by rxgen. It is only referenced by
vlclient.c which was already including the rxgen header. So, nuke
vlcient.h, and references to it.
Reviewed-on: http://gerrit.openafs.org/60
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
Testing turned up a few more errors with parallel builds:
- Linux: Apply a similar fix for "make dest" to the one in the previous
patch for "make install". Avoid conflict between DESTDIRS and COMPDIRS,
which also prevents unneeded duplicate work.
- Fix a couple of cases where we have 2 targets in a single rule with a
command that generates both of them. Two parallel jobs can run this
command at the same time, with missing or corrrupted files as a result.
The workaround: make one of the targets build the files, and make the
second target depend on the other one.
Reviewed-on: http://gerrit.openafs.org/57
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/venus/test/fulltest.c wants to use getcwd and expects HAVE_GETCWD to
be defined, but we weren't probing for it in configure.
Reviewed-on: http://gerrit.openafs.org/51
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The fasttime functions are used regardles of whether we're using
pthreads or LWP. Previously, lwp.h only provided their prototypes
if LWP was in use. Change this so these prototypes are always provided,
by refactoring the header a little. In the process, remove some
duplicate header includes.
Reviewed-on: http://gerrit.openafs.org/56
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fixes several problems with parallel makes in the current source:
- Add '+' prefix to many top-level Makefile commands. This informs make that
the following command should be treated as a sub-make and propagates the -jN
flag.
- Add a few missing dependencies
- Tweak some Makefiles that work with generated header files to prevent cases
where we attempt to use the file while it's being generated
- For the Linux kernel build, eliminate duplicated effort between COMPDIRS
and INSTDIRS, which also prevents conflict between the two in a
parallel situation.
FIXES 125031
Reviewed-on: http://gerrit.openafs.org/3
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Refer to srcdir, not SYS, for syscall.s
Don't build fc_test for all (libsys doesn't exist yet)
Include needed header for Fd_t in xfs_size_check
Reviewed-on: http://gerrit.openafs.org/41
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
struct clock contains signed seconds and signed microseconds.
The format specification should be %d.%06d in all cases.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/55
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
rx packet resends were being double counted.
rx data packets sent were one more per send list than it
should have been.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/54
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
A very small amount of code cleanup to add prototypes, ANSIfy,
and remove warnings from the fms.c file
Reviewed-on: http://gerrit.openafs.org/53
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Some confusion had ensued about the usage of our printf cast helper
functions. Rename these to attempt to allay that confusion, and restore
the functions themselves to their original definitions.
Essentially, afs_printable_int32_ld() and friends are helpers to go
from afs specifc types to things that can be emitted by printf without
causing compiler warnings.
Also clean up some additional warnings from type mismatches between
escapes in printf format strings and the variables being printed.
Reviewed-on: http://gerrit.openafs.org/50
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Where we can, include headers from the include directory
Resolve a load of const char* /char * issues
Mark some Windows only variables as such
Fix prototypes
Reviewed-on: http://gerrit.openafs.org/49
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Now that butm is sharing its prototype, further cleanup, ansification
and warnings reduction for butc.
Reviewed-on: http://gerrit.openafs.org/46
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Add exported header for the butm directory so it can be used
elsewhere
Reviewed-on: http://gerrit.openafs.org/45
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Other modules need prototypes from the budb directory, so we need
to export this header. However it contains lots of internal functions.
So, split the header into budb_prototypes.h and budb_internal.h, and
reference the internal.h header locally.
Reviewed-on: http://gerrit.openafs.org/44
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add afs/vol_prototypes.h to src/vol/NTMakefile so
it will be installed in the public include directory.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/42
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Replace all uses of strcpy and strcat in src/vol/namei_ops.c with either
strlcpy/strlcat or afs_snprintf as appropriate.
Reviewed-on: http://gerrit.openafs.org/29
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
The change in b210152420 broke
systems without posix regexes by removing, rather than
conditionalising the 'ccode' variable
Reviewed-on: http://gerrit.openafs.org/40
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/util/netutils.c must include rx/rx.h in order to avoid
warnings due to the lack of prototypes for rx functions.
src/rx depends on src/util being built in order to properly
compile. Add a rx_headers build rule to the top level
NTMakefile to permit rx headers to be installed before
src/util is built.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/38
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
A first pass at prototyping and warning reduction for the kauth
directory. kauth is plagued by the des key type problems, and
no attempt to remedy this has been made. Some other complex
warnings remain - it didn't seem worth the effort to do this
in too much detail, as it's dying soon.
Reviewed-on: http://gerrit.openafs.org/23
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Rework prototyping in the bucoord directory so that bucoord_prototypes.h
can be used by others who need definitions of the dlq_* types.
Add additional prototyping and header includes so these types work correctly
No Windows specific changes are required, as the NTMakefile doesn't have
header dependencies
Reviewed-on: http://gerrit.openafs.org/35
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Prototyping and warning message reduction for the volser directory.
Adds physio.h and dumpstuff.h as internal header files,
Many error code variables are changed from being afs_int32, to the
'Error' typedef, to remove signed comparison errors.
Reviewed-on: http://gerrit.openafs.org/19
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
pr_PrintEntry isn't used outside of the ptserver directory, and requires
struct prentry, which is defined internally, so remove it from ptuser.h,
and create a new internal header to hold it.
Also, tidy up some type mismatch warnings by making static strings const
char *
Reviewed-on: http://gerrit.openafs.org/22
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
Change all the function definitions in ptclient to ANSI form
Reviewed-on: http://gerrit.openafs.org/32
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
Resolve a number of minor warnings
Prototype the stolower function for use elsewhere
Reviewed-on: http://gerrit.openafs.org/21
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Very small amount of prototyping
Rewrite comment block so it wraps at 80 lines
Make sure there are no implicit ints
Reviewed-on: http://gerrit.openafs.org/18
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
Now that src/config/NTMakefile.<platform> actually uses the
override value. Lets fix the definition of MKDIR to avoid
the Unix style executables.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/31
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The MKDIR macro is current assigned to mkdir which causes
the cygwin/msys mkdir.exe commands to be used instead of
the cmd.exe built-in command. Change this to use "md" instead
so that the built-in will be used by default.
In addition, permit the macros to be overridden by the top
level NTMakefile or the environment.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/30
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
since this function appeared the compiler on HP-UX 11i started
segving. since it's not necessary, we simply remove it
Reviewed-on: http://gerrit.openafs.org/28
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
The HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon
"PerFileAccessCheck" registry value (DWORD) is intended for
use only by developers who wish to test how Windows would
behave if a per-file access rights check was performed.
Windows performs all access rights checks using the directory
access rights. There is no support for the VL_DFSFILESET flag.
During CreateFile() processing the requested access rights are
checked against the access rights reported by the file server
for the directory. If the reported rights are more permissive than
the effective access rights for the file, Windows applications
(including the Explorer Shell) will behave quite poorly. In other
words, if the request is for write privilege and the CreateFile()
successfully opens the file with write privilege, subsequently
reporting an access denied on a WriteFile() call will result in
very poor behavior.
The addition of this option is simply to make it easier on
developers to test various prototype solutions for adding per-file
access rights.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/15
Reviewed-by: Asanka Herath <asanka@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
- Remove some further warnings from the vol directory
- Add volutil_PartitionName2_r to afsutil_prototypes.h
- Export vol_prototypes.h so it can be used elsewhere in the tree
Reviewed-on: http://gerrit.openafs.org/17
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Prototype, ansify, and other do warning cleanups on code in the vlserver
directory.
Reviewed-on: http://gerrit.openafs.org/16
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some Linux kernel probes for the existence of header files were done
with file existence checks (test -f). This breaks if the kernel build
system is stacking multiple directories of headers together with
compile-time -I include path options, as is the case for the current
Debian Linux header packages. Instead, always use kbuild to check
whether a kernel header is available.
Similarly, use AC_TRY_KBUILD instead of AC_TRY_COMPILE when checking
for an SELinux kernel, since AC_TRY_COMPILE doesn't call into kbuild
and won't get the correct kernel header paths.
This is part of the fix for Debian Bug#521745 and has been included in
the Debian package since 1.4.10+dfsg1-1.
Reviewed-on: http://gerrit.openafs.org/5
Verified-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The current kernel module build infrastructure relies on the ability to
create symlinks from known directory names used in the AFS code to the
actual locations of the kernel header files. This breaks if there is no
single kernel header tree and instead multiple trees are layered together
by kbuild using compile-time -I include paths.
Attempt to detect this case by seeing if linux/types.h is in the kernel
header directory where we expect it. If not, rather than creating
symlinks for h, sys, and netinet, create directories and populate them
with single-line headers that just include the corresponding linux/*.h
header. The list of headers for which to do this is generated dynamically
by analyzing the AFS kernel source code and looking for relevant #include
directives.
This patch has been part of the Debian OpenAFS package since
1.4.10+dfsg1-1. The check for whether we have layered kernel header trees
may be specific to Debian and may require modification later if other
Linux distributions do something similar.
FIXES 124583
Reviewed-on: http://gerrit.openafs.org/6
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
The move to git means that we can no longer populate the RCSID
macro in the way that it was used with CVS. This patch simply
removes the macro from every file, except where it contains
information from upstream (and it's in a comment).
Reviewed-on: http://gerrit.openafs.org/14
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
To include AFS code in loadable modules such as PAM modules, NSS modules,
or Perl/Python/PHP/Ruby extensions, it needs to be built PIC or one must
link with the AFS shared libraries. Since we haven't historically been
that great about maintaining the shared library ABI, it's nice to have
static libraries built with PIC code that can be linked into such modules.
Based on a patch by Garrett Wollman updated with the build system changes
that happened after 1.4.
Make shlib makefiles have clean rules for PIC libraries.
Make RedHat specfile know how to deal with PIC libraries.
Reviewed-on: http://gerrit.openafs.org/8
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Vos was not displaying the "N accesses in the past day (i.e., vnode
references)" message when updateDate was unset. Fix that.
FIXES 125064
Reviewed-on: http://gerrit.openafs.org/9
Verified-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The -valid switch to vos addsite doesn't take an argument, and it is
optional. Correcting documentation to reflect that.
Reviewed-on: http://gerrit.openafs.org/11
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
src/config/linux-version already had support for handling either versioned
or unversioned kernel source directories, but the grep for UTS_RELEASE
was unconditionally done against the versioned source tree, ignoring the
previous determination of where the header file was.
Instead, check instead the header file location that we'd previously
determined.
This patch has been tested in the Debian OpenAFS 1.4.11~pre3+dfsg-1
package.
Reviewed-on: http://gerrit.openafs.org/4
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>