Commit Graph

67 Commits

Author SHA1 Message Date
Simon Wilkinson
cdc612596d xstat: Tidy up header includes
Remove headers which are provided by libroken, and reorder header
includes so that they're a bit a more legible.

Change-Id: I750ac319feb38e416abb0b8e3575613309c6ab8e
Reviewed-on: http://gerrit.openafs.org/4422
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-04 12:12:26 -07:00
Simon Wilkinson
e2b4fde0b5 libroken: Build on windows
A minimal change set to get libroken to build on Windows. Sadly,
libroken contains definitions for a number of platform compatibility
macros which were previously scattered throughout the windows code.
These scattered macros have to be removed in order to build libroken.

The impact of this removal is that a very large number of files
throughout the tree require the addition of "roken.h" to pick up the
new compatibility code. The bulk of this change is adding these
includes.

In addition, some of the added includes add roken dependencies to the
Unix build. So, also add libroken to the build rules in affected Unix
Makefiles.

Change-Id: Ifba431bd37e67b1e273fbc6f69b805a232193456
Reviewed-on: http://gerrit.openafs.org/3205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-17 08:12:29 -08:00
Marc Dionne
783d560eef xstat: Set but not used variables
Remove unused variables.

Spotted by gcc 4.6

Change-Id: Ibe26d3c58027704d525424a15f71ae954a5c2be4
Reviewed-on: http://gerrit.openafs.org/3183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 09:04:04 -07:00
Simon Wilkinson
f22ae5f7d8 Unix: Rework build system
Rework the unix build system so that we support taking CFLAGS and
LDFLAGS from the command line, and don't replace them with our own
settings. Also, take the opportunity to bring some sanity and
consistency into our Makefiles.

The standard Makefile.config  now defines rules for LWP, pthreaded
and shared library builds. The CFLAGS settings for these are
called LWP_CFLAGS, PTH_CFLAGS and SHD_CFLAGS, respectively.
Similarly named variables are provided for LDFLAGS.

A module may select to use a particular build type for its suffix
rule by including either Makefile.lwp, Makefile.pthread or
Makefile.shared from src/config. This creates an appropriate .c.o
suffix rule, defines AFS_CFLAGS and AFS_LDFLAGS as appropriate, and
creates two rules AFS_CCRULE and AFS_LDRULE, which can be used to
build, and link objects. For example:

foo.o: foo.c
	$(AFS_CCRULE) foo.c

foo: foo.o
	$(AFS_LDRULE) foo.o

If a you wish to override the CFLAGS or LDFLAGS for an object build
using these rules (or through the .c.o suffix rule) you can do so,
by defining CFLAGS_<object> or LDFLAGS_<object>. For example:

CFLAGS_foo.o= -DDEBUG
LDFLAGS_foo = -ldebugging

A module may also alter the behaviour of the compile and link steps
module wide by defining MODULE_CFLAGS or MODULE_LDFLAGS.

This functionality is now used throughout the tree:
    *) Suffix rules are used wherever possible, removing a number of
       unecessary build rules.
    *) All link steps are replaced with AFS_LDRULE
    *) All standard compile steps are replaced with AFS_CCRULE
    *) Unusal compile steps are defined, as far as possible, int
       terms of the LWP_ PTH_ and SHD_ variables.
    *) The use of $? has been removed entirely, as it makes it
       impossible to provide build rules with dependency information

Change-Id: If76207e45da402a0ed9d7c1bdbe83c58c911a4f2
Reviewed-on: http://gerrit.openafs.org/2896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-11 08:00:29 -07:00
Chas Williams (CONTRACTOR)
60c4b24889 sin_family is not network order
sin_family isnt sent over the network and therefore doesnt need
htons().  sin_family is essential the same as domain, and no one
does socket(htons(AF_INET), ...)

Change-Id: Ie0e2396f78e0934d49aeeacfc9c5ffe98df211b6
Reviewed-on: http://gerrit.openafs.org/2891
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-03 12:09:56 -07:00
Marcus Watts
753a316821 death to trailing whitespace
if we're gonna clean up...

Change-Id: I5ab03f29468577b62dacab41a67eadfd8c43f812
Reviewed-on: http://gerrit.openafs.org/2463
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-16 21:32:53 -07:00
Marcus Watts
4a531cb706 death to register
in soviet compilers, compiler optimizes you.
stop providing dated (and annoying for debugging) register keywords.

Change-Id: Ibcac0aa3f353fe531b9be0beedca919fb947bfab
Reviewed-on: http://gerrit.openafs.org/2436
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-16 21:32:01 -07:00
Andrew Deason
16bad29f03 Fix objdir install/dest targets
Many 'install' and 'dest' targets were referring to source files
without a srcdir prefix. Fix them so we can 'make install' / 'make
dest' with objdir.

