From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Becker Date: Fri Dec 21 11:57:53 2007 Subject: [Ocfs2-devel] [PATCH 13/30] ocfs2: Handle enum value FS_OCFS2 In-Reply-To: <1198193387-16606-12-git-send-email-sunil.mushran@oracle.com> References: <1198193387-16606-1-git-send-email-sunil.mushran@oracle.com> <1198193387-16606-12-git-send-email-sunil.mushran@oracle.com> Message-ID: <20071221195611.GH13171@mail.oracle.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ocfs2-devel@oss.oracle.com On Thu, Dec 20, 2007 at 03:29:30PM -0800, Sunil Mushran wrote: > Commit 0e03036c97b70b2602f7dedaa3a223ed7563c2c9 in mainline registers > ocfs2 sysctl (FS_OCFS2) number under CTL_FS. This patch allows one to > build ocfs2 with kernels having/not having this change. > > Signed-off-by: Sunil Mushran Signed-off-by: Joel Becker > --- > Makefile | 3 ++- > configure.in | 5 +++++ > kapi-compat/include/sysctl.h | 9 +++++++++ > 3 files changed, 16 insertions(+), 1 deletions(-) > create mode 100644 kapi-compat/include/sysctl.h > > diff --git a/Makefile b/Makefile > index 5c22979..6377ff9 100644 > --- a/Makefile > +++ b/Makefile > @@ -17,7 +17,8 @@ KAPI_COMPAT_FILES = \ > kapi-compat/include/inc_nlink.h \ > kapi-compat/include/drop_nlink.h \ > kapi-compat/include/slab.h \ > - kapi-compat/include/fstype.h > + kapi-compat/include/fstype.h \ > + kapi-compat/include/sysctl.h > > PATCH_FILES = > > diff --git a/configure.in b/configure.in > index f1ca3e3..fdb188c 100644 > --- a/configure.in > +++ b/configure.in > @@ -209,6 +209,11 @@ OCFS2_CHECK_KERNEL([flag FS_RENAME_DOES_D_MOVE in fs.h], fs.h, > , fstype_compat_header="fstype.h", [FS_RENAME_DOES_D_MOVE]) > KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $fstype_compat_header" > > +sysctl_compat_header="" > +OCFS2_CHECK_KERNEL([enum FS_OCFS2 in sysctl.h], sysctl.h, > + , sysctl_compat_header="sysctl.h", [FS_OCFS2]) > +KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $sysctl_compat_header" > + > # using -include has two advantages: > # the source doesn't need to know to include compat headers > # the compat header file names don't go through the search path > diff --git a/kapi-compat/include/sysctl.h b/kapi-compat/include/sysctl.h > new file mode 100644 > index 0000000..73ed0a7 > --- /dev/null > +++ b/kapi-compat/include/sysctl.h > @@ -0,0 +1,9 @@ > +#ifndef KAPI_SYSCTL_H > +#define KAPI_SYSCTL_H > + > +/* CTL_FS names: */ > +enum { > + FS_OCFS2=988, /* ocfs2 */ > +}; > + > +#endif > -- > 1.5.2.5 > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel@oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs2-devel -- Joel's Second Law: If a code change requires additional user setup, it is wrong. Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127