Age | Commit message (Collapse) | Author |
|
2006-05-28 Paul Jakma <paul.jakma@sun.com>
* memory.c: malloc.h is deprecated in favour of stdlib.h, however
we still need it on GNU Libc for mallinfo().
|
|
2006-02-15 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Check for mallinfo, being careful to link test
so we can detect things like umem being used (which doesn't
provide a mallinfo).
* lib/memory.c: (mtype_memstr) new helper function to
return human friendly string for a byte count.
(mtype_stats_alloc) new function, for users to retrieve
number of objects allocated.
(show_memory_mallinfo) New function, show mallinfo statistics
if available.
(show_memory_all_cmd) Call show_memory_mallinfo, if mallinfo
is available.
* lib/memory.h: Export mtype_memstr and mtype_stats_alloc.
Provide a define for a reasonable buffer size for
mtype_memstr.
|
|
* memory.c: (show_memory_vty) Omit zero statistics. Print separators
only if some non-zero stats have been printed in between.
(show_separator) New function to print a separator.
(show_memory_all) Keep track of whether a separator is needed
between the different memory statistics groups.
|
|
* (general) extern and static'ification of functions in code and
header.
Cleanup any definitions with unspecified arguments.
Add casts for callback assignments where the callback is defined,
typically, as passing void *, but the function being assigned has
some other pointer type defined as its argument, as gcc complains
about casts from void * to X* via function arguments.
Fix some old K&R style function argument definitions.
Add noreturn gcc attribute to some functions, as appropriate.
Add unused gcc attribute to some functions (eg ones meant to help
while debugging)
Add guard defines to headers which were missing them.
* command.c: (install_node) add const qualifier, still doesnt shut
up the warning though, because of the double pointer.
(cmp_node) ditto
* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
fromn vty.h ones to fix some of the (long) < 0 warnings.
* thread.c: (various) use thread_empty
(cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
removed from ospfd/ospf_vty.h
* zebra.h: Move definition of ZEBRA_PORT to here, to remove
dependence of lib on zebra/zserv.h
|
|
* memory.c: Make the string field much wider
* memtypes.c: Correct the prefix list str/entry strings
|
|
* memtypes.c: The new, unified location for memory type definitions.
The memtype enum and declarations for memory_lists are built from
this automatically and put into memtypes.h.
* memtypes.awk: New script to generate memtypes.h from memtypes.c
* memory.h: Finally, the enum can banished!
* memory.c: Finally, the seperate mtype memory_list definitions can
be banished!
(log_memstats) Increase width of fields
(show_memory_zebra_cmd) display zebra specific memory types.
Increase width of fields.
* Makefile.am: Add memtypes.{c,h}, add BUILT_SOURCES for memtypes.h
Add a rule to build memtypes.h using memtypes.awk.
Add memtypes.awk to EXTRA_DIST.
|
|
* prefix.c: (prefix_copy) Error message before abort should
have severity LOG_ERR, not LOG_INFO.
* memory.c: (mtype_log) Log level should be LOG_DEBUG, not LOG_INFO.
|
|
* log.c, log.h, memory.c: Change function name from zlog_backtrace_safe
to the more self-explanatory zlog_backtrace_sigsafe.
|
|
* log.c: (zlog_backtrace) New function to log a backtrace.
(zlog_backtrace_safe) Log a backtrace in an async-signal-safe way.
Unfortunately, this function does not support syslog logging yet.
(zlog_signal) Move backtrace code into separate function
zlog_backtrace_safe.
(_zlog_assert_failed) Call zlog_backtrace before aborting.
* log.h: Declare new functions zlog_backtrace and zlog_backtrace_safe.
* memory.c: (zerror) Call zlog_backtrace before aborting.
|
|
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c
needs to include "log.h" to pick up the declaration.
|
|
* memory.h: Fix prototype for memory_init().
* memory.c: Declare many functions and data structures static instead
of global. Fix prototype for memory_init().
|
|
* memory.c: (zerror) Use zlog_err instead of fprintf to stderr.
Instead of exiting, log currenty memory usage and then abort.
(log_memstats) New function to log memory statistics, called by
zerror.
(show_memory_all) Loop over new mlists array instead of calling
show_memory_vty separately for each memory_list.
|
|
* version.h.in: (pid_output*) add const qualifier.
* command.h: Change DEFUN func to take const char *[] rather
than char **, to begin process of fixing compile warnings in lib/.
Nearly all other changes in this commit follow from this change.
* buffer.{c,h}: (buffer_write) pointer-arithmetic is gccism, take
const void * and cast an automatic const char *p to it.
(buffer_putstr) add const
* command.c: (zencrypt) const qualifier
(cmd_execute_command_real) ditto
(cmd_execute_command_strict) ditto
(config_log_file) ditto.
Fix leak of getcwd() returned string.
* memory.{c,h}: Add MTYPE_DISTRIBUTE_IFNAME for struct dist ifname.
* distribute.{c,h}: Update with const qualifier.
(distribute_free) use MTYPE_DISTRIBUTE_IFNAME
(distribute_lookup) Cast to char *, note that it's ok.
(distribute_hash_alloc) use MTYPE_DISTRIBUTE_IFNAME.
(distribute_get) Cast to char *, note that it's ok.
* filter.c: Update with const qualifier.
* if.{c,h}: ditto.
* if_rmap.{c,h}: ditto.
(if_rmap_lookup) Cast to char *, note that it's ok.
(if_rmap_get) ditto.
* log.{c,h}: Update with const qualifier.
* plist.{c,h}: ditto.
* routemap.{c,h}: ditto.
* smux.{c,h}: ditto. Fix some signed/unsigned comparisons.
* sockopt.c: (getsockopt_cmsg_data) add return for error case.
* vty.c: Update with const qualifier.
|
|
adding FIXME's.
|
|
- add privs support
- use misc quagga's definitions
- make it compile"able"
- fix segfault cases related to hostname()
- add debug isis xxx command
This patch has been approved by Paul Jakma.
|
|
|
|
|