Change-Id: Id76c5e326309baf8ec3f1213ecb2e40b19aea7d4
Reviewed-on: http://gerrit.openafs.org/2522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:14:50 -07:00
Michael Meffie
c44f640df3 xstat: fix large integer output
Do not print large positive integers as negative.

Change-Id: Ia7f96e64ee6ad0c58de0d03779b230623d60b114
Reviewed-on: http://gerrit.openafs.org/1949
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-12 11:55:26 -07:00
Simon Wilkinson
481098e04c Unix CM: Tidy up the statistics interface
Sort out the function call statistics interface. Whilst it's still
wretched, this makes it a little less so.
*) Add some warnings at the start of the afs_CMStats structure about
   what needs to be done when adding things there
*) Remove the conditionals around the CacheBypass counters, so that stats
   clients don't need to be built with the same options as servers
*) Add all of the stats entries added after IBM to the xstat_cm_test
   routine
*) Add a warning to xstat_cm_test if the data returned from the server
   differs in size to the local stats structure.

Change-Id: If1ffb68c84bca972f685ae619febba8c6f8b5e17
Reviewed-on: http://gerrit.openafs.org/1319
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-02-17 05:10:05 -08:00
Simon Wilkinson
36524b2ed7 Rationalise our include paths
Our include paths are a bit of a mess. Fix these so that they're
more rational, and more in line with normal coding style.

In particular:
   *) Don't include all of the subdirectories of our top level
      include directory. If a file wants afs/file.h, it should
      include that, not "file.h"
   *) Try to avoid including '.' in the search path (although
      objdir builds make this harder)
   *) Don't blindly include other directories from the code tree
      in the search path. If a package wants another packages header,
      then it should get it from the include directory
   *) Use the convention that quoted includes ("") pick up local
      headers. Bracketed includes (<>) pick up ones from the top level
      include dir
   *) In directories which pull in files from multiple packages, don't
      blindly put all of the package directories in the search path.
      Specifically include the file's package directory when required

The big change here is that it's no longer possible to hide a system
include by placing a header of the same name in include/afs. The most
common case where this was happening was for 'assert.h'

Change-Id: I0796fabcf83ffcd74e533624c64e138a160dd632
Reviewed-on: http://gerrit.openafs.org/834
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-11-17 13:12:57 -08:00
Andrew Deason
db949b7fad Correct and use AFS_SIZET_FMT
On *nix, a size_t needs either %lu or %u to be interpolated in a string,
depending on if we're on an ILP32 arch or not. Define AFS_SIZET_FMT
accordingly, and actually use AFS_SIZET_FMT when we try to print a
size_t.

This removes numerous -Wformat warnings, at least when building on
i386_linux26.

Reviewed-on: http://gerrit.openafs.org/592
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-07 20:09:30 -07:00
Simon Wilkinson
0666fe12fa Fix printfs of time for Darwin
Darwin uses a fancy type for tv_sec, which needs to be cast to long
before it can be printed.

Reviewed-on: http://gerrit.openafs.org/165
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2009-08-21 14:16:26 -07:00
Jeffrey Altman
1c12747818 Windows: Permit build system to update symbol store
Microsoft Debugging Tools for Windows, Visual Studio Debugger,
and SysInternals tools can all make use of a Symbol Server.
  http://msdn.microsoft.com/en-us/magazine/cc163563.aspx
The commit adds functionality to the build system to automatically
add binaries and symbols to a symbol store during the build.
This functionality is only enabled if two environment variables
are defined:

  SYMSTORE_EXE  - specifies the location of symstore.exe
  SYMSTORE_ROOT - specifies the location of the symbol store

an optional environment variable permits an arbitrary comment
to be added to the symbol store history file.

  SYMSTORE_COMMENT - arbitrary text to be added to the history

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/324
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-19 10:19:43 -07:00
Simon Wilkinson
967abaf29b Make rxgen emit prototype for ExecuteRequest
Make rxgen provide a prototype in its header file for _ExecuteRequest, and
remove all of the adhoc prototypes from the tree.

Reviewed-on: http://gerrit.openafs.org/247
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 18:42:47 -07:00
Simon Wilkinson
e8a2833996 Squish more warnings in xstat
Use a correct prototype for a_ProbeHandler in xstat_cm_Init
Fix a printf warning
rx_getAllAddr and afs_cb_interface.addr disagree on the sign of addresses
afs_interface.addr is a [], which we then use & to get the address of. Fix
this to stop the compiler from sulking.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/184
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-23 10:35:00 -07:00
Simon Wilkinson
2cf12c43c6 Use AFS_PTR_FMT to format pointers
Replace "0x%x" with "%"AFS_FMT_PTR for pointer printing in all locations
where gcc flags a warning.

