[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltp-list
Subject:    Re: [LTP] [PATCH] Add a lib routine to tell us if we are	running	on
From:       Subrata Modak <subrata () linux ! vnet ! ibm ! com>
Date:       2007-11-15 8:58:47
Message-ID: 1195116407.4601.26.camel () subratamodak ! linux ! ibm ! com
[Download RAW message or body]

Thanks for this Patch. And i have added this to CVS.
--Subrata--

On Thu, 2007-11-15 at 13:54 +0530, Subrata Modak wrote:
> I think this can be a very useful patch. Kumar, i just want to add the
> following license statement before i check this to cvs:
> 
> /******************************************************************************/
> /* This program is free software;  you can redistribute it and/or modify
> */
> /* it under the terms of the GNU General Public License as published by       */
> /* the Free Software Foundation; either version 2 of the License, or          */
> /* (at your option) any later version.                                        */
> /*                                                                            */
> /* This program is distributed in the hope that it will be useful,            */
> /* but WITHOUT ANY WARRANTY;  without even the implied warranty of            */
> /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See                  */
> /* the GNU General Public License for more details.                           */
> /*                                                                            */
> /* You should have received a copy of the GNU General Public License          */
> /* along with this program;  if not, write to the Free Software               */
> /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    */
> /******************************************************************************/
> 
> I think that should not be a problem with you.
> 
> --Subrata--
> 
> 
> On Wed, 2007-11-14 at 14:45 -0600, Kumar Gala wrote:
> > Add a helper so tests can determine if they are running on
> > NFS since some tests are not valid if run from NFS or the results may  
> > vary.
> > 
> > -k
> > 
> > diff -Nur ltp.orig/include/test.h ltp/include/test.h
> > --- ltp.orig/include/test.h     2006-05-26 01:17:53.000000000 -0500
> > +++ ltp/include/test.h  2007-11-14 13:29:46.000000000 -0600
> > @@ -236,6 +236,7 @@
> > extern int tst_kvercmp(int, int, int);
> > extern int tst_is_cwd_tmpfs();
> > +extern int tst_is_cwd_nfs();
> > extern int tst_cwd_has_free(int required_kib);
> > extern int Tst_count;
> > diff -Nur ltp.orig/lib/tst_is_cwd_nfs.c ltp/lib/tst_is_cwd_nfs.c
> > --- ltp.orig/lib/tst_is_cwd_nfs.c       1969-12-31 18:00:00.000000000  
> > -0600
> > +++ ltp/lib/tst_is_cwd_nfs.c    2007-11-14 13:29:08.000000000 -0600
> > @@ -0,0 +1,26 @@
> > +/*
> > + *    AUTHOR
> > + *     Kumar Gala <galak@kernel.crashing.org>, 2007-11-14
> > + *     based on tst_is_cwd_tmpfs()
> > + *
> > + *    DESCRIPTION
> > + *     Check if current directory is on a nfs filesystem
> > + *     If current directory is nfs, return 1
> > + *     If current directory is NOT nfs, return 0
> > + *
> > + *
> > + */
> > +
> > +#include <sys/vfs.h>
> > +
> > +#define NFS_MAGIC 0x6969 /* man 2 statfs */
> > +
> > +int
> > +tst_is_cwd_nfs()
> > +{
> > +       struct statfs sf;
> > +       statfs(".", &sf);
> > +
> > +       /* Verify that the file is not on a nfs filesystem */
> > +       return sf.f_type == NFS_MAGIC?1:0;
> > +}
> > 
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________ Ltp-list mailing list \
> > Ltp-list@lists.sourceforge.net \
> > https://lists.sourceforge.net/lists/listinfo/ltp-list
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic