On 04/07/2010 10:39 PM, Ben Greear wrote:
> On 04/07/2010 08:13 AM, [email protected] wrote:
>> Dear All,
>>
>> Well I after log message swipe can save around 1.3 MB .. Thanks ben !
>
> Plz post a patch when you have that working properly.  It would be good
> to add a scons argument to compile out logging for folks with
> space constraints.  (Maybe with some sort of option to just compile
> out TRACE and WARNINGs and not errors/fatal?)
>
> I'm pretty sure there is some more ipv6 stuff in fea that could be
> conditionally compiled as well.
>
> Thanks,
> Ben
>
Hi Ben!

Patch attached here.

Log Removal Patch:
One more workaround I had to do else this patch was in SConstruct file !
,  It was to make
compilation without -Werror ( else it gives wraning of unused arguments
and then build fails
as warning being treated as error due to -Werror), if any other good way
(other then change
code of every call) to avoid removing -Wrror , it will work batter.

User Authentication Hack:
Once we discussed about removing of user authentication from xorp (or
hack in someway)
,so that any (root) user can start and configure xorpsh , would you have
any patch for this?
Or I can make patch if you suggest me something.

Thanks in advance,
Saurabh





diff -PNaur a//libxorp/xlog.h b//libxorp/xlog.h
--- a//libxorp/xlog.h	2010-04-09 11:30:03.982135253 +0530
+++ b//libxorp/xlog.h	2010-04-09 11:29:00.285259131 +0530
@@ -304,7 +304,7 @@
 		   const char *file,
 		   const char *function,
 		   const char *format, ...) __printflike(5,6);
-#define XLOG_FATAL(fmt...)	XLOG_FN(xlog_fatal, fmt)
+#define XLOG_FATAL(fmt...)  /**/
 
 /**
  * Write an ERROR message to the xlog output streams.
@@ -322,7 +322,7 @@
 		   const char *file,
 		   const char *function, 
 		   const char *format, ...) __printflike(5,6);
-#define XLOG_ERROR(fmt...)	XLOG_FN(xlog_error, fmt)
+#define XLOG_ERROR(fmt...)	/**/
 
 /**
  * Write a WARNING message to the xlog output streams.
@@ -340,7 +340,7 @@
 		     const char *file,
 		     const char *function, 
 		     const char *format, ...) __printflike(5,6);
-#define XLOG_WARNING(fmt...)	XLOG_FN(xlog_warning, fmt)
+#define XLOG_WARNING(fmt...)	/**/
 
 /**
  * Write an INFO message to the xlog output streams.
@@ -378,7 +378,7 @@
 				     const char *file,
 				     const char *function,
 				     const char *format, ...) __printflike(5,6);
-#define XLOG_RTRMGR_ONLY_NO_PREAMBLE(fmt...)	XLOG_FN(xlog_rtrmgr_only_no_preamble, fmt)
+#define XLOG_RTRMGR_ONLY_NO_PREAMBLE(fmt...)	/**/
 
 /**
  * Write a FATAL message to the xlog output streams and aborts the program.
@@ -403,7 +403,8 @@
  *
  * @param assertion the assertion condition.
  */
-#define XLOG_ASSERT(assertion)						\
+#define XLOG_ASSERT(assertion)	/**/
+/*					
 do {									\
 	if (!(assertion)) {						\
 		xlog_assert(_XLOG_MODULE_NAME,				\
@@ -413,7 +414,7 @@
 			    #assertion);				\
 	}								\
 } while (0)
-
+*/
 /**
  * A marker that can be used to indicate code that should never be executed.
  *
@@ -421,12 +422,13 @@
  * the standard XLOG mechanism.
  * Always calls XLOG_FATAL.
  */
-#define XLOG_UNREACHABLE()						\
+#define XLOG_UNREACHABLE() /**/					
+/*	\
 do {									\
 	XLOG_FATAL("Internal fatal error: unreachable code reached");	\
-	exit(1);	/* unreached: keep the compiler happy */	\
+	exit(1);	// unreached: keep the compiler happy	\
 } while (0)
-
+*/
 /**
  * A marker that can be used to indicate code that is not yet
  * implemented and hence should not be run.
@@ -435,11 +437,12 @@
  * the standard XLOG mechanism.
  * Always calls XLOG_FATAL.
  */
-#define XLOG_UNFINISHED()						\
+#define XLOG_UNFINISHED()		/**/
+/*	
 do {									\
 	XLOG_FATAL("Internal fatal error: unfinished code reached");	\
-	exit(1);	/* unreached: keep the compiler happy */	\
-} while (0)
+	exit(1);	// unreached: keep the compiler happy 	\
+} while (0)*/
 
 /*
  * The macros below define the XLOG_TRACE(), the macro responsible for
@@ -462,6 +465,8 @@
  * TODO: the magic below should be used for the other XLOG_* entries
  * as well.
  */
+#define XLOG_TRACE(args...)	/**/				
+/*\
 #ifdef CPP_SUPPORTS_GNU_VA_ARGS
 #	    define XLOG_TRACE(args...)					\
 		_xcond_trace_msg_long(XORP_MODULE_NAME, __FILE__, __LINE__, __FUNCTION__, args)
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to