This change is warnings reduction driven - there are many more
occurences of this in the code which don't currently result in
compiler warnings, because the va_args functions they're used in
aren't defined as printflike.

Reviewed-on: http://gerrit.openafs.org/75
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-16 12:36:19 -06:00
Marc Dionne
d46713d4bd Parallel make fixes
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>
2009-07-11 08:07:11 -06:00
Simon Wilkinson
7c472cd9a6 Prototype the xstat directory
Prototype, ansify, and remove errors in the xstat directory

Reviewed-on: http://gerrit.openafs.org/20
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:31:51 -06:00
Simon Wilkinson
3bb5fa5f1b Remove the RCSID macro
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>
2009-07-09 22:58:37 -06:00
Simon Wilkinson
d5081f264d Remove CVS ignore files
Now we're in git we don't need any cvsignore files any more...

Reviewed-on: http://gerrit.openafs.org/1
Verified-by: Derrick Brashear <shadow@gmail.com>
Reviewed-by: Derrick Brashear <shadow@gmail.com>
2009-07-06 11:03:16 -06:00
Simon Wilkinson
c41a467741 gitignore-20090615
LICENSE IPL10

make gitignore files
2009-06-15 23:29:29 +00:00
Jeffrey Altman
218f08ffed xstat-printf-ptr-format-20090320
LICENSE IPL10

make use of AFS_PTR_FMT to avoid warnings on Windows.
2009-03-20 17:10:06 +00:00
Jeffrey Altman
8c22d2388a windows-stat-resource-files-20080730
LICENSE MIT

Add version resource info to xstat_cm_test.exe and xstat_fs_test.exe
2008-07-30 23:16:24 +00:00
Jeffrey Altman
65bf7cdb6d windows-code-signing-20080702
LICENSE MIT

Add code signing with signtool.exe to the build process.
If all three of the required CODESIGN_xxxx environment
variables are defined, signtool will be used to sign each
exe, dll, and installer as they are built.

The three environment variables are:

  CODESIGN_DESC = <description of application>
  CODESIGN_TIMESTAMP = <url of certificate authority timestamp server>
  CODESIGN_URL = <end user help URL>

The default signing certificate is the one that will be used by
signtool.  If these environment variables are not defined, code
signing will be skipped.
2008-07-02 13:41:07 +00:00
Simon Wilkinson
ff988ead4e lwp-protoize-20080310
LICENSE IPL10

protoize lwp. make it match pthreads' idea of createprocess
2008-03-11 17:46:58 +00:00
Christof Hanke
da18bb147b assorted-warning-cleanup-20071126
add missignheader files, missing return values, correct a few calls to printf
2007-11-26 21:03:31 +00:00
Simon Wilkinson
855e644261 openafs-void-star-pointers-20071031
convert anonymous pointers from char* to void*
2007-10-31 04:05:27 +00:00
Simon Wilkinson
7d05bd439e openafs-string-header-cleanup-20071030
include only what we need
2007-10-30 15:10:37 +00:00
Russ Allbery
3a34d8cb4f autoconf-likes-relative-paths-20060802
When using the install-sh that ships with the source tree, Autoconf
substitutes in a relative path just to be annoying.  Define the INSTALL
variables in each individual Makefile so that they find the proper file.
Remove the definitions from Makefile.config so that no one will
accidentally get the wrong ones.
2006-08-03 03:37:12 +00:00
Russ Allbery
8df5dcbc91 death-to-pinstall-20060801
Delete pinstall and convert the entire tree to use the install program
found by configure (falling back on install-sh in the local tree).  This
means that we have to pre-create directories with install -d.  Also redo
the install and dest rules to be lists of install rules rather than
dependencies driving separate make rules so that running make install will
always update the target directory with the current code, even if there are
files in the install area that are newer.

Stop installing libafssetpag; we're about to kill it in favor of a
different library.  Remove some djgpp rules.
2006-08-01 21:03:54 +00:00
Christopher Allen Wing
2a1aff4104 afsutil-includes-20060623
Include <afs/afsutil.h> for prototypes of afs_inet_ntoa and afs_inet_ntoa_r.
2006-06-24 06:47:09 +00:00
Jeffrey Altman
78bb852509 xstat_fs-fix-20060407
as pointed out by cg2v@andrew.cmu.edu the addition of performance
collection data for the GetCapabilities RPC broke backward compatibility
with previous builds because it altered the size of the data structure
sent on the wire.

Instead we count the number of GetCapabilties calls but do not gather
performance timing data as this can be done using spare fields.
2006-04-07 06:34:26 +00:00
Derrick Brashear
54ce580ef3 time-t-casting-fixes-20060404
FIXES 15169

