xfstests updates - rework build to be like other xfs packages, revive some old fs test tools and reenable xfs extensions, move ltp code into a separate subdir to help keeping in sync with real ltp project (hopefully)

This commit is contained in:
Nathan Scott
2003-07-07 06:36:46 +00:00
parent 29c7761c93
commit 332ee29d1a
52 changed files with 18671 additions and 522 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ _do_test()
echo "fsstress.$_n : $_param" echo "fsstress.$_n : $_param"
echo "-----------------------------------------------" echo "-----------------------------------------------"
# -v >$tmp.out # -v >$tmp.out
if ! $here/src/fsstress $_param $FSSTRESS_AVOID -n $_count -d $out >/dev/null 2>&1 if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -n $_count -d $out >/dev/null 2>&1
then then
echo " fsstress (count=$_count) returned $? - see $seq.full" echo " fsstress (count=$_count) returned $? - see $seq.full"
+1 -1
View File
@@ -4,7 +4,7 @@
# Test out a level 0 dump/restore to a tape of a subdir # Test out a level 0 dump/restore to a tape of a subdir
# i.e. it is testing out drive_scsitape.c # i.e. it is testing out drive_scsitape.c
# #
# Use src/fsstress to create a directory structure with a mix of files # Use fsstress to create a directory structure with a mix of files
# #
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
+1 -1
View File
@@ -1,6 +1,6 @@
QA output created by 022 QA output created by 022
Put scsi tape driver into variable block size mode Put scsi tape driver into variable block size mode
Creating directory system to dump using src/fsstress. Creating directory system to dump using fsstress.
----------------------------------------------- -----------------------------------------------
fsstress : -f link=10 -f creat=10 -f mkdir=10 -f truncate=5 -f symlink=10 fsstress : -f link=10 -f creat=10 -f mkdir=10 -f truncate=5 -f symlink=10
+2 -2
View File
@@ -106,7 +106,7 @@ mount -t xfs -o loop $SCRATCH_MNT/test.xfs $SCRATCH_MNT/test >> $seq.full 2>&1 \
|| _fail "!!! failed to loop mount xfs" || _fail "!!! failed to loop mount xfs"
_log "stress" _log "stress"
src/fsstress -d $SCRATCH_MNT/test -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \ ltp/fsstress -d $SCRATCH_MNT/test -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
|| _fail "!!! stress failed" || _fail "!!! stress failed"
_log "clean" _log "clean"
@@ -126,7 +126,7 @@ mount -t ext2 -o loop $SCRATCH_MNT/test/test.ext2 $SCRATCH_MNT/test2 >> $seq.ful
|| _fail "!!! failed to loop mount xfs" || _fail "!!! failed to loop mount xfs"
_log "stress ext2 on xfs via loop" _log "stress ext2 on xfs via loop"
src/fsstress -d $SCRATCH_MNT/test2 -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \ ltp/fsstress -d $SCRATCH_MNT/test2 -n 1000 $FSSTRESS_AVOID >> $seq.full 2>&1 \
|| _fail "!!! stress ext2 failed" || _fail "!!! stress ext2 failed"
_log "clean" _log "clean"
+1 -2
View File
@@ -98,8 +98,7 @@ umount $SCRATCH_DEV
# #
_wipe_fs _wipe_fs
mkdir -p $dump_dir ||\ mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\""
_error "cannot mkdir \"$dump_dir\""
cd $dump_dir cd $dump_dir
echo "Do the incremental dumps" echo "Do the incremental dumps"
+2 -3
View File
@@ -59,9 +59,8 @@ _acl_requirements
_require_scratch _require_scratch
# set up fs for 1K inodes # set up fs for 1K inodes
export MKFS_OPTIONS="-i size=1024" _scratch_mkfs_xfs -i size=1024 >>$here/$seq.full || _fail "mkfs failed"
_scratch_mkfs_xfs >>$here/$seq.full || _error "mkfs failed" _scratch_mount >>$here/$seq.full || _fail "mount failed"
_scratch_mount >>$here/$seq.full || _error "mount failed"
cd $SCRATCH_MNT cd $SCRATCH_MNT
# xfs_growfs -n $SCRATCH_MNT # xfs_growfs -n $SCRATCH_MNT
+1 -1
View File
@@ -181,7 +181,7 @@ then
# -n 10 makes this take about 10 seconds, # -n 10 makes this take about 10 seconds,
# This allows the loop to end shortly after $tmp/running # This allows the loop to end shortly after $tmp/running
# is deleted # is deleted
$here/src/fsstress -d "$STRESS_DIR" -n 10 > /dev/null 2>&1 $here/ltp/fsstress -d "$STRESS_DIR" -n 10 > /dev/null 2>&1
sync sync
done done
+1 -1
View File
@@ -52,7 +52,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
# real QA test starts here # real QA test starts here
$here/src/fsstress \ $here/ltp/fsstress \
-d $TEST_DIR/fsstress \ -d $TEST_DIR/fsstress \
-f allocsp=0 \ -f allocsp=0 \
-f freesp=0 \ -f freesp=0 \
+9 -10
View File
@@ -1,5 +1,5 @@
# #
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify it # 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 # under the terms of version 2 of the GNU General Public License as
@@ -39,11 +39,11 @@ endif
TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group) TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group)
CONFIGURE = configure include/builddefs CONFIGURE = configure include/builddefs
LSRCFILES = configure configure.in LSRCFILES = configure configure.in aclocal.m4 README VERSION
LDIRT = *.bad *.new *.core *.full *.raw core a.out *.bak \ LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
check.log check.time config.* conftest* check.log check.time
SUBDIRS = include src SUBDIRS = include lib ltp src m4
default: $(CONFIGURE) new remake check $(TESTS) default: $(CONFIGURE) new remake check $(TESTS)
ifeq ($(HAVE_BUILDDEFS), no) ifeq ($(HAVE_BUILDDEFS), no)
@@ -58,14 +58,13 @@ else
clean: # if configure hasn't run, nothing to clean clean: # if configure hasn't run, nothing to clean
endif endif
$(CONFIGURE): configure.in include/builddefs.in $(CONFIGURE):
rm -f config.cache
autoconf autoconf
./configure ./configure
install install-dev: default aclocal.m4::
$(SUBDIRS_MAKERULE) aclocal --acdir=$(TOPDIR)/m4 --output=$@
realclean distclean: clean realclean distclean: clean
rm -f $(LDIRT) $(CONFIGURE) rm -f $(LDIRT) $(CONFIGURE)
rm -rf autom4te.cache rm -rf autom4te.cache Logs
+3 -2
View File
@@ -76,7 +76,7 @@ export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"} export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
export BENCH_PASSES=${BENCH_PASSES:=5} export BENCH_PASSES=${BENCH_PASSES:=5}
export DEBUG=${DEBUG:=-DEXPERIMENTAL_LARGE_SECTORS} #export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a} export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes} export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes}
@@ -105,7 +105,8 @@ in
flutz) flutz)
MODULAR=0 MODULAR=0
EMAIL="nathans@larry" EMAIL="nathans@larry"
TEST_DEV=/dev/sda5 TEST_DEV=/dev/sda5
TEST_LOGDEV=/dev/sda9
TEST_DIR=/xfsqa1 TEST_DIR=/xfsqa1
SCRATCH_DEV=/dev/sda6 SCRATCH_DEV=/dev/sda6
SCRATCH_LOGDEV=/dev/sda7 SCRATCH_LOGDEV=/dev/sda7
+16 -29
View File
@@ -228,20 +228,12 @@ _require_tape()
_set_variable _set_variable
} }
_error()
{
echo "Error: $*" | tee -a $here/$seq.full
echo "(see $here/$seq.full for details)"
status=1
exit
}
_wipe_fs() _wipe_fs()
{ {
_require_scratch _require_scratch
_scratch_mkfs_xfs >>$here/$seq.full || _error "mkfs failed" _scratch_mkfs_xfs >>$here/$seq.full || _fail "mkfs failed"
_scratch_mount >>$here/$seq.full || _error "mount failed" _scratch_mount >>$here/$seq.full || _fail "mount failed"
} }
# #
@@ -286,20 +278,20 @@ _cleanup()
_stable_fs() _stable_fs()
{ {
_saveddir=`pwd`; cd / _saveddir=`pwd`; cd /
umount $SCRATCH_MNT >>$here/$seq.full || _error "unmount failed" umount $SCRATCH_MNT >>$here/$seq.full || _fail "unmount failed"
_scratch_mount >>$here/$seq.full || _error "mount failed" _scratch_mount >>$here/$seq.full || _fail "mount failed"
cd $_saveddir cd $_saveddir
} }
# #
# Run src/fsstress to create a mixture of # Run fsstress to create a mixture of
# files,dirs,links,symlinks # files,dirs,links,symlinks
# #
# Pinched from test 013. # Pinched from test 013.
# #
_create_dumpdir_stress() _create_dumpdir_stress()
{ {
echo "Creating directory system to dump using src/fsstress." echo "Creating directory system to dump using fsstress."
_wipe_fs _wipe_fs
@@ -315,7 +307,7 @@ _create_dumpdir_stress()
echo "-----------------------------------------------" echo "-----------------------------------------------"
echo "fsstress : $_param" echo "fsstress : $_param"
echo "-----------------------------------------------" echo "-----------------------------------------------"
if ! $here/src/fsstress $_param -s 1 $FSSTRESS_AVOID -n $_count -d $dump_dir >$tmp.out 2>&1 if ! $here/ltp/fsstress $_param -s 1 $FSSTRESS_AVOID -n $_count -d $dump_dir >$tmp.out 2>&1
then then
echo " fsstress (count=$_count) returned $? - see $here/$seq.full" echo " fsstress (count=$_count) returned $? - see $here/$seq.full"
@@ -452,8 +444,7 @@ _do_create_dumpdir_fill()
{ {
echo "Creating directory system to dump using src/fill." echo "Creating directory system to dump using src/fill."
mkdir -p $dump_dir ||\ mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\""
_error "cannot mkdir \"$dump_dir\""
cd $dump_dir cd $dump_dir
$verbose && echo -n "Setup " $verbose && echo -n "Setup "
@@ -524,8 +515,7 @@ _do_create_dumpdir_fill()
_create_dumpdir_largefile() _create_dumpdir_largefile()
{ {
_wipe_fs _wipe_fs
mkdir -p $dump_dir ||\ mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\""
_error "cannot mkdir \"$dump_dir\""
_largesize=4294967297 _largesize=4294967297
_largefile=$dump_dir/largefile _largefile=$dump_dir/largefile
echo "dd a largefile at offset $_largesize" echo "dd a largefile at offset $_largesize"
@@ -598,8 +588,7 @@ _do_create_dump_symlinks()
{ {
echo "Creating directory system of symlinks to dump." echo "Creating directory system of symlinks to dump."
mkdir -p $dump_dir ||\ mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\""
_error "cannot mkdir \"$dump_dir\""
cd $dump_dir cd $dump_dir
$verbose && echo -n "Setup " $verbose && echo -n "Setup "
@@ -721,8 +710,7 @@ _create_dumpdir_hardlinks()
_wipe_fs _wipe_fs
echo "Creating directory system of hardlinks to incrementally dump." echo "Creating directory system of hardlinks to incrementally dump."
mkdir -p $dump_dir ||\ mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\""
_error "cannot mkdir \"$dump_dir\""
cd $dump_dir cd $dump_dir
_create_hardset $_numsets _create_hardset $_numsets
@@ -838,12 +826,12 @@ _parse_args()
case $1 case $1
in in
-f) -f)
[ -z "$2" ] && _error "missing argument for -f" [ -z "$2" ] && _fail "missing argument for -f"
dumptape=$2 dumptape=$2
shift shift
;; ;;
-L) -L)
[ -z "$2" ] && _error "missing argument for -L" [ -z "$2" ] && _fail "missing argument for -L"
session_label=$2 session_label=$2
shift shift
;; ;;
@@ -864,12 +852,12 @@ _parse_args()
do_quota_check=false do_quota_check=false
;; ;;
-l) -l)
[ -z "$2" ] && _error "missing argument for -l" [ -z "$2" ] && _fail "missing argument for -l"
dump_args="$dump_args -l$2" dump_args="$dump_args -l$2"
shift shift
;; ;;
*) *)
_error "invalid argument to common.dump function: $1" _fail "invalid argument to common.dump function: $1"
;; ;;
esac esac
shift shift
@@ -958,8 +946,7 @@ _do_dump_multi_file()
_prepare_restore_dir() _prepare_restore_dir()
{ {
rm -rf $restore_dir rm -rf $restore_dir
mkdir $restore_dir ||\ mkdir $restore_dir || _fail "failed to mkdir $restore_dir"
_error "failed to mkdir $restore_dir"
} }
+17 -256
View File
@@ -1,261 +1,22 @@
dnl unpacking check - this file must exist AC_INIT(src/xfsctl.c)
AC_INIT(src/fsstress.c) AC_PACKAGE_GLOBALS(xfstests)
pkg_name="xfstests" AC_PACKAGE_UTILITIES(xfstests)
AC_SUBST(pkg_name)
# AC_PACKAGE_NEED_UUID_H
# Note: the following environment variables may be set to override the AC_PACKAGE_NEED_UUIDCOMPARE
# defaults (to change paths and/or executables, build parameters, etc):
#
# DEBUG OPTIMIZER MAKE CC LD TAR ZIP RPM AWK SED ECHO
# MALLOCLIB DISTRIBUTION PACKAGE_BUILDER PREFIX ROOT_PREFIX
#
DEBUG=${DEBUG:-'-DDEBUG'} # -DNDEBUG AC_PACKAGE_NEED_XFS_LIBXFS_H
OPTIMIZER=${OPTIMIZER:-'-g'} # (-O1 enforced default) AC_PACKAGE_NEED_XFSCTL_MACRO
MALLOCLIB=${MALLOCLIB:-''} # /usr/lib/libefence.a AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS
AC_PACKAGE_NEED_XFS_HANDLE_H
AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
dnl Debug build? AC_PACKAGE_NEED_ATTR_XATTR_H
debug_build="$DEBUG" AC_PACKAGE_NEED_GETXATTR_LIBATTR
AC_SUBST(debug_build) AC_PACKAGE_NEED_SYS_ACL_H
AC_PACKAGE_NEED_ACL_LIBACL_H
AC_PACKAGE_NEED_ACLINIT_LIBACL
dnl Optimization options? AC_PACKAGE_WANT_LIBGDBM
opt_build="$OPTIMIZER"
AC_SUBST(opt_build)
dnl Alternate malloc library? AC_OUTPUT(include/builddefs)
malloc_lib="$MALLOCLIB"
AC_SUBST(malloc_lib)
dnl Set version
. ./VERSION
pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
pkg_release=$PKG_BUILD
AC_SUBST(pkg_version)
AC_SUBST(pkg_release)
pkg_distribution="SGI ProPack"
test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
AC_SUBST(pkg_distribution)
pkg_builder=`id -u -n`@`hostname`
test -z "$PACKAGE_BUILDER" || pkg_builder="$PACKAGE_BUILDER"
AC_SUBST(pkg_builder)
dnl check if user wants their own C compiler
test -z "$CC" && AC_PROG_CC
cc=$CC
AC_SUBST(cc)
dnl check if users wants their own make
test -z "$MAKE" && AC_PATH_PROG(MAKE, make, /usr/bin/make)
make=$MAKE
AC_SUBST(make)
dnl check if users wants their own linker
test -z "$LD" && AC_PATH_PROG(LD, ld, /usr/bin/ld)
ld=$LD
AC_SUBST(ld)
dnl check if the tar program is available
test -z "$TAR" && AC_PATH_PROG(TAR, tar)
tar=$TAR
AC_SUBST(tar)
dnl check if the gzip program is available
test -z "$ZIP" && AC_PATH_PROG(ZIP, gzip, /bin/gzip)
zip=$ZIP
AC_SUBST(zip)
dnl check if the rpm program is available
test -z "$RPM" && AC_PATH_PROG(RPM, rpm, /bin/rpm)
rpm=$RPM
AC_SUBST(rpm)
dnl .. and what version is rpm
rpm_version=0
test -x $RPM && \
rpm_version=`$RPM --version | awk '{print $NF}' | awk -F. '{print $1}'`
AC_SUBST(rpm_version)
dnl check if the makedepend program is available
test -z "$MAKEDEPEND" && AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
makedepend=$MAKEDEPEND
AC_SUBST(makedepend)
dnl check if symbolic links are supported
AC_PROG_LN_S
dnl check if user wants their own awk, sed and echo
test -z "$AWK" && AC_PATH_PROG(AWK, awk, /bin/awk)
awk=$AWK
AC_SUBST(awk)
test -z "$SED" && AC_PATH_PROG(SED, sed, /bin/sed)
sed=$SED
AC_SUBST(sed)
test -z "$ECHO" && AC_PATH_PROG(ECHO, echo, /bin/echo)
echo=$ECHO
AC_SUBST(echo)
CPPFLAGS="-I/usr/include/xfs"
AC_SUBST(CPPFLAGS)
dnl Checks for UUID header and library.
AC_CHECK_HEADER(uuid/uuid.h,, [
echo
echo 'FATAL ERROR: could not find a valid UUID header.'
echo 'Install either the e2fsprogs-devel (rpm) or the uuid-dev (deb) package.'
exit 1
])
AC_CHECK_LIB(uuid, uuid_generate,, [
echo
echo 'FATAL ERROR: could not find a valid UUID library.'
echo 'Install either the e2fsprogs-devel (rpm) or the uuid-dev (deb) package.'
exit 1
])
libuuid="/usr/lib/libuuid.a"
AC_SUBST(libuuid)
dnl Checks for base XFS headers and libraries.
AC_CHECK_HEADER(xfs/libxfs.h,, [
echo
echo 'FATAL ERROR: could not find a valid XFS library header.'
echo 'Install either the xfsprogs-devel (rpm) or the xfslibs-dev (deb) package.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
exit 1
])
AC_CHECK_LIB(xfs, libxfs_init,, [
echo
echo 'FATAL ERROR: could not find a valid XFS base library.'
echo 'Install either the xfsprogs-devel (rpm) or the xfslibs-dev (deb) package.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
exit 1
])
AC_CHECK_HEADER(xfs/handle.h,, [
echo
echo 'FATAL ERROR: could not find a valid XFS handle header.'
echo 'Install either the xfsprogs-devel (rpm) or the xfslibs-dev (deb) package.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
exit 1
])
AC_CHECK_LIB(handle, path_to_handle,, [
echo
echo 'FATAL ERROR: could not find a valid XFS handle library.'
echo 'Install either the xfsprogs-devel (rpm) or the xfslibs-dev (deb) package.'
echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
exit 1
])
libxfs="-lxfs"
libhdl="-lhandle"
AC_SUBST(libxfs)
AC_SUBST(libhdl)
dnl Checks for Extended Attributes header and library.
AC_CHECK_HEADER(attr/xattr.h,, [
echo
echo 'FATAL ERROR: could not find a valid Extended Attributes header.'
echo 'Install either the attr-devel (rpm) or the attr-dev (deb) package.'
echo 'Alternatively, run "make install-dev" from the attr source.'
exit 1
])
AC_CHECK_LIB(attr, getxattr,, [
echo
echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
echo 'Install either the libattr (rpm) or the libattr1 (deb) package.'
echo 'Alternatively, run "make install-lib" from the attr source.'
exit 1
])
libattr="-lattr"
AC_SUBST(libattr)
dnl Checks for Access Control List headers and library.
AC_CHECK_HEADER(sys/acl.h,, [
echo
echo 'FATAL ERROR: could not find a valid Access Control List headers.'
echo 'Install either the acl-devel (rpm) or the acl (deb) package.'
echo 'Alternatively, run "make install-dev" from the acl source.'
exit 1
])
AC_CHECK_HEADER(acl/libacl.h,, [
echo
echo 'FATAL ERROR: could not find a valid Access Control List headers.'
echo 'Install either the acl-devel (rpm) or the acl (deb) package.'
echo 'Alternatively, run "make install-dev" from the acl source.'
exit 1
])
AC_CHECK_LIB(acl, acl_init,, [
echo
echo 'FATAL ERROR: could not find a valid Access Control List library.'
echo 'Install either the libacl (rpm) or the libacl1 (deb) package.'
echo 'Alternatively, run "make install-lib" from the acl source.'
exit 1
])
libacl="-lacl"
AC_SUBST(libacl)
dnl Checks for GNU database manager header and library.
libgdbm=""
have_db=true
AC_CHECK_HEADER(gdbm/ndbm.h,, [ have_db=false ])
if test $have_db = "true" -a -f /usr/lib/libgdbm.a; then
libgdbm="/usr/lib/libgdbm.a"
fi
AC_SUBST(libgdbm)
AC_SUBST(have_db)
dnl alternate root and usr prefixes
test -z "$ROOT_PREFIX" && ROOT_PREFIX=""
root_prefix="$ROOT_PREFIX"
test -z "$PREFIX" && PREFIX="/usr"
prefix="$PREFIX"
dnl man pages (source)
dnl also check if man page source is gzipped
dnl (usually on Debian, but not Redhat pre-7.0)
pkg_man_dir=${prefix}/share/man
have_zipped_manpages=false
for d in ${prefix}/share/man ${prefix}/man ; do
if test -f $d/man1/man.1.gz
then
pkg_man_dir=$d
have_zipped_manpages=true
break
fi
done
AC_SUBST(pkg_man_dir)
AC_SUBST(have_zipped_manpages)
dnl binaries
pkg_bin_dir=${prefix}/sbin
AC_SUBST(pkg_bin_dir)
dnl static libraries
pkg_lib_dir=${prefix}/lib
AC_SUBST(pkg_lib_dir)
dnl runtime shared system libraries
pkg_slib_dir=${root_prefix}/lib
AC_SUBST(pkg_slib_dir)
dnl system binaries
pkg_sbin_dir=${root_prefix}/sbin
AC_SUBST(pkg_sbin_dir)
dnl include files
pkg_inc_dir=${prefix}/include
AC_SUBST(pkg_inc_dir)
dnl doc directory
pkg_doc_dir=${prefix}/share/doc/${pkg_name}
AC_SUBST(pkg_doc_dir)
dnl
dnl output files
dnl
AC_OUTPUT( \
dnl Build definitions for use in Makefiles
include/builddefs \
)
+1 -1
View File
@@ -130,4 +130,4 @@ ioctl nathans@sgi.com
070 attr auto 070 attr auto
071 rw 071 rw
072 rw 072 rw
073 copy #073 copy
+3 -1
View File
@@ -1,5 +1,5 @@
# #
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify it # 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 # under the terms of version 2 of the GNU General Public License as
@@ -33,6 +33,8 @@
TOPDIR = .. TOPDIR = ..
include $(TOPDIR)/include/builddefs include $(TOPDIR)/include/builddefs
HFILES = dataascii.h databin.h pattern.h \
random_range.h string_to_tokens.h tlibio.h write_log.h
LSRCFILES = builddefs.in buildrules LSRCFILES = builddefs.in buildrules
default install install-dev: default install install-dev:
+38 -110
View File
@@ -1,5 +1,5 @@
# #
# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. # Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify it # 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 # under the terms of version 2 of the GNU General Public License as
@@ -45,124 +45,52 @@ LIBATTR = @libattr@
LIBGDBM = @libgdbm@ LIBGDBM = @libgdbm@
LIBUUID = @libuuid@ LIBUUID = @libuuid@
LIBHANDLE = @libhdl@ LIBHANDLE = @libhdl@
HAVE_DB = @have_db@ LIBTEST = $(TOPDIR)/lib/libtest.la
CPPFLAGS = -I/usr/include/xfs -I/usr/include/attr
BUILDRULES = $(TOPDIR)/include/buildrules PKG_NAME = @pkg_name@
PKG_USER = @pkg_user@
PKG_GROUP = @pkg_group@
PKG_RELEASE = @pkg_release@
PKG_VERSION = @pkg_version@
PKG_PLATFORM = @pkg_platform@
PKG_DISTRIBUTION= @pkg_distribution@
# General package information CC = @cc@
PKG_NAME = @pkg_name@ AWK = @awk@
PKG_RELEASE = @pkg_release@ SED = @sed@
PKG_VERSION = @pkg_version@ TAR = @tar@
PKG_DISTRIBUTION = @pkg_distribution@ ZIP = @zip@
PKG_BUILDER = @pkg_builder@ MAKE = @make@
PKG_BIN_DIR = @pkg_bin_dir@ ECHO = @echo@
PKG_LIB_DIR = @pkg_lib_dir@ SORT = @sort@
PKG_SBIN_DIR = @pkg_sbin_dir@ LN_S = @LN_S@
PKG_SLIB_DIR = @pkg_slib_dir@ LIBTOOL = @LIBTOOL@
PKG_INC_DIR = @pkg_inc_dir@ MAKEDEPEND = @makedepend@
PKG_MAN_DIR = @pkg_man_dir@
PKG_DOC_DIR = @pkg_doc_dir@
# LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in MSGFMT = @msgfmt@
# user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES) MSGMERGE = @msgmerge@
# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
# during the "dist" phase (packaging).
CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall $(LCFLAGS) \ RPM = @rpm@
-I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' -D_GNU_SOURCE \ RPMBUILD = @rpmbuild@
-D_FILE_OFFSET_BITS=64 RPM_VERSION = @rpm_version@
LDFLAGS = $(LLDFLAGS) ENABLE_SHARED = @enable_shared@
LDLIBS = $(LLDLIBS) $(MALLOCLIB) ENABLE_DBM = @enable_dbm@
MAKEOPTS = --no-print-directory ifeq ($(PKG_PLATFORM),linux)
SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES) PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
DIRT = $(LDIRT) dep dep.bak $(OBJECTS) $(CMDTARGET) $(LIBTARGET) \ endif
$(STATICLIBTARGET) *.[1-9].gz ifeq ($(PKG_PLATFORM),darwin)
PCFLAGS = -traditional-cpp
endif
OBJECTS = $(ASFILES:.s=.o) \ CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -I$(TOPDIR)/include \
$(CFILES:.c=.o) \ -DVERSION=\"$(PKG_VERSION)\"
$(LFILES:.l=.o) \
$(YFILES:%.y=%.tab.o)
MAKE = @make@ # Global, Platform, Local CFLAGS
CC = @cc@ CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
LD = @ld@
AWK = @awk@
SED = @sed@
INSTALL = $(TOPDIR)/install-sh -o root -g root
ECHO = @echo@
LN_S = @LN_S@
CCF = $(CC) $(CFLAGS) include $(TOPDIR)/include/buildmacros
MAKEF = $(MAKE) $(MAKEOPTS)
CXXF = $(CXX) $(CXXFLAGS)
LDF = $(LD) $(LDFLAGS)
MAKEDEPEND = @makedepend@
ZIP = @zip@
TAR = @tar@
RPM = @rpm@
RPM_VERSION = @rpm_version@
HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
SHELL = /bin/sh
IMAGES_DIR = $(TOPDIR)/all-images
DIST_DIR = $(TOPDIR)/dist
SUBDIRS_MAKERULE = \
@for d in $(SUBDIRS) ""; do \
if test -d "$$d" -a ! -z "$$d"; then \
$(ECHO) === $$d ===; \
$(MAKEF) -C $$d $@ || exit $$?; \
fi; \
done
MAN_MAKERULE = \
@for f in *.[12345678] ""; do \
if test ! -z "$$f"; then \
$(ZIP) --best -c < $$f > $$f.gz; \
fi; \
done
INSTALL_MAN = \
@for d in $(MAN_PAGES); do \
first=true; \
for m in `$(AWK) '/^\.SH NAME/ {ok=1; next} ok {print; exit}' $$d \
| sed -e 's/,/ /g' -e 's/\\-.*//' -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
do \
[ -z "$$m" -o "$$m" = "\\" ] && continue; \
t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
if $$first; then \
if $(HAVE_ZIPPED_MANPAGES); then \
$(ZIP) --best -c $$d > $$d.gz; _sfx=.gz; \
fi; \
u=$$m.$(MAN_SECTION)$$_sfx; \
echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
$(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
else \
echo $(INSTALL) -S $$u $${t}$$_sfx; \
$(INSTALL) -S $$u $${t}$$_sfx; \
fi; \
first=false; \
done; \
done
DIST_MAKERULE = \
$(MAKEF) -C build dist
SOURCE_MAKERULE = \
@test -z "$$DIR" && DIR="."; \
for f in $(SRCFILES) ""; do \
if test ! -z "$$f"; then $(ECHO) $$DIR/$$f; fi;\
done; \
for d in `echo $(SUBDIRS)` ; do \
if test -d "$$d" -a ! -z "$$d"; then \
$(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
fi; \
done
endif endif
+181
View File
@@ -0,0 +1,181 @@
#
# Copyright (c) 2002-2003 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://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
#
BUILDRULES = $(TOPDIR)/include/buildrules
# LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
# user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
# during the "dist" phase (packaging).
LDFLAGS = $(LLDFLAGS)
LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB)
MAKEOPTS = --no-print-directory
SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
DEPDIRT = dep dep.bak
MANDIRT = *.[1-9].gz
PODIRT = *.tmpo *.mo
CDIRT = $(OBJECTS) $(LTOBJECTS) $(LTCOMMAND) $(LTLIBRARY)
DIRT = $(LDIRT) $(DEPDIRT) $(MANDIRT) $(PODIRT) $(CDIRT)
OBJECTS = $(ASFILES:.s=.o) \
$(CFILES:.c=.o) \
$(LFILES:.l=.o) \
$(YFILES:%.y=%.tab.o)
INSTALL = $(TOPDIR)/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
SHELL = /bin/sh
IMAGES_DIR = $(TOPDIR)/all-images
DIST_DIR = $(TOPDIR)/dist
CCF = $(CC) $(CFLAGS) $(CPPFLAGS)
MAKEF = $(MAKE) $(MAKEOPTS)
CXXF = $(CXX) $(CXXFLAGS)
# For libtool.
LIBNAME = $(basename $(LTLIBRARY))
LTOBJECTS = $(OBJECTS:.o=.lo)
LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
LTLINK = $(LIBTOOL) --mode=link $(CC)
LTEXEC = $(LIBTOOL) --mode=execute
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF) -D_REENTRANT -fno-strict-aliasing
ifeq ($(ENABLE_SHARED),yes)
LTLDFLAGS += -rpath $(PKG_LIB_DIR)
LTLDFLAGS += -version-info $(LTVERSION)
endif
ifeq ($(ENABLE_SHARED),yes)
INSTALL_LTLIB = \
cd $(TOPDIR)/$(LIBNAME)/.libs; \
../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
../$(INSTALL) -m 644 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
test "$(PKG_DISTRIBUTION)" = debian || \
../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR)
endif
# Libtool thinks the static and shared libs should be in the same dir, so
# make the static lib appear in the place we chose as rpath (using the two
# symlinks below).
# Other things want the shared libs to appear in /usr/lib, else they'll
# link with the static libs there. So, another symlink to get the .so into
# /usr/lib.
ifeq ($(ENABLE_SHARED),yes)
INSTALL_LTLIB_DEV = \
cd $(TOPDIR)/$(LIBNAME)/.libs; \
../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \
../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so
else
INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
endif
INSTALL_LTLIB_STATIC = \
cd $(TOPDIR)/$(LIBNAME)/.libs; \
../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR)
INSTALL_MAN = \
@for d in $(MAN_PAGES); do \
first=true; \
for m in `$(AWK) \
'/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
| $(SED) \
-e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
-e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
do \
[ -z "$$m" -o "$$m" = "\\" ] && continue; \
t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
if $$first; then \
if $(HAVE_ZIPPED_MANPAGES); then \
$(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \
fi; \
u=$$m.$(MAN_SECTION)$$_sfx; \
echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\
$(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
else \
echo $(INSTALL) -S $$u $${t}$$_sfx; \
$(INSTALL) -S $$u $${t}$$_sfx; \
fi; \
first=false; \
done; \
done
ifeq ($(ENABLE_GETTEXT),yes)
INSTALL_LINGUAS = \
@for l in $(LINGUAS) ""; do \
if test -f "$$l.mo" ; then \
ldir=$(PKG_LOCALE_DIR)/$$l/LC_MESSAGES; \
$(INSTALL) -m 755 -d $$ldir; \
$(INSTALL) -m 644 $$l.mo $$ldir/$(PKG_NAME).mo; \
fi; \
done
endif
SUBDIRS_MAKERULE = \
@for d in $(SUBDIRS) ""; do \
if test -d "$$d" -a ! -z "$$d"; then \
$(ECHO) === $$d ===; \
$(MAKEF) -C $$d $@ || exit $$?; \
fi; \
done
MAN_MAKERULE = \
@for f in *.[12345678] ""; do \
if test ! -z "$$f"; then \
$(ZIP) --best -c < $$f > $$f.gz; \
fi; \
done
DIST_MAKERULE = \
$(MAKEF) -C build dist
SOURCE_MAKERULE = \
@test -z "$$DIR" && DIR="."; \
for f in $(SRCFILES) ""; do \
if test ! -z "$$f"; then $(ECHO) $$DIR/$$f; fi;\
done; \
for d in `echo $(SUBDIRS)` ; do \
if test -d "$$d" -a ! -z "$$d"; then \
$(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
fi; \
done
+47 -29
View File
@@ -1,10 +1,10 @@
# #
# Copyright (c) 1999, 2001 Silicon Graphics, Inc. All Rights Reserved. # Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
# #
# This program is free software; you can redistribute it and/or modify it # 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 # under the terms of version 2 of the GNU General Public License as published
# by the Free Software Fondation. # by the Free Software Fondation.
# #
# This program is distributed in the hope that it would be useful, but WITHOUT # This program is distributed in the hope that it would be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. Further, any license provided herein, # FITNESS FOR A PARTICULAR PURPOSE. Further, any license provided herein,
@@ -15,7 +15,7 @@
# distributed without any warranty that the program is delivered free of the # distributed without any warranty that the program is delivered free of the
# rightful claim of any third person by way of infringement or the like. See # rightful claim of any third person by way of infringement or the like. See
# the GNU General Public License for more details. # the GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License along with # 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 # this program; if not, write the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston MA 02111-1307, USA. # Place - Suite 330, Boston MA 02111-1307, USA.
@@ -26,28 +26,9 @@ _BUILDRULES_INCLUDED_ = 1
include $(TOPDIR)/include/builddefs include $(TOPDIR)/include/builddefs
#
# Standard targets
#
ifdef CMDTARGET
$(CMDTARGET) : $(SUBDIRS) $(OBJECTS)
$(CCF) -o $(CMDTARGET) $(LDFLAGS) $(OBJECTS) $(LDLIBS)
$(CMDTARGET).static : $(SUBDIRS) $(OBJECTS)
$(CCF) -static -o $(CMDTARGET).static $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif
ifdef LIBTARGET
$(LIBTARGET) : $(SUBDIRS) $(OBJECTS)
$(CC) $(LDFLAGS) -fPIC -shared -Wl,-soname,$(LIBTARGET) -o $(LIBTARGET) $(OBJECTS) $(LDLIBS)
endif
ifdef STATICLIBTARGET
$(STATICLIBTARGET) : $(SUBDIRS) $(OBJECTS)
$(AR) crf $(STATICLIBTARGET) $?
endif
clean clobber : $(SUBDIRS) clean clobber : $(SUBDIRS)
rm -f $(DIRT) rm -f $(DIRT)
@rm -fr .libs
$(SUBDIRS_MAKERULE) $(SUBDIRS_MAKERULE)
# Never blow away subdirs # Never blow away subdirs
@@ -57,10 +38,41 @@ $(SUBDIRS):
$(SUBDIRS_MAKERULE) $(SUBDIRS_MAKERULE)
endif endif
#
# Standard targets
#
ifdef LTCOMMAND
$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
$(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif
ifdef LTLIBRARY
$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
$(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
%.lo: %.c
$(LTCOMPILE) -c $<
endif
ifdef LINGUAS
%.pot: $(XGETTEXTFILES)
xgettext --omit-header --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
%.po: $(PKG_NAME).pot
$(MSGMERGE) -o $@.tmpo $@ $<
@if ! diff $@.tmpo $@ >/dev/null; then \
echo "$@ is out of date, see $@.tmpo"; \
fi
%.mo: %.po
$(MSGFMT) -o $@ $<
endif
source : source :
$(SOURCE_MAKERULE) $(SOURCE_MAKERULE)
endif endif # _BUILDRULES_INCLUDED_
$(_FORCE): $(_FORCE):
@@ -68,10 +80,16 @@ $(_FORCE):
depend : $(CFILES) $(HFILES) depend : $(CFILES) $(HFILES)
$(SUBDIRS_MAKERULE) $(SUBDIRS_MAKERULE)
touch dep touch .dep
$(MAKEDEPEND) -fdep -- $(CFLAGS) -- $(CFILES) $(MAKEDEPEND) -f - -- $(CFLAGS) -- $(CFILES) | \
$(SED) -e 's,`pwd`,$(TOPDIR),g' \
-e 's, */[^ ]*,,g' \
-e '/^[^ ]*: *$$/d' \
-e '/^#.*/d' -e '/^ *$$/d' \
> .dep
test -s .dep || rm -f .dep
# Include dep, but only if it exists # Include dep, but only if it exists
ifeq ($(shell test -f dep && echo dep), dep) ifeq ($(shell test -f .dep && echo .dep), .dep)
include dep include .dep
endif endif
+65
View File
@@ -0,0 +1,65 @@
/*
* 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://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _DATAASCII_H_
#define _DATAASCII_H_
/***********************************************************************
* int dataasciigen(listofchars, buffer, size, offset)
*
* This function fills buffer with ascii characters.
* 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.
* This method allows more than one process to write to a location
* in a file without corrupting it for another process' point of view.
*
* The return value will be the number of character written in buffer
* (size).
*
***********************************************************************/
int dataasciigen(char *, char *, int, int);
/***********************************************************************
* int dataasciichk(listofchars, buffer, size, count, errmsg)
*
* This function checks the contents of a buffer produced by
* dataasciigen.
*
* return values:
* >= 0 : error at character count
* < 0 : no error
***********************************************************************/
int dataasciichk(char *, char *, int, int, char**);
#endif
+44
View File
@@ -0,0 +1,44 @@
#ifndef _DATABIN_H_
#define _DATABIN_H_
/*******************************************************************************
* NAME
* databingen - fill a buffer with a data pattern
*
* SYNOPSIS
* (void) databingen(mode, buffer, bsize, offset)
* int mode;
* char *buffer;
* int bsize;
* int offset;
*
* DESCRIPTION
* datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
* 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.
* They data modes to choose from, these are:
*
* 'a' - writes an alternating bit pattern (i.e. 0x5555555...)
*
* 'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...)
*
* 'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...);
*
* 'o' - writes all bits set (i.e. 0xffffffffffffff...)
*
* 'z' - writes all bits cleared (i.e. 0x000000000...);
*
* 'r' - writes random integers
*
* RETURN VALUE
* None
*
*******************************************************************************/
void databingen( int mode, unsigned char *buffer, int bsize, int offset );
void databinchedk( int mode, unsigned char *buffer, int bsize, int offset, char **errmsg);
#endif
+40
View File
@@ -0,0 +1,40 @@
/*
* 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://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
#ifndef _FILE_LOCK_H_
#define _FILE_LOCK_H_
extern char Fl_syscall_str[128];
int file_lock( int , int, char ** );
int record_lock( int , int , int , int , char ** );
#endif /* _FILE_LOCK_H_ */

Some files were not shown because too many files have changed in this diff Show More