[PATCH] get dev value for inode audit records - take 3

Chris Wright chrisw at osdl.org
Thu Mar 10 22:44:23 UTC 2005


* David Woodhouse (dwmw2 at infradead.org) wrote:
> On Tue, 2005-03-01 at 17:36 -0800, Chris Wright wrote:
> >  #ifdef CONFIG_AUDITSYSCALL
> > +/* forward decl for audit_inode */
> > +struct inode;
> 
> I don't think it does any harm to make the forward declaration
> unconditional. It probably doesn't need a comment either. Just put it
> with the others for audit_buffer and audit_context, which might as well
> be unconditional too.

Good point.  I like that, it's cleaner.  Incremental patch below.

thanks,
-chris
--

Make audit.h forward declarations unconditional.

Signed-off-by: Chris Wright <chrisw at osdl.org>

===== include/linux/audit.h 1.4 vs edited =====
--- 1.4/include/linux/audit.h	2005-03-03 11:55:24 -08:00
+++ edited/include/linux/audit.h	2005-03-10 14:18:34 -08:00
@@ -125,15 +125,11 @@ struct audit_rule {		/* for AUDIT_LIST, 
 
 #ifdef __KERNEL__
 
-#ifdef CONFIG_AUDIT
 struct audit_buffer;
 struct audit_context;
-#endif
-
-#ifdef CONFIG_AUDITSYSCALL
-/* forward decl for audit_inode */
 struct inode;
 
+#ifdef CONFIG_AUDITSYSCALL
 /* These are defined in auditsc.c */
 				/* Public API */
 extern int  audit_alloc(struct task_struct *task);




More information about the Linux-audit mailing list