hopefully the rest of this
2006-04-04 21:51:13 +00:00
Rainer Toebbicke
cc324ae065 xstat-fs-callbacks-20060309
FIXES 27912

add new collection with callback stats
2006-03-09 16:25:48 +00:00
Ed Moy
9f94892f8d darwin-x86-and-leopard-20060309
updates for darwin x86, and pre-leopard
2006-03-09 06:35:14 +00:00
Jeffrey Altman
638eef405b windows-xstat-20060304
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

build xstat utils for windows

====================

more windows specific mods plus improved output of ipaddrs and port
numbers when debugging
2006-03-06 03:11:31 +00:00
Jeffrey Altman
127ea5ae7d xstats-getcapabiliites-20060304
add the GetCapabilities RPC to the ops table
2006-03-04 22:02:57 +00:00
Derrick Brashear
3b290d5b79 dedebug-20051007
perhaps this should never be pulled up.

anyway, implement dentry cache status dumping for linux. and provide a tool to dump it

disabled (tool, not rpc) by default

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

perhaps this should never be pulled up.

anyway, implement dentry cache status dumping for linux.^? and provide a tool to
 dump it

disabled (tool, not rpc) by default

====================

perhaps this should never be pulled up.

anyway, implement dentry cache status dumping for linux.^? and provide a tool to
 dump it

disabled (tool, not rpc) by default
2005-10-07 21:11:01 +00:00
Derrick Brashear
4fa2511a44 split-dcache-20050427
split for rw/ro dcaches to allow portion of cache to be dedicated

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

update
2005-04-28 23:14:57 +00:00
Derrick Brashear
d9e55baca1 fs-busy-stats-20050113
add support for counting number of vbusies returned
2005-01-14 03:03:27 +00:00
Derrick Brashear
872bc94f8c reindent-20030715
FIXES 1774

thanks to nneul@umr.edu for providing a script to do this.
gnu indent 2.2.9 options:
-npro -nbad -bap -nbc -bbo -br -ce -cdw -brs -ncdb -cp1 -ncs -di2 -ndj -nfc1
-nfca -i4 -lp -npcs -nprs -psl -sc -nsob -ts8

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 1774

fix subst mistake
2003-07-16 00:28:24 +00:00
Derrick Brashear
08534f1345 xstat-protoizing-20030309
protoize one more directory
2003-03-10 02:00:20 +00:00
Derrick Brashear
50ee992c31 protoize-callback-interfaces-20030304
more random protoizing
2003-03-04 16:26:29 +00:00
Derrick Brashear
2712c1202a capabilities-20030304
need to remove dummy capability, but otherwise this is the rpc part.
2003-03-04 16:19:46 +00:00
Nathan Neulinger
580af44321 makefiles-cflag-cleanup-20030111
move cflags back to makefile.config, more cleanup, dup removal
2003-01-11 07:33:52 +00:00
Nickolai Zeldovich
629d080654 This is mostly a rewrite of src/afs/afs_cell.c, and associated changes
to other things.  Features of the new cell code:

 * Persistent name-to-cell-number mapping across reboots, to ensure the
   cell numbers in the dcache are meaningful.  Stored in the new cache
   file, /usr/vice/cache/CellInfo.
 * Allow cmdebug to query the cell number to cell name mapping.
 * Allow clients to have an empty CellServDB as long as AFSDB is enabled
   and ThisCell has AFSDB records.
 * The home cell retains the setuid bit even if looked up via AFSDB.
 * Dynroot gets its own cell, rather than piggybacking on cell 1.
 * Cell 1 is no longer special; cell numbers are now semi-opaque.
 * Convert cell traversal code to using GetCellByIndex rather than
   directly poking at CellLRU / afs_xcell.
 * Separate cells from aliases, which shouldn't have been the same
   in the first place.
 * Cleaner code (IMHO).

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

make the arguments afs_CellNumValid takes match the prototype (since it
really is a afs_int32 it looks like)

====================

update irix to deal

====================

update irix to deal

====================


Fix some more references to the now-nonexistant cell->index
2002-08-23 04:31:38 +00:00
Derrick Brashear
8e66ec5e01 prototypes-fixes-20020821
screw it. if winnt can have generic pointers, so can we

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

and cast all the pointers
2002-08-22 19:45:11 +00:00
Nathan Neulinger
8f2df21ffe pull-prototypes-to-head-20020821
pull up prototypes to head
2002-08-21 19:52:17 +00:00
Derrick Brashear
f2ab9fd440 afs-getcell-pioctl-should-be-able-to-provide-complete-list-20020731
don't use the LRUq since it can make us miss cells. don't use the existant
index because it includes cell aliases
2002-07-31 23:15:16 +00:00