trim trailing whitespace
diff --git a/include/dataascii.h b/include/dataascii.h
index cd75245..d08fe86 100644
--- a/include/dataascii.h
+++ b/include/dataascii.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _DATAASCII_H_
@@ -39,7 +39,7 @@
* The ascii characters are obtained from listofchars or the CHARS array
* if listofchars is NULL.
* Each char is selected by an index. The index is the remainder
- * of count divided by the array size.
+ * of count divided by the array size.
* This method allows more than one process to write to a location
* in a file without corrupting it for another process' point of view.
*
diff --git a/include/databin.h b/include/databin.h
index a80de16..c168799 100644
--- a/include/databin.h
+++ b/include/databin.h
@@ -14,7 +14,7 @@
*
* DESCRIPTION
* datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
-* of data of the form indicated by 'mode'.
+* of data of the form indicated by 'mode'.
* All modes (expect r -random) are file offset based.
* This allows more than process to do writing to the file without
* corrupting it if the same modes were used.
diff --git a/include/file_lock.h b/include/file_lock.h
index 50affc5..7586260 100644
--- a/include/file_lock.h
+++ b/include/file_lock.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _FILE_LOCK_H_
diff --git a/include/forker.h b/include/forker.h
index effd5d6..dfad625 100644
--- a/include/forker.h
+++ b/include/forker.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _FORKER_H_
@@ -45,10 +45,10 @@
int background( char * );
/*
- * Forker will fork ncopies-1 copies of self.
+ * Forker will fork ncopies-1 copies of self.
*
* arg 1: Number of copies of the process to be running after return.
- * This value minus one is the number of forks performed.
+ * This value minus one is the number of forks performed.
* arg 2: mode: 0 - all children are first generation descendents.
* 1 - each subsequent child is a descendent of another
* descendent, resulting in only one direct descendent of the
diff --git a/include/libtestsuite.h b/include/libtestsuite.h
index 536f0c0..0668961 100644
--- a/include/libtestsuite.h
+++ b/include/libtestsuite.h
@@ -1,5 +1,5 @@
/* The following functions are used to synchronize father and sons processes.
- *
+ *
* create_sync_pipes: create pipes used for the synchronization. Must be done
* by father process before a fork.
*
diff --git a/include/open_flags.h b/include/open_flags.h
index 87fe6ff..966d684 100644
--- a/include/open_flags.h
+++ b/include/open_flags.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _OPEN_FLAGS_H_
@@ -39,7 +39,7 @@
* Commonly used separators would be a comma "," or pipe "|".
* If <mode> is one and not all <openflags> bits can be converted to
* symbols, the "UNKNOWN" symbol will be added to return string.
- *
+ *
* Return Value
* openflags2symbols will return the indentified symbols.
* If no symbols are recognized the return value will be a empty
@@ -62,7 +62,7 @@
* If any symbol is not valid, -1 is returned. On this error condition
* the badname pointer is updated if not NULL. badname will point
* to the beginning location of where the invalid symbol was found.
- * string will be returned unchanged.
+ * string will be returned unchanged.
*
* A signal received while parsing string could cause the string to
* contain a NULL character in the middle of it.
diff --git a/include/pattern.h b/include/pattern.h
index 74f841c..29c75d3 100644
--- a/include/pattern.h
+++ b/include/pattern.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _PATTERN_H_
@@ -45,7 +45,7 @@
* pattern_check returns -1 if the buffer does not contain repeated
* occurrances of the indicated pattern (shifted by patshift).
*
- * The algorithm used to check the buffer relies on the fact that buf is
+ * The algorithm used to check the buffer relies on the fact that buf is
* supposed to be repeated copies of pattern. The basic algorithm is
* to validate the first patlen bytes of buf against the pat argument
* passed in - then validate the next patlen bytes against the 1st patlen
@@ -76,7 +76,7 @@
*
* pattern_fill always returns 0 - no validation of arguments is done.
*
- * The algorithm used to fill the buffer relies on the fact that buf is
+ * The algorithm used to fill the buffer relies on the fact that buf is
* supposed to be repeated copies of pattern. The basic algorithm is
* to fill the first patlen bytes of buf with the pat argument
* passed in - then copy the next patlen bytes with the 1st patlen
diff --git a/include/random_range.h b/include/random_range.h
index d3e1cce..c8c4858 100644
--- a/include/random_range.h
+++ b/include/random_range.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _RANDOM_RANGE_H_
diff --git a/include/search_path.h b/include/search_path.h
index 909ab26..c81d42c 100644
--- a/include/search_path.h
+++ b/include/search_path.h
@@ -1,36 +1,36 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: search_path.h,v 1.1 2000/08/30 18:43:38 nstraz Exp $ */
+/* $Id: search_path.h,v 1.2 2009/07/20 10:59:32 vapier Exp $ */
int search_path(char *cmd, char *res_path, int access_mode, int fullpath);
diff --git a/include/str_to_bytes.h b/include/str_to_bytes.h
index 100d37d..977a6b1 100644
--- a/include/str_to_bytes.h
+++ b/include/str_to_bytes.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _STR_TO_BYTES_
diff --git a/include/string_to_tokens.h b/include/string_to_tokens.h
index 9c0935e..75c7d24 100644
--- a/include/string_to_tokens.h
+++ b/include/string_to_tokens.h
@@ -1,39 +1,39 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _STRING_TO_TOKENS_H_
#define _STRING_TO_TOKENS_H_
/*
- * string_to_tokens()
+ * string_to_tokens()
*
* This function parses the string 'arg_string', placing pointers to
* the 'separator' separated tokens into the elements of 'arg_array'.
diff --git a/include/test.h b/include/test.h
index 0dc51f1..5c325b3 100644
--- a/include/test.h
+++ b/include/test.h
@@ -5,33 +5,33 @@
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: test.h,v 1.16 2009/07/20 02:42:32 vapier Exp $ */
+/* $Id: test.h,v 1.17 2009/07/20 10:59:32 vapier Exp $ */
#ifndef __TEST_H__
#define __TEST_H__
@@ -65,7 +65,7 @@
* defined.
* if ( sysconf(_SC_CRAY_SYSTEM) == 1 )
* on UMK
- * else # returned 0 or -1
+ * else # returned 0 or -1
* on Unicos
* This is only being done on CRAY systems.
*/
@@ -80,7 +80,7 @@
* It should be defined in signal.h or sys/signal.h on
* UNICOS/mk and IRIX systems. On UNICOS systems,
* it is not defined, thus it is being set to UNICOS's NSIG.
- * Note: IRIX's NSIG (signals are 1-(NSIG-1))
+ * Note: IRIX's NSIG (signals are 1-(NSIG-1))
* is not same meaning as UNICOS/UMK's NSIG (signals 1-NSIG)
*/
#ifndef NUMSIGS
@@ -176,7 +176,7 @@
*/
#ifdef UCLINUX
#define FORK_OR_VFORK vfork
-#define MAP_PRIVATE_EXCEPT_UCLINUX 0
+#define MAP_PRIVATE_EXCEPT_UCLINUX 0
#else
#define FORK_OR_VFORK fork
#define MAP_PRIVATE_EXCEPT_UCLINUX MAP_PRIVATE
diff --git a/include/tlibio.h b/include/tlibio.h
index 2d257d8..5ea248a 100644
--- a/include/tlibio.h
+++ b/include/tlibio.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
diff --git a/include/usctest.h b/include/usctest.h
index 6c93266..d91630f 100644
--- a/include/usctest.h
+++ b/include/usctest.h
@@ -1,56 +1,56 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: usctest.h,v 1.10 2006/05/26 06:06:06 vapier Exp $ */
+/* $Id: usctest.h,v 1.11 2009/07/20 10:59:32 vapier Exp $ */
/**********************************************************
- *
+ *
* IRIX/Linux Feature Test and Evaluation - Silicon Graphics, Inc.
- *
+ *
* FUNCTION NAME : usctest.h
- *
+ *
* FUNCTION TITLE : System Call Test Macros
- *
+ *
* SYNOPSIS:
* See DESCRIPTION below.
- *
+ *
* AUTHOR : William Roske
- *
+ *
* INITIAL RELEASE : UNICOS 7.0
- *
+ *
* DESCRIPTION
* TEST(SCALL) - calls a system call
* TEST_VOID(SCALL) - same as TEST() but for syscalls with no return value.
- * TEST_CLEANUP - print the log of errno return counts if STD_ERRNO_LOG
+ * TEST_CLEANUP - print the log of errno return counts if STD_ERRNO_LOG
* is set.
* TEST_PAUSEF(HAND) - Pause for SIGUSR1 if the pause flag is set.
* Use "hand" as the interrupt handling function
@@ -92,8 +92,8 @@
#include <sys/param.h>
-/*
- * Ensure that PATH_MAX is defined
+/*
+ * Ensure that PATH_MAX is defined
*/
#ifndef PATH_MAX
#ifdef MAXPATHLEN
@@ -104,7 +104,7 @@
#endif
#ifndef CRAY
-#ifndef BSIZE
+#ifndef BSIZE
#define BSIZE BBSIZE
#endif
#endif
@@ -114,14 +114,14 @@
* Entries in this struct are used by the parse_opts routine
* to indicate valid options and return option arguments
***********************************************************************/
-typedef struct {
+typedef struct {
char *option; /* Valid option string (one option only) like "a:" */
int *flag; /* pointer to location to set true if option given */
char **arg; /* pointer to location to place argument, if needed */
} option_t;
/***********************************************************************
- * The following globals are defined in parse_opts.c but must be
+ * The following globals are defined in parse_opts.c but must be
* externed here because they are used in the macros defined below.
***********************************************************************/
extern int STD_FUNCTIONAL_TEST, /* turned off by -f to not do functional test */
@@ -138,7 +138,7 @@
STD_LOOP_DELAY; /* delay time after each iteration */
#define USC_MAX_ERRNO 2000
-
+
/**********************************************************************
* Prototype for parse_opts routine
**********************************************************************/
@@ -146,7 +146,7 @@
/*
- * define a structure
+ * define a structure
*/
struct usc_errno_t {
int flag;
@@ -154,7 +154,7 @@
/***********************************************************************
****
- ****
+ ****
****
**********************************************************************/
#ifdef _USC_LIB_
@@ -181,12 +181,12 @@
/***********************************************************************
* temporary variables for determining max and min times in TEST macro
***********************************************************************/
-long btime, etime, tmptime;
+long btime, etime, tmptime;
#endif /* _USC_LIB_ */
/***********************************************************************
- * structure for timing accumulator and counters
+ * structure for timing accumulator and counters
***********************************************************************/
struct tblock {
long tb_max;
@@ -206,8 +206,8 @@
/***********************************************************************
- * TEST: calls a system call
- *
+ * TEST: calls a system call
+ *
* parameters:
* SCALL = system call and parameters to execute
*
@@ -221,12 +221,12 @@
/***********************************************************************
* TEST_VOID: calls a system call
- *
+ *
* parameters:
* SCALL = system call and parameters to execute
*
* Note: This is IDENTICAL to the TEST() macro except that it is intended
- * for use with syscalls returning no values (void syscall()). The
+ * for use with syscalls returning no values (void syscall()). The
* Typecasting nothing (void) into an unsigned integer causes compilation
* errors.
*
@@ -237,7 +237,7 @@
* TEST_CLEANUP: print system call timing stats and errno log entries
* to stdout if STD_TIMING_ON and STD_ERRNO_LOG are set, respectively.
* Do NOT print ANY information if no system calls logged.
- *
+ *
* parameters:
* none
*
@@ -261,7 +261,7 @@
* TEST_PAUSEF: Pause for SIGUSR1 if the pause flag is set.
* Set the user specified function as the interrupt
* handler instead of "STD_go"
- *
+ *
* parameters:
* none
*
@@ -276,7 +276,7 @@
/***********************************************************************
* TEST_PAUSE: Pause for SIGUSR1 if the pause flag is set.
* Just continue when signal comes in.
- *
+ *
* parameters:
* none
*
@@ -295,7 +295,7 @@
/***********************************************************************
* TEST_ERROR_LOG(eno): log this errno if STD_ERRNO_LOG flag set
- *
+ *
* parameters:
* int eno: the errno location in STD_ERRNO_LIST to log.
*
@@ -309,7 +309,7 @@
/***********************************************************************
* TEST_EXP_ENOS(array): set the bits associated with the nput errnos
* in the TEST_VALID_ENO array.
- *
+ *
* parameters:
* int array[]: a zero terminated array of errnos expected.
*
@@ -321,6 +321,6 @@
TEST_VALID_ENO[array[tmptime]].flag=1; \
tmptime++; \
}
-
+
#endif /* end of __USCTEST_H__ */
diff --git a/include/write_log.h b/include/write_log.h
index fca4296..84d6313 100644
--- a/include/write_log.h
+++ b/include/write_log.h
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _WRITE_LOG_H_
diff --git a/lib/dataascii.c b/lib/dataascii.c
index 4b18e38..775eb48 100644
--- a/lib/dataascii.c
+++ b/lib/dataascii.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#include <stdio.h>
diff --git a/lib/databin.c b/lib/databin.c
index 5c30bcd..2017cb7 100644
--- a/lib/databin.c
+++ b/lib/databin.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#include <stdio.h>
@@ -108,7 +108,7 @@
if ( errmsg != NULL ) {
*errmsg = Errmsg;
}
-
+
switch (mode)
{
default:
diff --git a/lib/datapid.c b/lib/datapid.c
index 9414eae..c047792 100644
--- a/lib/datapid.c
+++ b/lib/datapid.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
/************
@@ -44,7 +44,7 @@
8 bits to a bytes == character
- NBPW 8
+ NBPW 8
************/
#include <stdio.h>
@@ -72,12 +72,12 @@
/***********************************************************************
*
- *
+ *
* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 15 bytes
* 1234567890123456789012345678901234567890123456789012345678901234 bits
* ________________________________________________________________ 1 word
* < pid >< offset in file of this word >< pid >
- *
+ *
* the words are put together where offset zero is the start.
* thus, offset 16 is the start of the second full word
* Thus, offset 8 is in middle of word 1
@@ -90,7 +90,7 @@
int offset;
{
#if CRAY
-
+
int cnt;
int tmp;
char *chr;
@@ -124,13 +124,13 @@
}
/*
- * full words
+ * full words
*/
num_full_words = (bsize-boff)/NBPW;
-
+
woff = offset+boff;
-
+
for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++ ) {
word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
@@ -171,7 +171,7 @@
#endif
-}
+}
/***********************************************************************
*
@@ -186,7 +186,7 @@
char **errmsg;
{
#if CRAY
-
+
int cnt;
int tmp;
char *chr;
@@ -225,13 +225,13 @@
}
/*
- * full words
+ * full words
*/
num_full_words = (bsize-boff)/NBPW;
-
+
woff = offset+boff;
-
+
for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++ ) {
word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
@@ -281,7 +281,7 @@
return -1; /* buffer is ok */
#else
-
+
if ( errmsg != NULL ) {
*errmsg = Errmsg;
}
diff --git a/lib/file_lock.c b/lib/file_lock.c
index e6823a2..8b66ab5 100644
--- a/lib/file_lock.c
+++ b/lib/file_lock.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#include <sys/types.h>
diff --git a/lib/forker.c b/lib/forker.c
index ca2c033..ad3ffbf 100644
--- a/lib/forker.c
+++ b/lib/forker.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
/**************************************************************
@@ -144,7 +144,7 @@
case 0: /* child process */
break;
- default:
+ default:
exit(0);
}
@@ -153,8 +153,8 @@
} /* end of background */
/***********************************************************************
- * Forker will fork ncopies-1 copies of self.
- *
+ * Forker will fork ncopies-1 copies of self.
+ *
***********************************************************************/
int
forker(ncopies, mode, prefix)
@@ -175,16 +175,16 @@
switch ( mode ) {
case 1 : /* only 1 direct child */
if ( (pid = fork()) == -1 ) {
- if ( prefix != NULL )
+ if ( prefix != NULL )
fprintf(stderr, "%s: %s,forker(): fork() failed, errno:%d %s\n",
prefix, __FILE__, errno, strerror(errno));
return 0;
}
Forker_npids++;
-
+
switch (pid ) {
case 0: /* child - continues the forking */
-
+
if ( Forker_npids < FORKER_MAX_PIDS )
Forker_pids[Forker_npids-1]=getpid();
break;
@@ -192,25 +192,25 @@
default: /* parent - stop the forking */
if ( Forker_npids < FORKER_MAX_PIDS )
Forker_pids[Forker_npids-1]=pid;
- return cnt-1;
+ return cnt-1;
}
break;
default : /* all new processes are childern of parent */
if ( (pid = fork()) == -1 ) {
- if ( prefix != NULL )
+ if ( prefix != NULL )
fprintf(stderr, "%s: %s,forker(): fork() failed, errno:%d %s\n",
prefix, __FILE__, errno, strerror(errno));
return cnt-1;
}
Forker_npids++;
-
+
switch (pid ) {
case 0: /* child - stops the forking */
if ( Forker_npids < FORKER_MAX_PIDS )
Forker_pids[Forker_npids-1]=getpid();
- return cnt;
+ return cnt;
default: /* parent - continues the forking */
if ( Forker_npids < FORKER_MAX_PIDS )
@@ -267,16 +267,16 @@
ret=forker(ncopies, mode, argv[0]);
- printf("forker(%d, %d, %s) ret:%d, pid = %d, sleeping 30 seconds.\n",
+ printf("forker(%d, %d, %s) ret:%d, pid = %d, sleeping 30 seconds.\n",
ncopies, mode, argv[0], ret, getpid());
- printf("%d My version of Forker_pids[], Forker_npids = %d\n",
+ printf("%d My version of Forker_pids[], Forker_npids = %d\n",
getpid(), Forker_npids);
for (ind=0; ind<Forker_npids; ind++){
printf("%d ind:%-2d pid:%d\n", getpid(), ind, Forker_pids[ind]);
}
-
+
sleep(30);
exit(0);
}
diff --git a/lib/get_high_address.c b/lib/get_high_address.c
index 158acb1..8185681 100644
--- a/lib/get_high_address.c
+++ b/lib/get_high_address.c
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/ltp/ltp/lib/get_high_address.c,v 1.5 2009/06/09 16:01:20 subrata_modak Exp $ */
+/* $Header: /cvsroot/ltp/ltp/lib/get_high_address.c,v 1.6 2009/07/20 10:59:32 vapier Exp $ */
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
@@ -32,7 +32,7 @@
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-#include <unistd.h>
+#include <unistd.h>
char *get_high_address(void)
{
diff --git a/lib/libtestsuite.c b/lib/libtestsuite.c
index 9a954f2..54c1b31 100644
--- a/lib/libtestsuite.c
+++ b/lib/libtestsuite.c
@@ -138,9 +138,9 @@
close (fd[1]);
fd[1] = -1;
}
-
+
r = read (fd[0], &buf, 1);
-
+
if ((r != 1) || (buf != 'A'))
return -1;
return 0;
diff --git a/lib/open_flags.c b/lib/open_flags.c
index 3b81237..eaa8051 100644
--- a/lib/open_flags.c
+++ b/lib/open_flags.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
/**************************************************************
@@ -66,10 +66,10 @@
* If parse_open_flags returns, <string> will left unchanged.
*
* The openflags2symbols function attempts to convert open flag
- * bits into human readable symbols (i.e. O_TRUNC). If there
+ * bits into human readable symbols (i.e. O_TRUNC). If there
* are more than one symbol, the <sep> string will be placed as
* a separator between symbols. Commonly used separators would
- * be a comma "," or pipe "|". If <mode> is one and not all
+ * be a comma "," or pipe "|". If <mode> is one and not all
* <openflags> bits can be converted to symbols, the "UNKNOWN"
* symbol will be added to return string.
* Openflags2symbols will return the indentified symbols.
@@ -187,7 +187,7 @@
};
-int
+int
parse_open_flags(char *string, char **badname)
{
int bits = 0;
@@ -262,9 +262,9 @@
* Loop through all but O_RDONLY elments of Open_flags
*/
for(ind=1; ind < size; ind++) {
-
+
if ( (bits & Open_flags[ind].flag) == Open_flags[ind].flag ) {
- if ( havesome )
+ if ( havesome )
strcat(Open_symbols, sep);
strcat(Open_symbols, Open_flags[ind].symbol);
@@ -314,11 +314,11 @@
if ( sscanf(argv[1], "%i", &bits) == 1 ) {
printf("openflags2symbols(%#o, \",\", 1) returned %s\n",
bits, openflags2symbols(bits, ",", 1));
-
+
} else {
ret=parse_open_flags(argv[1], &err);
if ( ret == -1 )
- printf("parse_open_flags(%s, &err) returned -1, err = %s\n",
+ printf("parse_open_flags(%s, &err) returned -1, err = %s\n",
argv[0], err);
else
printf("parse_open_flags(%s, &err) returned %#o\n", argv[0], ret);
diff --git a/lib/parse_opts.c b/lib/parse_opts.c
index ca5e940..249a77f 100644
--- a/lib/parse_opts.c
+++ b/lib/parse_opts.c
@@ -1,45 +1,45 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: parse_opts.c,v 1.12 2009/07/20 04:48:17 vapier Exp $ */
+/* $Id: parse_opts.c,v 1.13 2009/07/20 10:59:32 vapier Exp $ */
/**********************************************************
- *
+ *
* OS Testing - Silicon Graphics, Inc.
- *
+ *
* FUNCTION NAME : parse_opts
- *
+ *
* FUNCTION TITLE : parse standard & user options for system call tests
- *
+ *
* SYNOPSIS:
* #include "usctest.h"
*
@@ -48,11 +48,11 @@
* char **av;
* option_t user_optarr[];
* void (*uhf)();
- *
+ *
* AUTHOR : William Roske/Richard Logan
- *
+ *
* INITIAL RELEASE : UNICOS 7.0
- *
+ *
* DESCRIPTION
* The parse_opts library routine takes that argc and argv parameters
* recevied by main() and an array of structures defining user options.
@@ -62,11 +62,11 @@
*
* This module contains the functions usc_global_setup_hook and
* usc_test_looping, which are called by marcos defined in usctest.h.
- *
+ *
* RETURN VALUE
* parse_opts returns a pointer to an error message if an error occurs.
* This pointer is (char *)NULL if parsing is successful.
- *
+ *
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
#include <errno.h>
#include <stdlib.h>
@@ -151,7 +151,7 @@
{ "h" , " -h Show this help screen\n", NULL, NULL},
{ "i:", " -i n Execute test n times\n", NULL, NULL},
{ "I:", " -I x Execute test for x seconds\n", NULL, NULL},
- { "p" , " -p Pause for SIGUSR1 before starting\n", NULL, NULL},
+ { "p" , " -p Pause for SIGUSR1 before starting\n", NULL, NULL},
{ "P:", " -P x Pause for x seconds between iterations\n", NULL, NULL},
{ "t" , " -t Turn on syscall timing\n", NULL, NULL},
#ifdef UCLINUX
@@ -199,7 +199,7 @@
#endif
/**********************************************************************
- * parse_opts:
+ * parse_opts:
**********************************************************************/
char *
parse_opts(int ac, char **av, option_t *user_optarr, void (*uhf)())
@@ -225,7 +225,7 @@
}
/* Calculate how much space we need for the option string */
optstrlen = 0;
- for (i = 0; std_options[i].optstr; ++i)
+ for (i = 0; std_options[i].optstr; ++i)
optstrlen += strlen(std_options[i].optstr);
if (user_optarr)
for (i = 0; user_optarr[i].option; ++i) {
@@ -237,7 +237,7 @@
/* Create the option string for getopt */
optionstr = (char *)malloc(optstrlen);
- if (!optionstr)
+ if (!optionstr)
return "parse_opts: ERROR - Could not allocate memory for optionstr";
optionstr[0] = '\0';
@@ -247,7 +247,7 @@
if (user_optarr)
for (i = 0; user_optarr[i].option; ++i)
/* only add the option if it wasn't there already */
- if (strchr(optionstr, user_optarr[i].option[0]) == NULL)
+ if (strchr(optionstr, user_optarr[i].option[0]) == NULL)
strcat(optionstr, user_optarr[i].option);
#if DEBUG > 1
@@ -283,7 +283,7 @@
case 'I': /* Time duration */
options |= OPT_duration;
STD_LOOP_DURATION = atof(optarg);
- if ( STD_LOOP_DURATION == 0.0 ) STD_INFINITE=1;
+ if ( STD_LOOP_DURATION == 0.0 ) STD_INFINITE=1;
break;
case 'c': /* Copies */
options |= OPT_copies;
@@ -311,7 +311,7 @@
break;
#endif
default:
-
+
/* Check all the user specified options */
found=0;
for(i = 0; user_optarr[i].option; ++i) {
@@ -324,14 +324,14 @@
found++;
/* save the argument at the user's location */
- if ( user_optarr[i].option[strlen(user_optarr[i].option)-1] == ':' ) {
+ if ( user_optarr[i].option[strlen(user_optarr[i].option)-1] == ':' ) {
*user_optarr[i].arg=optarg;
}
break; /* option found - break out of the for loop */
}
}
/* This condition "should never happen". SO CHECK FOR IT!!!! */
- if ( ! found ) {
+ if ( ! found ) {
sprintf(Mesg2,
"parse_opts: ERROR - option:\"%c\" NOT FOUND... INTERNAL ERROR", opt);
return(Mesg2);
@@ -466,7 +466,7 @@
}
else
STD_LP_barrier=1;
- if ( Debug )
+ if ( Debug )
printf("using env USC_LP_BARRIER, Set STD_LP_barrier to %d\n",
STD_LP_barrier);
}
@@ -541,7 +541,7 @@
STD_LD_recfun);
}
}
-
+
#if UNIT_TEST
printf("The following variables after option and env parsing:\n");
printf("STD_FUNCTIONAL_TEST = %d\n", STD_FUNCTIONAL_TEST);
@@ -583,7 +583,7 @@
}
}
-/*
+/*
* routine to goto when we get the SIGUSR1 for STD_PAUSE
*/
void STD_go(int sig)
@@ -623,14 +623,14 @@
break;
}
}
-
+
/*
* pause waiting for sigusr1.
*/
- if ( STD_PAUSE ) {
- _TMP_FUNC = (int (*)())signal(SIGUSR1, STD_go);
- pause();
- signal(SIGUSR1, (void (*)())_TMP_FUNC);
+ if ( STD_PAUSE ) {
+ _TMP_FUNC = (int (*)())signal(SIGUSR1, STD_go);
+ pause();
+ signal(SIGUSR1, (void (*)())_TMP_FUNC);
}
#if !defined(UCLINUX)
@@ -641,7 +641,7 @@
if ( STD_TP_sbrk ) {
sbrk(STD_TP_sbrk);
- if ( Debug )
+ if ( Debug )
printf("after sbrk(%d)\n", STD_TP_sbrk);
}
@@ -689,7 +689,7 @@
* If the STD_LOOP_DURATION variable is set, compare current time against
* calculated stop_time.
* This function will return 1 until all desired looping methods
- * have been met.
+ * have been met.
*
* counter integer is supplied by the user program.
***********************************************************************/
@@ -705,7 +705,7 @@
int keepgoing=0; /* used to determine return value */
/*
- * If this is the first iteration and we are looping for
+ * If this is the first iteration and we are looping for
* duration of STD_LOOP_DURATION seconds (fractional) or
* doing loop delays, get the clocks per second.
*/
@@ -720,7 +720,7 @@
* If looping for duration, calculate stop time in
* clocks.
*/
-
+
if ( STD_LOOP_DURATION) {
ct=get_current_time();
stop_time=(int)((float)hertz * STD_LOOP_DURATION) + ct;
@@ -735,7 +735,7 @@
}
}
-
+
/*
* if delay each iteration, loop for delay clocks.
* This will not be done on first iteration.
@@ -751,7 +751,7 @@
*/
if ( STD_LD_recfun ) {
if ( Debug )
- printf("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
+ printf("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
STD_LD_recfun);
usc_recressive_func(0, STD_LD_recfun, *STD_bigstack);
}
@@ -781,7 +781,7 @@
if ( STD_LP_recfun ) {
if ( Debug )
- printf("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
+ printf("calling usc_recressive_func(0, %d, *STD_bigstack)\n",
STD_LP_recfun);
usc_recressive_func(0, STD_LP_recfun, *STD_bigstack);
}
@@ -805,7 +805,7 @@
/*
* This function recressively calls itself max times.
- */
+ */
static void
usc_recressive_func(cnt, max, bstack)
int cnt;
@@ -821,7 +821,7 @@
/******************************************************************************
* UNIT TEST CODE
* UNIT TEST CODE
- *
+ *
* this following code is provide so that unit testing can
* be done fairly easily.
******************************************************************************/
@@ -883,7 +883,7 @@
TEST_PAUSE;
for (lc=0; TEST_LOOPING(lc); lc++) {
-
+
TEST( gettimeofday(&t, NULL) );
printf("iter=%d: sec:%d, usec:%6.6d %s", lc+1, t.tv_sec,
t.tv_usec, ctime(&t.tv_sec));
diff --git a/lib/pattern.c b/lib/pattern.c
index 7f4d587..c36eff1 100644
--- a/lib/pattern.c
+++ b/lib/pattern.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#include <string.h>
diff --git a/lib/random_range.c b/lib/random_range.c
index ac3ef57..9c05cf7 100644
--- a/lib/random_range.c
+++ b/lib/random_range.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#include <stdio.h>
@@ -69,7 +69,7 @@
* str The string to parse - assumed to be a comma-separated
* list of tokens having the above format.
* defmin default value to plug in for min, if it is missing
- * defmax default value to plug in for max, if it is missing
+ * defmax default value to plug in for max, if it is missing
* defmult default value to plug in for mult, if missing
* parse_func A user-supplied function pointer, which parse_ranges()
* can call to parse the min, max, and mult strings. This
@@ -77,7 +77,7 @@
* MUST have the following prototype:
* parse_func(char *str, int *val)
* The function should return -1 if str cannot be parsed
- * into an integer, or >= 0 if it was successfully
+ * into an integer, or >= 0 if it was successfully
* parsed. The resulting integer will be stored in
* *val. If parse_func is NULL, parse_ranges will parse
* the tokens in a manner consistent with the the sscanf
@@ -168,7 +168,7 @@
/*
* Process the 'max' field - if one was not present (n1 format)
- * set max equal to min. If the field was present, but
+ * set max equal to min. If the field was present, but
* zero length (n1: format), retain the default. Otherwise
* pass the string to the parse function.
*/
@@ -185,7 +185,7 @@
}
/*
- * Process the 'mult' field - if one was not present
+ * Process the 'mult' field - if one was not present
* (n1:n2 format), or the field was zero length (n1:n2: format)
* then set the mult field to defmult - otherwise pass then
* mult field to the parse function.
@@ -352,7 +352,7 @@
}
nmults = ((max - min) / mult) + 1;
-#if CRAY
+#if CRAY
/*
* If max is less than 2gb, then the value can fit in 32 bits
* and the standard lrand48() routine can be used.
@@ -540,7 +540,7 @@
* If max is less than 2gb, then the value can fit in 32 bits
* and the standard lrand48() routine can be used.
*/
- if ( max <= (long)2147483647 ) {
+ if ( max <= (long)2147483647 ) {
return (long long) (min + (((long long)lrand48() % nmults) * mult));
} else {
/*
@@ -583,7 +583,7 @@
/*
* Only get a random number the first time.
*/
- if ( cnt == 0 || rand < -1 ) {
+ if ( cnt == 0 || rand < -1 ) {
rand = (long long)lrand48(); /* 32 bit random number */
}
@@ -620,7 +620,7 @@
} else {
return divider(min, med, cnt+1, rand);
}
-
+
}
}
@@ -760,7 +760,7 @@
int imax=1048576;
#endif
- long lret, lmin=0, lmult=1, ltmin, ltmax=0;
+ long lret, lmin=0, lmult=1, ltmin, ltmax=0;
#if CRAY || (_MIPS_SZLONG == 64)
long lmax=6*(long)GIG; /* higher than 32 bits */
#else
@@ -777,7 +777,7 @@
for (ind=0; ind<PARTNUM; ind++ )
cntarr[ind]=0;
-
+
if ( argc < 2 ) {
printf("Usage: %s func [iterations] \n", argv[0]);
printf("func can be random_range, random_rangel, random_rangell\n");
@@ -826,7 +826,7 @@
valbound[ind], valbound[ind+1], cntarr[ind],
(float)(cntarr[ind]/(float)iter));
}
- printf("%2d %-13ld to %-13ld %5ld %4.4f\n", PARTNUM,
+ printf("%2d %-13ld to %-13ld %5ld %4.4f\n", PARTNUM,
valbound[PARTNUM-1], lmax, cntarr[PARTNUM-1],
(float)(cntarr[PARTNUM-1]/(float)iter));
printf(" min=%ld, max=%ld\n", ltmin, ltmax);
@@ -904,7 +904,7 @@
valbound[ind], valbound[ind+1], cntarr[ind],
(float)(cntarr[ind]/(float)iter));
}
- printf("%2d %-13ld to %-13ld %5ld %4.4f\n", PARTNUM,
+ printf("%2d %-13ld to %-13ld %5ld %4.4f\n", PARTNUM,
valbound[PARTNUM-1], (long)imax, cntarr[PARTNUM-1],
(float)(cntarr[PARTNUM-1]/(float)iter));
printf(" min=%d, max=%d\n", itmin, itmax);
diff --git a/lib/rmobj.c b/lib/rmobj.c
index dd9e777..a779060 100644
--- a/lib/rmobj.c
+++ b/lib/rmobj.c
@@ -1,36 +1,36 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: rmobj.c,v 1.4 2003/07/28 16:03:02 robbiew Exp $ */
+/* $Id: rmobj.c,v 1.5 2009/07/20 10:59:32 vapier Exp $ */
/**********************************************************
*
diff --git a/lib/search_path.c b/lib/search_path.c
index 2ee4f1d..a35f046 100644
--- a/lib/search_path.c
+++ b/lib/search_path.c
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/ltp/ltp/lib/search_path.c,v 1.3 2006/07/19 14:00:56 robbiew Exp $ */
+/* $Header: /cvsroot/ltp/ltp/lib/search_path.c,v 1.4 2009/07/20 10:59:32 vapier Exp $ */
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
@@ -34,24 +34,24 @@
/**********************************************************
- *
+ *
* UNICOS Feature Test and Evaluation - Cray Research, Inc.
- *
- * FUNCTION NAME : search_path
- *
+ *
+ * FUNCTION NAME : search_path
+ *
* FUNCTION TITLE : search PATH locations for desired filename
- *
+ *
* SYNOPSIS:
* int search_path(cmd, res_path, access_mode, fullpath)
* char *cmd;
* char *res_path;
* int access_mode;
* int fullpath;
- *
+ *
* AUTHOR : Richard Logan
- *
+ *
* INITIAL RELEASE : UNICOS 7.0
- *
+ *
* DESCRIPTION
* Search_path will walk through PATH and attempt to find "cmd". If cmd is
* a full or relative path, it is checked but PATH locations are not scanned.
@@ -66,10 +66,10 @@
* directory is prepended to path/cmd before access is called.
* If cmd is found, search_path will return 0. If cmd cannot be
* found, 1 is returned. If an error has occurred, -1 is returned
- * and an error mesg is placed in res_path.
+ * and an error mesg is placed in res_path.
* If the length of path/cmd is larger then PATH_MAX, then that path
* location is skipped.
- *
+ *
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
#include <stdio.h>
@@ -121,7 +121,7 @@
printf("path of %s is %s\n", argv[ind], path);
}
}
-
+
}
#endif
@@ -151,7 +151,7 @@
/*
* full or relative path was given
*/
- if ( (cmd[0] == '/') || ( (cp=strchr(cmd, '/')) != NULL )) {
+ if ( (cmd[0] == '/') || ( (cp=strchr(cmd, '/')) != NULL )) {
if ( access(cmd, access_mode) == 0 ) {
if ( cmd[0] != '/' ) { /* relative path */
@@ -184,8 +184,8 @@
}
/*
- * walk through each path in PATH.
- * Each path in PATH is placed in tmppath.
+ * walk through each path in PATH.
+ * Each path in PATH is placed in tmppath.
* pathenv cannot be modified since it will affect PATH.
* If a signal came in while we have modified the PATH
* memory, we could create a problem for the caller.
@@ -236,7 +236,7 @@
/* if the path is not full at this point, prepend the current
* path to get the full path.
* Note: this could not be wise to do when under a protected
- * directory.
+ * directory.
*/
if ( fullpath && res_path[0] != '/' ) { /* not a full path */
diff --git a/lib/self_exec.c b/lib/self_exec.c
index ea6262b..4b554cf 100644
--- a/lib/self_exec.c
+++ b/lib/self_exec.c
@@ -1,23 +1,23 @@
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: t -*- */
-/*
+/*
* self_exec.c: self_exec magic required to run child functions on uClinux
- *
+ *
* Copyright (C) 2005 Paul J.Y. Lahaie <pjlahaie-at-steamballoon.com>
- *
+ *
* 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.
- *
+ *
* This software was produced by Steamballoon Incorporated
* 55 Byward Market Square, 2nd Floor North, Ottawa, ON K1N 9C3, Canada
*/
@@ -113,7 +113,7 @@
tst_resm(TBROK, "Invalid argument to -C option");
tst_exit();
}
- if (j != i) {
+ if (j != i) {
va_end(ap);
return;
}
diff --git a/lib/str_to_bytes.c b/lib/str_to_bytes.c
index bc45d0b..5bbfb8d 100644
--- a/lib/str_to_bytes.c
+++ b/lib/str_to_bytes.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#include <stdio.h>
@@ -101,7 +101,7 @@
return (int)((num * (float)M_MULT) * sizeof(long));
case 'g':
return (int)(num * (float)G_MULT);
- case 'G':
+ case 'G':
return (int)((num * (float)G_MULT) * sizeof(long));
default:
return -1;
@@ -136,7 +136,7 @@
return (long)((num * (float)M_MULT) * sizeof(long));
case 'g':
return (long)(num * (float)G_MULT);
- case 'G':
+ case 'G':
return (long)((num * (float)G_MULT) * sizeof(long));
default:
return -1;
@@ -176,7 +176,7 @@
return (long long)((num * (float)M_MULT) * sizeof(long long));
case 'g':
return (long long)(num * (float)G_MULT);
- case 'G':
+ case 'G':
return (long long)((num * (float)G_MULT) * sizeof(long long));
default:
return -1;
@@ -193,16 +193,16 @@
fprintf(stderr, "missing str_to_bytes() parameteres\n");
exit(1);
}
-
+
for (ind=1; ind<argc; ind++) {
- printf("str_to_bytes(%s) returned %d\n",
+ printf("str_to_bytes(%s) returned %d\n",
argv[ind], str_to_bytes(argv[ind]));
- printf("str_to_lbytes(%s) returned %ld\n",
+ printf("str_to_lbytes(%s) returned %ld\n",
argv[ind], str_to_lbytes(argv[ind]));
- printf("str_to_llbytes(%s) returned %lld\n",
+ printf("str_to_llbytes(%s) returned %lld\n",
argv[ind], str_to_llbytes(argv[ind]));
}
}
diff --git a/lib/string_to_tokens.c b/lib/string_to_tokens.c
index 6f0d775..09be8c0 100644
--- a/lib/string_to_tokens.c
+++ b/lib/string_to_tokens.c
@@ -1,42 +1,42 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
/**********************************************************
- *
+ *
* OS Testing - Silicon Graphics, Inc.
- *
+ *
* FUNCTION NAME : string_to_tokens
- *
+ *
* FUNCTION TITLE : Break a string into its tokens
- *
+ *
* SYNOPSIS:
*
* int string_to_tokens(arg_string, arg_array, array_size, separator)
@@ -44,13 +44,13 @@
* char *arg_array[];
* int array_size;
* char *separator;
- *
+ *
* AUTHOR : Richard Logan
*
* DATE : 10/94
*
* INITIAL RELEASE : UNICOS 7.0
- *
+ *
* DESCRIPTION
* This function parses the string 'arg_string', placing pointers to
* the 'separator' separated tokens into the elements of 'arg_array'.
@@ -64,7 +64,7 @@
* This function returns the number of 'separator' separated tokens that
* were found in 'arg_string'.
* If 'arg_array' or 'separator' is NULL or 'array_size' is less than 2, -1 is returned.
- *
+ *
* WARNING
* This function uses strtok() to parse 'arg_string', and thus
* physically alters 'arg_string' by placing null characters where the
@@ -72,7 +72,7 @@
*
*
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <stdio.h>
+#include <stdio.h>
#include <string.h> /* for string functions */
#include "string_to_tokens.h"
@@ -81,7 +81,7 @@
{
int num_toks = 0; /* number of tokens found */
char *strtok();
-
+
if ( arg_array == NULL || array_size <= 1 || separator == NULL )
return -1;
diff --git a/lib/system_specific_hugepages_info.c b/lib/system_specific_hugepages_info.c
index 442e1a7..a3ee584 100644
--- a/lib/system_specific_hugepages_info.c
+++ b/lib/system_specific_hugepages_info.c
@@ -44,7 +44,7 @@
if (!fgets(buf, 10, f)) {
fclose(f);
tst_resm(TBROK, "Could not read Total_Hugepages from /proc/meminfo");
- tst_exit();
+ tst_exit();
}
pclose(f);
return(atoi(buf));
diff --git a/lib/system_specific_process_info.c b/lib/system_specific_process_info.c
index d88acb7..3165f37 100644
--- a/lib/system_specific_process_info.c
+++ b/lib/system_specific_process_info.c
@@ -22,7 +22,7 @@
* get_max_pids(): Return the maximum number of pids for this system by
* reading /proc/sys/kernel/pid_max
*
- * get_free_pids(): Return number of free pids by subtracting the number
+ * get_free_pids(): Return number of free pids by subtracting the number
* of pids currently used ('ps -eT') from max_pids
*/
diff --git a/lib/tlibio.c b/lib/tlibio.c
index 4c637e7..dd5dc02 100644
--- a/lib/tlibio.c
+++ b/lib/tlibio.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
/*
@@ -88,7 +88,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/time.h>
+#include <sys/time.h>
#include <sys/param.h>
#include <errno.h>
#include <sys/types.h>
@@ -140,14 +140,14 @@
{ "b", LIO_IO_ASYNC|LIO_WAIT_SIGPAUSE, "async i/o using pause" },
{ "a", LIO_IO_ASYNC|LIO_WAIT_RECALL, "async i/o using recall/aio_suspend" },
#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__))
- { "r",
+ { "r",
LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES, "random sync i/o types and wait methods" },
- { "R",
+ { "R",
LIO_RANDOM|LIO_IO_ATYPES|LIO_WAIT_ATYPES, "random i/o types and wait methods" },
#else
- { "r",
+ { "r",
LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES, "random i/o types and wait methods" },
- { "R",
+ { "R",
LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES, "random i/o types and wait methods" },
#endif
{ "l", LIO_IO_SLISTIO|LIO_WAIT_RECALL, "single stride sync listio" },
@@ -174,8 +174,8 @@
/* nowait is a touchy thing, it's an accident that this implementation worked at all. 6/27/97 roehrich */
/* { "nowait", LIO_WAIT_NONE, "do not wait for async io to complete" },*/
{ "random", LIO_RANDOM, "set random bit" },
- { "randomall",
- LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES,
+ { "randomall",
+ LIO_RANDOM|LIO_IO_TYPES|LIO_WAIT_TYPES,
"all random i/o types and wait methods (except nowait)" },
};
@@ -197,7 +197,7 @@
*
* Determine the bounds of a strided request, normalized to offset. Returns
* the number of bytes needed to satisfy the request, and optionally sets
- * *min and *max to the mininum and maximum bytes referenced, normalized
+ * *min and *max to the mininum and maximum bytes referenced, normalized
* around offset.
*
* Returns -1 on error - the only possible error conditions are illegal values
@@ -245,11 +245,11 @@
min_byte = offset;
max_byte = min_byte + nbytes - 1;
}
-
+
if (min != NULL) {
*min = min_byte;
}
-
+
if (max != NULL) {
*max = max_byte;
}
@@ -330,7 +330,7 @@
* method tokens as defined in Lio_info2[]. If a token does not match
* any of the tokens in Lio_info2[], it will be coverted to a number.
* If it was a number, those bits are also set.
- *
+ *
* (rrl 04/96)
***********************************************************************/
int
@@ -354,7 +354,7 @@
savecc = *cc;
*cc = '\0';
- found = 0;
+ found = 0;
/*
* Determine if token is a valid string or number and if
@@ -460,7 +460,7 @@
*
* Return Value
* This function will return a value with all non choosen io type
- * and wait method bits cleared. The LIO_RANDOM bit is also
+ * and wait method bits cleared. The LIO_RANDOM bit is also
* cleared. All other bits are left unchanged.
*
* (rrl 04/96)
@@ -493,7 +493,7 @@
}
/***********************************************************************
- * Generic write function
+ * Generic write function
* This function can be used to do a write using write(2), writea(2),
* aio_write(3), writev(2), pwrite(2),
* or single stride listio(2)/lio_listio(3).
@@ -505,12 +505,12 @@
* wait method is: recall(2) for writea(2) and listio(2); aio_suspend(3) for
* aio_write(3) and lio_listio(3).
*
- * If multiple wait methods are specified,
+ * If multiple wait methods are specified,
* only one wait method will be used. The order is predetermined.
*
* If the call specifies a signal and one of the two signal wait methods,
* a signal handler for the signal is set. This will reset an already
- * set handler for this signal.
+ * set handler for this signal.
*
* If the LIO_RANDOM method bit is set, this function will randomly
* choose a io type and wait method from bits in the method argument.
@@ -528,7 +528,7 @@
* If the size the system call say was written is different
* then what was asked to be written, errmsg is updated for
* this error condition. The return value is still the amount
- * the system call says was written.
+ * the system call says was written.
*
* (rrl 04/96)
***********************************************************************/
@@ -548,7 +548,7 @@
int listio_cmd; /* Holds the listio/lio_listio cmd */
#ifdef CRAY
struct listreq request; /* Used when a listio is wanted */
- struct iosw status, *statptr[1];
+ struct iosw status, *statptr[1];
#else
/* for linux or sgi */
struct iovec iov; /* iovec for writev(2) */
@@ -654,7 +654,7 @@
* Otherwise there is not necessary a signal handler to trap
* the signal.
*/
- if ( sig && !(method & LIO_USE_SIGNAL) &&
+ if ( sig && !(method & LIO_USE_SIGNAL) &&
! (method & LIO_WAIT_SIGTYPES) ){
sig=0; /* ignore signal parameter */
@@ -711,7 +711,7 @@
* system call failure. If sync i/o, return the number of
* bytes written/read.
*/
-
+
if ( (method & LIO_IO_SYNC) || (method & (LIO_IO_TYPES | LIO_IO_ATYPES)) == 0 ){
/*
* write(2) is used if LIO_IO_SYNC bit is set or not none
@@ -813,7 +813,7 @@
listio_cmd=LC_WAIT;
io_type="listio(2) sync write";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"listio(LC_WAIT, &req, 1) LO_WRITE, fd:%d, nbyte:%d",
fd, size);
@@ -887,7 +887,7 @@
listio_cmd=LC_START;
io_type="listio(2) async write";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"listio(LC_START, &req, 1) LO_WRITE, fd:%d, nbyte:%d",
fd, size);
@@ -934,7 +934,7 @@
else if ( method & LIO_IO_SYNCV ) {
io_type="writev(2)";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"writev(%d, &iov, 1) nbyte:%d", fd, size);
if ( Debug_level ) {
@@ -965,7 +965,7 @@
else if ( method & LIO_IO_SYNCP ) {
io_type="pwrite(2)";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"pwrite(%d, buf, %d, %lld)", fd, size, (long long)poffset);
if ( Debug_level ) {
@@ -1027,10 +1027,10 @@
* check that async io was successful.
* Note: if the there was an system call failure, -errno
* was returned and Errormsg should already have been updated.
- * If amount i/o was different than size, Errormsg should already
+ * If amount i/o was different than size, Errormsg should already
* have been updated but the actual i/o size if returned.
*/
-
+
#ifdef CRAY
ret=lio_check_asyncio(io_type, size, &status);
#endif
@@ -1042,7 +1042,7 @@
} /* end of lio_write_buffer */
/***********************************************************************
- * Generic read function
+ * Generic read function
* This function can be used to do a read using read(2), reada(2),
* aio_read(3), readv(2), pread(2),
* or single stride listio(2)/lio_listio(3).
@@ -1054,12 +1054,12 @@
* wait method is: recall(2) for reada(2) and listio(2); aio_suspend(3) for
* aio_read(3) and lio_listio(3).
*
- * If multiple wait methods are specified,
+ * If multiple wait methods are specified,
* only one wait method will be used. The order is predetermined.
*
* If the call specifies a signal and one of the two signal wait methods,
* a signal handler for the signal is set. This will reset an already
- * set handler for this signal.
+ * set handler for this signal.
*
* If the LIO_RANDOM method bit is set, this function will randomly
* choose a io type and wait method from bits in the method argument.
@@ -1077,7 +1077,7 @@
* If the size the system call say was written is different
* then what was asked to be written, errmsg is updated for
* this error condition. The return value is still the amount
- * the system call says was written.
+ * the system call says was written.
*
* (rrl 04/96)
***********************************************************************/
@@ -1097,7 +1097,7 @@
int omethod = method;
#ifdef CRAY
struct listreq request; /* Used when a listio is wanted */
- struct iosw status, *statptr[1];
+ struct iosw status, *statptr[1];
#else
/* for linux or sgi */
struct iovec iov; /* iovec for readv(2) */
@@ -1262,7 +1262,7 @@
* system call failure. If sync i/o, return the number of
* bytes written/read.
*/
-
+
if ( (method & LIO_IO_SYNC) || (method & (LIO_IO_TYPES | LIO_IO_ATYPES)) == 0 ){
/*
* read(2) is used if LIO_IO_SYNC bit is set or not none
@@ -1366,7 +1366,7 @@
listio_cmd=LC_WAIT;
io_type="listio(2) sync read";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"listio(LC_WAIT, &req, 1) LO_READ, fd:%d, nbyte:%d",
fd, size);
@@ -1395,7 +1395,7 @@
listio_cmd=LIO_WAIT;
io_type="lio_listio(3) sync read";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"lio_listio(LIO_WAIT, aiolist, 1, NULL) LIO_READ, fd:%d, nbyte:%d",
fd, size);
@@ -1438,7 +1438,7 @@
listio_cmd=LC_START;
io_type="listio(2) async read";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"listio(LC_START, &req, 1) LO_READ, fd:%d, nbyte:%d",
fd, size);
@@ -1460,7 +1460,7 @@
listio_cmd=LIO_NOWAIT;
io_type="lio_listio(3) async read";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"lio_listio(LIO_NOWAIT, aiolist, 1, NULL) LIO_READ, fd:%d, nbyte:%d",
fd, size);
@@ -1485,7 +1485,7 @@
else if ( method & LIO_IO_SYNCV ) {
io_type="readv(2)";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"readv(%d, &iov, 1) nbyte:%d", fd, size);
if ( Debug_level ) {
@@ -1516,7 +1516,7 @@
else if ( method & LIO_IO_SYNCP ) {
io_type="pread(2)";
- sprintf(Lio_SysCall,
+ sprintf(Lio_SysCall,
"pread(%d, buf, %d, %lld)", fd, size, (long long)poffset);
if ( Debug_level ) {
@@ -1579,10 +1579,10 @@
* check that async io was successful.
* Note: if the there was an system call failure, -errno
* was returned and Errormsg should already have been updated.
- * If amount i/o was different than size, Errormsg should already
+ * If amount i/o was different than size, Errormsg should already
* have been updated but the actual i/o size if returned.
*/
-
+
#ifdef CRAY
ret=lio_check_asyncio(io_type, size, &status);
#endif
@@ -1733,7 +1733,7 @@
int cnt;
#ifdef sgi
int ret;
- const aiocb_t *aioary[1];
+ const aiocb_t *aioary[1];
#endif
#if defined(__linux__)&& !defined(__UCLIBC__)
int ret;
@@ -1742,8 +1742,8 @@
if ( (method & LIO_WAIT_RECALL)
#if defined(sgi) || (defined(__linux__)&& !defined(__UCLIBC__))
- || (method & LIO_WAIT_CBSUSPEND)
- || (method & LIO_WAIT_SIGSUSPEND)
+ || (method & LIO_WAIT_CBSUSPEND)
+ || (method & LIO_WAIT_SIGSUSPEND)
#endif
|| ((method & LIO_WAIT_TYPES) == 0) ){
/*
@@ -1806,12 +1806,12 @@
printf("DEBUG %s/%d: wait method : active\n", __FILE__, __LINE__);
#ifdef CRAY
sigon();
- /*
+ /*
* loop until sw_flag, sw_count or sw_error field elements
* change to non-zero.
*/
cnt=0;
- while ( (*statptr)->sw_flag == 0 &&
+ while ( (*statptr)->sw_flag == 0 &&
(*statptr)->sw_count == 0 &&
(*statptr)->sw_error == 0 ) {
cnt++;
@@ -1903,7 +1903,7 @@
/***********************************************************************
* The following code is provided as unit test.
* Just define add "-DUNIT_TEST=1" to the cc line.
- *
+ *
* (rrl 04/96)
***********************************************************************/
struct unit_info_t {
diff --git a/lib/tst_cwd_has_free.c b/lib/tst_cwd_has_free.c
index 0f766a7..18209aa 100644
--- a/lib/tst_cwd_has_free.c
+++ b/lib/tst_cwd_has_free.c
@@ -11,7 +11,7 @@
*/
#include <sys/vfs.h>
-int
+int
tst_cwd_has_free(int required_kib)
{
struct statfs sf;
diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index ddb7bf9..3526412 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -16,9 +16,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+
/*
- *
+ *
* AUTHOR
* Paul Larson <plars@linuxtestproject.org>
*
diff --git a/lib/tst_res.c b/lib/tst_res.c
index 98b8d7b..0b2d168 100644
--- a/lib/tst_res.c
+++ b/lib/tst_res.c
@@ -5,34 +5,34 @@
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: tst_res.c,v 1.9 2009/07/20 02:42:32 vapier Exp $ */
+/* $Id: tst_res.c,v 1.10 2009/07/20 10:59:32 vapier Exp $ */
/**********************************************************
*
diff --git a/lib/tst_sig.c b/lib/tst_sig.c
index 6989305..1aa1b41 100644
--- a/lib/tst_sig.c
+++ b/lib/tst_sig.c
@@ -1,36 +1,36 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: tst_sig.c,v 1.10 2005/01/04 21:00:35 mridge Exp $ */
+/* $Id: tst_sig.c,v 1.11 2009/07/20 10:59:32 vapier Exp $ */
/*****************************************************************************
OS Testing - Silicon Graphics, Inc.
@@ -53,7 +53,7 @@
handler - a pointer to the unexpected signal handler to
be executed after an unexpected signal has been
- detected. If handler is set to DEF_HANDLER, a
+ detected. If handler is set to DEF_HANDLER, a
default handler is used. This routine should be
declared as function returning an int.
@@ -61,7 +61,7 @@
by the unexpected signal handler before tst_exit is
called. This parameter is set to NULL if no cleanup
routine is required. An external variable, T_cleanup
- is set so that other user-defined handlers have
+ is set so that other user-defined handlers have
access to the cleanup routine. This routine should be
declared as returning type void.
@@ -113,7 +113,7 @@
/* use default handler */
handler = def_handler;
}
-
+
#ifdef _SC_SIGRT_MIN
sigrtmin = sysconf(_SC_SIGRT_MIN);
sigrtmax = sysconf(_SC_SIGRT_MAX);
@@ -270,7 +270,7 @@
* control over its personality.
*/
static void (*tst_setup_signal( int sig, void (*handler)(int)))(int)
-{
+{
struct sigaction my_act,old_act;
int ret;
diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
index e9f146e..9c9809e 100644
--- a/lib/tst_tmpdir.c
+++ b/lib/tst_tmpdir.c
@@ -1,36 +1,36 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: tst_tmpdir.c,v 1.13 2009/06/09 16:01:20 subrata_modak Exp $ */
+/* $Id: tst_tmpdir.c,v 1.14 2009/07/20 10:59:32 vapier Exp $ */
/**********************************************************
*
@@ -129,7 +129,7 @@
# define HAVE_MKDTEMP 0
int tfd;
# endif
-#else
+#else
# define HAVE_MKDTEMP 0
int tfd;
#endif
@@ -142,7 +142,7 @@
* The TDIRECTORY env. variable is set, so no temp dir is created.
* Also, no clean up will be done via tst_rmdir().
*/
- mkdir(TESTDIR,DIR_MODE); /*Try to create the directory if it does not exist already,
+ mkdir(TESTDIR,DIR_MODE); /*Try to create the directory if it does not exist already,
user might forget to create one before exporting TDIRECTORY,
Will fail if it already exists, no issues in that*/
no_cleanup++;
@@ -151,7 +151,7 @@
#endif
} else {
/*
- * Create a template for the temporary directory. Use the
+ * Create a template for the temporary directory. Use the
* environment variable TMPDIR if it is available, otherwise
* use our default TEMPDIR.
*/
@@ -160,28 +160,28 @@
} else {
snprintf(template, PATH_MAX, "%s/%.3sXXXXXX", TEMPDIR, TCID);
}
-
+
#if HAVE_MKDTEMP
/*
* Make the temporary directory in one shot using mkdtemp()
*/
if (mkdtemp(template) == NULL)
- tst_brkm(TBROK, tmpdir_cleanup,
- "%s: mkdtemp(%s) failed; errno = %d: %s",
+ tst_brkm(TBROK, tmpdir_cleanup,
+ "%s: mkdtemp(%s) failed; errno = %d: %s",
FN_NAME, template, errno, strerror(errno));
if ( (TESTDIR = strdup(template)) == NULL ) { //Error Handling for strdup()
tst_brkm(TBROK, tmpdir_cleanup,
"%s: strdup(%s) failed; errno = %d: %s",
FN_NAME, template, errno, strerror(errno));
}
-#else
+#else
/*
* Make the template name, then the directory
*/
if ((tfd = mkstemp(template)) == -1)
- tst_brkm(TBROK, tmpdir_cleanup,
- "%s: mkstemp(%s) failed; errno = %d: %s",
+ tst_brkm(TBROK, tmpdir_cleanup,
+ "%s: mkstemp(%s) failed; errno = %d: %s",
FN_NAME, template, errno, strerror(errno));
if ( close(tfd) == -1 ) {
tst_brkm(TBROK, tmpdir_cleanup,
@@ -199,12 +199,12 @@
FN_NAME, template, errno, strerror(errno));
}
if (mkdir(TESTDIR, DIR_MODE)) {
- /* If we start failing with EEXIST, wrap this section in
+ /* If we start failing with EEXIST, wrap this section in
* a loop so we can try again.
*/
- tst_brkm(TBROK, tmpdir_cleanup,
- "%s: mkdir(%s, %#o) failed; errno = %d: %s",
- FN_NAME, TESTDIR, DIR_MODE, errno,
+ tst_brkm(TBROK, tmpdir_cleanup,
+ "%s: mkdir(%s, %#o) failed; errno = %d: %s",
+ FN_NAME, TESTDIR, DIR_MODE, errno,
strerror(errno));
}
#endif
@@ -214,13 +214,13 @@
* gid of the person running the tests and permissions to 777.
*/
if ( chown(TESTDIR, -1, getgid()) == -1 )
- tst_brkm(TBROK, tmpdir_cleanup,
- "chown(%s, -1, %d) failed; errno = %d: %s",
+ tst_brkm(TBROK, tmpdir_cleanup,
+ "chown(%s, -1, %d) failed; errno = %d: %s",
TESTDIR, getgid(), errno, strerror(errno));
if ( chmod(TESTDIR,S_IRWXU | S_IRWXG | S_IRWXO) == -1 )
tst_brkm(TBROK, tmpdir_cleanup,
"chmod(%s,777) failed; errno %d: %s",
- TESTDIR, errno, strerror(errno));
+ TESTDIR, errno, strerror(errno));
}
#if UNIT_TEST
@@ -231,7 +231,7 @@
* Change to the temporary directory. If the chdir() fails, issue
* TBROK messages for all test cases, attempt to remove the
* directory (if it was created), and exit. If the removal also
- * fails, also issue a TWARN message.
+ * fails, also issue a TWARN message.
*/
if ( chdir(TESTDIR) == -1 ) {
tst_brkm(TBROK, NULL, "%s: chdir(%s) failed; errno = %d: %s",
@@ -244,7 +244,7 @@
tmpdir_cleanup();
}
-
+
#if UNIT_TEST
printf("CWD is %s\n", getcwd((char *)NULL, PATH_MAX));
#endif
@@ -263,7 +263,7 @@
* companion to tst_tmpdir(). If the TDIRECTORY
* environment variable is set, no cleanup will be
* attempted.
- */
+ */
#undef FN_NAME
#define FN_NAME "tst_rmdir()"
@@ -286,7 +286,7 @@
#endif
return;
}
-
+
/*
* Check that TESTDIR is not NULL.
*/
@@ -336,7 +336,7 @@
tst_resm(TWARN,
"%s: chdir(%s) failed; errno = %d: %s\nAttempting to remove temp dir anyway",
FN_NAME, parent_dir, errno, strerror(errno));
-
+
/*
* Attempt to remove the "TESTDIR" directory, using rmobj().
*/
diff --git a/lib/write_log.c b/lib/write_log.c
index 667e64f..0600b10 100644
--- a/lib/write_log.c
+++ b/lib/write_log.c
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
+ *
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
+ *
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
/*
@@ -45,7 +45,7 @@
* The wlog_rec datatype is a structure which contains all the information
* about a file write. Examples include the file name, offset, length,
* pattern, etc. In addition there is a bit which is cleared/set based
- * on whether or not the write has been confirmed as complete. This
+ * on whether or not the write has been confirmed as complete. This
* allows the write logfile to contain information on writes which have
* been initiated, but not yet completed (as in async io).
*
@@ -152,7 +152,7 @@
wfile->w_afd = -1;
return -1;
}
-
+
return 0;
}
@@ -178,10 +178,10 @@
* is so that we can record writes which are outstanding (with the w_done
* bit in wrec cleared), but not completed, and then later update the
* logfile when the write request completes (as with async io). When
- * offset is >= 0, only the fixed length portion of the record is
+ * offset is >= 0, only the fixed length portion of the record is
* rewritten. See text in write_log.h for details on the format of an
* on-disk record.
- *
+ *
* The return value of the function is the byte offset in the logfile
* where the record begins.
*
@@ -221,12 +221,12 @@
* its length onto the end so that wlog_scan_backward() will work.
* Length is asumed to fit into 2 bytes.
*/
-
+
wbuf[reclen] = reclen / 256;
wbuf[reclen+1] = reclen % 256;
reclen += 2;
- if ( write(wfile->w_afd, wbuf, reclen) == -1 ) {
+ if ( write(wfile->w_afd, wbuf, reclen) == -1 ) {
sprintf(Wlog_Error_String,
"Could not write log - write(%s, %s, %d) failed: %s\n",
wfile->w_file, wbuf, reclen, strerror(errno));
@@ -244,7 +244,7 @@
if ( (lseek(wfile->w_rfd, offset, SEEK_SET)) == -1 ) {
sprintf(Wlog_Error_String,
"Could not reposition file pointer - lseek(%s, %ld, SEEK_SET) failed: %s\n",
- wfile->w_file, offset, strerror(errno));
+ wfile->w_file, offset, strerror(errno));
return -1;
} else {
if ( (write(wfile->w_rfd, wbuf, reclen)) == -1 ) {
@@ -255,7 +255,7 @@
}
}
}
-
+
return offset;
}
@@ -317,7 +317,7 @@
offset -= sizeof(buf) - leftover;
}
- /*
+ /*
* Move to the proper file offset, and read into buf
*/
if ( (lseek(fd, offset, SEEK_SET)) ==-1 ) {
@@ -445,13 +445,13 @@
file = buf + sizeof(struct wlog_rec_disk);
host = file + wrecd->w_pathlen;
pattern = host + wrecd->w_hostlen;
-
+
if (wrecd->w_pathlen > 0)
memcpy(file, wrec->w_path, wrecd->w_pathlen);
-
+
if (wrecd->w_hostlen > 0)
memcpy(host, wrec->w_host, wrecd->w_hostlen);
-
+
if (wrecd->w_patternlen > 0)
memcpy(pattern, wrec->w_pattern, wrecd->w_patternlen);