1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Remove vestigial 3DFS support code (re: f88f302c)

Support for the long-dead 3DFS userland versioning file system was
already removed from ksh93 (although I'd overlooked some minor
things), but libast still supported it. This removes that too.

src/lib/libast/include/fs3d.h,
src/lib/libast/man/fs3d.3,
src/lib/libast/misc/fs3d.c:
- Removed.

bin/package,
src/cmd/INIT/package.sh:
- Remove attempted use of removed vpath builtin.

src/cmd/ksh93/*:
- Remove minor 3dfs vestiges.

src/lib/lib{ast,cmd,coshell}/*:
- Remove code supporting 3dfs.
This commit is contained in:
Martijn Dekker 2020-07-17 04:26:17 +01:00
parent 2db9953ae0
commit fbc6cd4286
32 changed files with 83 additions and 683 deletions

View file

@ -30,7 +30,7 @@ __OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T)
HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \
ast_namval.h ast_windows.h \
ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \
ftwalk.h fts.h fs3d.h getopt.h glob.h hash.h hashkey.h hashpart.h \
ftwalk.h fts.h getopt.h glob.h hash.h hashkey.h hashpart.h \
ip6.h lc.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \
namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \
sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \
@ -54,7 +54,7 @@ HEADERSTD = dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h
$(ID) 5.4 :LIBRARY: README RELEASE \
LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \
find.3 fmt.3 fmtls.3 fs3d.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
find.3 fmt.3 fmtls.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \
int.3 ip6.3 magic.3 mem.3 mime.3 modecanon.3 optget.3 path.3 \
preroot.3 proc.3 re.3 regex.3 setenviron.3 sfdisc.3 sfio.3 \
sig.3 spawnveg.3 stak.3 stk.3 strcopy.3 strdup.3 strelapsed.3 \
@ -80,7 +80,7 @@ $(ID) 5.4 :LIBRARY: README RELEASE \
pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \
pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \
pathprog.c \
fs3d.c ftwalk.c ftwflags.c fts.c \
ftwalk.c ftwflags.c fts.c \
astintercept.c conformance.c getenv.c setenviron.c \
optget.c optjoin.c optesc.c optctx.c strsort.c struniq.c \
magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \

View file

@ -490,9 +490,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACK
done telldir.o generated
make getcwd.o
make misc/getcwd.c
make include/fs3d.h implicit
prev ast_fs.h implicit
done include/fs3d.h dontcare
make include/ast_dir.h implicit
prev std/dirent.h implicit
prev dir/dirlib.h implicit
@ -954,7 +951,6 @@ make pathcanon.o
make path/pathcanon.c
prev ast_api.h implicit
prev include/error.h implicit
prev include/fs3d.h implicit
prev include/ls.h implicit
prev include/ast.h implicit
done path/pathcanon.c
@ -1058,7 +1054,6 @@ exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} '
done FEATURE/preroot generated
exec - cmp 2>/dev/null -s FEATURE/preroot preroot.h || { rm -f preroot.h; silent test -d . || mkdir .; ${STDCP} FEATURE/preroot preroot.h; }
done preroot.h generated
prev include/fs3d.h implicit
prev include/ast.h implicit
done path/pathkey.c
meta pathkey.o %.c>%.o path/pathkey.c pathkey
@ -1214,15 +1209,6 @@ meta pathprog.o %.c>%.o path/pathprog.c pathprog
prev path/pathprog.c
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathprog.c
done pathprog.o generated
make fs3d.o
make misc/fs3d.c
prev include/fs3d.h implicit
prev include/ast.h implicit
done misc/fs3d.c
meta fs3d.o %.c>%.o misc/fs3d.c fs3d
prev misc/fs3d.c
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/fs3d.c
done fs3d.o generated
make ftwalk.o
make misc/ftwalk.c
make include/ftwalk.h implicit
@ -1251,7 +1237,6 @@ make fts.o
make misc/fts.c
prev include/fts.h implicit
prev include/ls.h implicit
prev include/fs3d.h implicit
prev include/error.h implicit
prev include/ast_dir.h implicit
prev include/ast.h implicit
@ -1291,7 +1276,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PAC
done getenv.o generated
make setenviron.o
make misc/setenviron.c
prev include/fs3d.h implicit
prev misc/intercepts.h implicit
done misc/setenviron.c
meta setenviron.o %.c>%.o misc/setenviron.c setenviron
@ -5532,7 +5516,6 @@ done conftab.h
prev include/ls.h implicit
prev include/proc.h implicit
prev include/regex.h implicit
prev include/fs3d.h implicit
prev include/error.h implicit
prev include/ast.h implicit
prev misc/univlib.h implicit
@ -6098,7 +6081,7 @@ prev obsolete/spawn.c
exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c obsolete/spawn.c
done spawn.o generated
exec - ${AR} rc libast.a state.o transition.o opendir.o readdir.o rewinddir.o seekdir.o telldir.o getcwd.o fastfind.o hashalloc.o hashdump.o hashfree.o hashlast.o hashlook.o hashscan.o hashsize.o hashview.o hashwalk.o memhash.o memsum.o strhash.o strkey.o strsum.o stracmp.o strnacmp.o ccmap.o ccmapid.o ccnative.o chresc.o chrtoi.o
exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o fs3d.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o
exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o
exec - ${AR} rc libast.a fmtuid.o fmtgid.o fmtsignal.o fmtscale.o fmttmx.o fmttv.o fmtversion.o strelapsed.o strperm.o struid.o strgid.o strtoip4.o strtoip6.o stack.o stk.o swapget.o swapmem.o swapop.o swapput.o sigdata.o sigcrit.o sigunblock.o procopen.o procclose.o procrun.o procfree.o tmdate.o tmequiv.o tmfix.o tmfmt.o tmform.o tmgoff.o tminit.o tmleap.o tmlex.o tmlocale.o tmmake.o tmpoff.o tmscan.o tmsleep.o tmtime.o tmtype.o tmweek.o tmword.o tmzone.o tmxdate.o tmxduration.o tmxfmt.o tmxgettime.o tmxleap.o tmxmake.o tmxscan.o tmxsettime.o tmxsleep.o tmxtime.o tmxtouch.o tvcmp.o tvgettime.o tvsettime.o tvsleep.o tvtouch.o cmdarg.o vecargs.o vecfile.o vecfree.o vecload.o vecstring.o univdata.o touch.o mnt.o debug.o memccpy.o memchr.o memcmp.o memcpy.o memdup.o memmove.o memset.o mkdir.o mkfifo.o mknod.o rmdir.o remove.o rename.o link.o unlink.o strdup.o strchr.o strrchr.o strstr.o strtod.o strtold.o strtol.o strtoll.o strtoul.o strtoull.o strton.o strtonll.o strntod.o strntold.o strnton.o
exec - ${AR} rc libast.a strntonll.o strntol.o strntoll.o strntoul.o strntoull.o strcasecmp.o strncasecmp.o strerror.o mktemp.o tmpnam.o fsync.o execlp.o execve.o execvp.o execvpe.o spawnveg.o vfork.o killpg.o hsearch.o tsearch.o getlogin.o putenv.o setenv.o unsetenv.o lstat.o statvfs.o eaccess.o gross.o omitted.o readlink.o symlink.o getpgrp.o setpgid.o setsid.o waitpid.o creat64.o fcntl.o open.o atexit.o getdents.o getwd.o dup2.o errno.o getpreroot.o ispreroot.o realopen.o setpreroot.o getgroups.o mount.o system.o iblocks.o modedata.o tmdata.o memfatal.o sfkeyprintf.o sfdcdio.o sfdcdos.o sfdcfilter.o sfdcseekable.o sfdcslow.o sfdcsubstr.o sfdctee.o sfdcunion.o sfdcmore.o sfdcprefix.o wc.o wc2utf8.o basename.o closelog.o dirname.o fmtmsglib.o fnmatch.o ftw.o getdate.o getsubopt.o glob.o nftw.o openlog.o re_comp.o resolvepath.o realpath.o regcmp.o regexp.o setlogmask.o strftime.o strptime.o swab.o syslog.o tempnam.o wordexp.o mktime.o regalloc.o regclass.o regcoll.o regcomp.o regcache.o regdecomp.o regerror.o regexec.o regfatal.o reginit.o
exec - ${AR} rc libast.a regnexec.o regsubcomp.o regsubexec.o regsub.o regrecord.o regrexec.o regstat.o dtclose.o dtdisc.o dthash.o dtlist.o dtmethod.o dtopen.o dtstrhash.o dttree.o dtview.o dtwalk.o dtnew.o dtcomp.o sfclose.o sfclrlock.o sfdisc.o sfdlen.o sfexcept.o sfgetl.o sfgetu.o sfcvt.o sfecvt.o sffcvt.o sfextern.o sffilbuf.o sfflsbuf.o sfprints.o sfgetd.o sfgetr.o sfllen.o sfmode.o sfmove.o sfnew.o sfpkrd.o sfnotify.o sfnputc.o sfopen.o sfpeek.o sfpoll.o sfpool.o sfpopen.o sfprintf.o sfputd.o sfputl.o sfputr.o sfputu.o sfrd.o sfread.o sfreserve.o sfscanf.o sfseek.o sfset.o sfsetbuf.o sfsetfd.o sfsize.o sfsk.o sfstack.o sfstrtod.o sfsync.o sfswap.o sftable.o sftell.o sftmp.o sfungetc.o sfvprintf.o sfvscanf.o sfwr.o sfwrite.o sfpurge.o sfraise.o sfwalk.o sfgetm.o sfmutex.o sfputm.o sfresize.o _sfclrerr.o _sfeof.o _sferror.o _sffileno.o _sfopen.o _sfstacked.o _sfvalue.o _sfgetc.o _sfgetl.o _sfgetl2.o _sfgetu.o _sfgetu2.o _sfdlen.o _sfllen.o _sfslen.o _sfulen.o _sfputc.o _sfputd.o _sfputl.o _sfputm.o
@ -6180,11 +6163,6 @@ make man/fmtls.3
done man/fmtls.3
exec - test '' = 'man/fmtls.3' || ${STDCMP} 2>/dev/null -s man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3.old 2>/dev/null || true; ${STDCP} man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 ;}
done ${INSTALLROOT}/man/man3/fmtls.3 generated
make ${INSTALLROOT}/man/man3/fs3d.3
make man/fs3d.3
done man/fs3d.3
exec - test '' = 'man/fs3d.3' || ${STDCMP} 2>/dev/null -s man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3.old 2>/dev/null || true; ${STDCP} man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 ;}
done ${INSTALLROOT}/man/man3/fs3d.3 generated
make ${INSTALLROOT}/man/man3/ftwalk.3
make man/ftwalk.3
done man/ftwalk.3
@ -6580,14 +6558,6 @@ exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fts.h
exec - fi
done ${INSTALLROOT}/include/ast/fts.h generated
make ${INSTALLROOT}/include/ast/fs3d.h
prev include/fs3d.h
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/fs3d.h > 1.${COTEMP}.x
exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fs3d.h 1.${COTEMP}.x
exec - then rm -f 1.${COTEMP}.x
exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fs3d.h
exec - fi
done ${INSTALLROOT}/include/ast/fs3d.h generated
make ${INSTALLROOT}/include/ast/getopt.h
prev comp/getopt.h
exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/getopt.h > 1.${COTEMP}.x

View file

@ -523,7 +523,7 @@ do flags=F
done
case $name in
'') ;;
CONFORMANCE|FS_3D|HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE)
CONFORMANCE|HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE)
;;
*) values=
script=

View file

@ -132,17 +132,11 @@ __STDPP__directive pragma pp:nohide DIR closedir opendir readdir seekdir telldir
int dd_size; /* valid data in block */ \
char* dd_buf; /* directory block */
#ifdef _BLD_3d
#define DIR DIRDIR
#endif
#undef _DIRENT_H
#include "dirstd.h"
#ifndef _DIRENT_H
#define _DIRENT_H 1
#endif
#ifdef _BLD_3d
#undef DIR
#endif
#ifndef DIRBLKSIZ
#ifdef DIRBLK

View file

@ -45,8 +45,6 @@ struct dirent
char d_name[1]; /* entry name */
};
#ifndef _BLD_3d
#ifdef rewinddir
#undef rewinddir
#define rewinddir(p) seekdir(p,0L)
@ -59,5 +57,3 @@ extern void seekdir(DIR*, long);
extern long telldir(DIR*);
#endif
#endif

View file

@ -1,117 +0,0 @@
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* http://www.eclipse.org/org/documents/epl-v10.html *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* 3d fs interface definitions
*/
#ifndef _FS3D_H
#define _FS3D_H
#include <ast_fs.h>
#if _int_st_spare1
#define iview(p) ((p)->st_spare1)
#define IVIEW(p,v) ((p)->st_spare1=(v))
#else
#if _ary_st_spare4
#define iview(p) ((p)->st_spare4[0])
#define IVIEW(p,v) ((p)->st_spare4[0]=(v))
#else
#if _ary_st_extra
#define iview(p) ((p)->st_extra[0])
#define IVIEW(p,v) ((p)->st_extra[0]=(v))
#else
#if _ary_st_pad4
#define iview(p) ((p)->st_pad4[0])
#define IVIEW(p,v) ((p)->st_pad4[0]=(v))
#else
#if _mem_st_rdev_stat
#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev)
#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0)
#else
#define iview(p) 0
#define IVIEW(p,v)
#endif
#endif
#endif
#endif
#endif
/*
* special options
*/
#define FS3D_init "/#option/init"
#define FS3D_on "/#option/3d"
#define FS3D_off "/#option/2d"
/*
* fs3d(3) ops
*/
#define FS3D_OP(o,a) (((a)<<3)|(o))
#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */
#define FS3D_OFF FS3D_OP_OFF
#define FS3D_ON FS3D_OP_ON
#define FS3D_TEST FS3D_OP_TEST
#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n)
#define FS3D_op(x) ((x)&07)
#define FS3D_arg(x) (((x)>>3)&07777)
#define FS3D_OP_OFF 0
#define FS3D_OP_ON 1
#define FS3D_OP_TEST 2
#define FS3D_OP_LIMIT 3
#define FS3D_OP_INIT 7
/*
* mount(2) ops
*/
#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION)
#define FS3D_VIEW 002
#define FS3D_VERSION 004
#define FS3D_GET 010
#define FS3D_SIZE(n) ((n)<<4)
#define FS3D_SIZEOF(n) ((n)>>4)
#if !_BLD_3d
#define mount(s,t,f,d) fs3d_mount(s,t,f,d)
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int fs3d(int);
extern int fs3d_mount(const char*, char*, int, void*);
extern char* pathnext(char*, char*, long*);
#undef extern
#endif

View file

@ -119,17 +119,6 @@ astconf("UNIVERSE", 0, universe);
.EE
The settable configuration names are:
.TP
.L FS_3D
.L 1
if
.IR 3d (1)
viewpathing is enabled,
.L 0
otherwise.
This is an alternative to the
.IR fs3d (3)
interface.
.TP
.L PATH_RESOLVE
.L logical
if symbolic links are followed during file tree traversal,

View file

@ -1,92 +0,0 @@
.fp 5 CW
.de Af
.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2
.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
..
.de aF
.ie \\$3 .ft \\$1
.el \{\
.ds ;G \&
.nr ;G \\n(.f
.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
\\*(;G
.ft \\n(;G \}
..
.de L
.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.de LR
.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.de RL
.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.de EX \" start example
.ta 1i 2i 3i 4i 5i 6i
.PP
.RS
.PD 0
.ft 5
.nf
..
.de EE \" end example
.fi
.ft
.PD
.RE
.PP
..
.TH FS3D 3
.SH NAME
fs3d \- 3D (nDFS) on/off switch
.SH SYNOPSIS
.EX
#include <fs3d.h>
int fs3d(int \fIop\fP);
.EE
.SH DESCRIPTION
.L fs3d
controls and queries the
.B 3D
file system
.RB (aka nDFS )
enable state.
.L 0
is returned if the current process cannot mount
.B 3D
files.
.I op
may be one of:
.TP
.B FS3D_TEST
Returns
.L "FS3D_ON [1]"
if
.B 3D
is enabled,
.L "FS3D_OFF [0]"
otherwise.
.TP
.B FS3D_ON
Enables
.B 3D
and returns the previous
.L 3D
state (either
.B FS3D_ON
or
.BR FS3D_OFF ).
.TP
\fBFS3D_LIMIT(\fIlimit\fB)\fR
Sets the viewpath level limit to
.IR limit .
The previous limit is returned.
.TP
.B FS3D_INIT
Re-initialize the
.B 3D
tables.
Used for debugging.
.SH "SEE ALSO"
3D(1)

View file

@ -138,11 +138,7 @@ removed;
.L ..
moved to the front;
.L /..
preserved for super root hacks;
.L ...
resolved if
.IR fs3d (3)
is enabled.
preserved for super root hacks.
.I flags is the inclusive-or of:
.TP
.L PATH_DOTDOT
@ -388,4 +384,4 @@ may be
is used to avoid file conflicts but the generated path name is not created,
so you could lose in a race.
.SH "SEE ALSO"
3d(1), access(2), confstr(3), fs3d(3), lstat(2), stat(2)
access(2), confstr(3), lstat(2), stat(2)

View file

@ -145,7 +145,3 @@ The
.I ast
.IR directory (3)
routines do this.
.IR 3d (1)
viewpathing does
.I preroot
the right way.

View file

@ -1,116 +0,0 @@
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* http://www.eclipse.org/org/documents/epl-v10.html *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Bell Laboratories
*
* 3d fs operations
* only active for non-shared 3d library
*/
#define mount ______mount
#include <ast.h>
#undef mount
#include <fs3d.h>
int
fs3d(register int op)
{
register int cur;
register char* v;
char val[sizeof(FS3D_off) + 8];
static int fsview;
static char on[] = FS3D_on;
static char off[] = FS3D_off;
if (fsview < 0)
return 0;
/*
* get the current setting
*/
if (!fsview && (!getenv("LD_PRELOAD") || mount("", "", 0, NiL)))
goto nope;
if (FS3D_op(op) == FS3D_OP_INIT && mount(FS3D_init, NiL, FS3D_VIEW, NiL))
goto nope;
if (mount(on, val, FS3D_VIEW|FS3D_GET|FS3D_SIZE(sizeof(val)), NiL))
goto nope;
if (v = strchr(val, ' '))
v++;
else
v = val;
if (!strcmp(v, on))
cur = FS3D_ON;
else if (!strncmp(v, off, sizeof(off) - 1) && v[sizeof(off)] == '=')
cur = FS3D_LIMIT((int)strtol(v + sizeof(off) + 1, NiL, 0));
else
cur = FS3D_OFF;
if (cur != op)
{
switch (FS3D_op(op))
{
case FS3D_OP_OFF:
v = off;
break;
case FS3D_OP_ON:
v = on;
break;
case FS3D_OP_LIMIT:
sfsprintf(val, sizeof(val), "%s=%d", off, FS3D_arg(op));
v = val;
break;
default:
v = 0;
break;
}
if (v && mount(v, NiL, FS3D_VIEW, NiL))
goto nope;
}
fsview = 1;
return cur;
nope:
fsview = -1;
return 0;
}
/*
* user code that includes <fs3d.h> will have mount() mapped to fs3d_mount()
* this restricts the various "standard" mount prototype conflicts to this spot
* this means that code that includes <fs3d.h> cannot access the real mount
* (at least without some additional macro hackery
*/
#undef mount
extern int mount(const char*, char*, int, void*);
int
fs3d_mount(const char* source, char* target, int flags, void* data)
{
return mount(source, target, flags, data);
}

View file

@ -31,7 +31,6 @@
#include <ast.h>
#include <ast_dir.h>
#include <error.h>
#include <fs3d.h>
#include <ls.h>
struct Ftsent;
@ -65,7 +64,6 @@ typedef int (*Stat_f)(const char*, struct stat*);
int flags; /* fts_open() flags */ \
int nd; \
unsigned char children; \
unsigned char fs3d; \
unsigned char nostat; \
unsigned char state; /* fts_read() state */ \
char* base; /* basename in path */ \
@ -521,7 +519,7 @@ info(FTS* fts, register FTSENT* f, const char* path, struct stat* sp, int flags)
#endif
if (S_ISDIR(sp->st_mode))
{
if ((flags & FTS_NOSTAT) && !fts->fs3d)
if ((flags & FTS_NOSTAT))
{
f->fts_parent->nlink--;
#ifdef D_TYPE
@ -752,7 +750,6 @@ fts_open(char* const* pathnames, int flags, int (*comparf)(FTSENT* const*, FTSEN
fts->flags = flags;
fts->cd = (flags & FTS_NOCHDIR) ? 1 : -1;
fts->comparf = comparf;
fts->fs3d = fs3d(FS3D_TEST);
/*
* set up the path work buffer

View file

@ -79,7 +79,6 @@ getcwd(char* buf, size_t len)
#include <ast_dir.h>
#include <error.h>
#include <fs3d.h>
#ifndef ERANGE
#define ERANGE E2BIG
@ -184,18 +183,6 @@ getcwd(char* buf, size_t len)
};
if (buf && !len) ERROR(EINVAL);
if (fs3d(FS3D_TEST) && (namlen = mount(".", dots, FS3D_GET|FS3D_VIEW|FS3D_SIZE(sizeof(dots)), NiL)) > 1 && namlen < sizeof(dots))
{
p = dots;
easy:
namlen++;
if (buf)
{
if (len < namlen) ERROR(ERANGE);
}
else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM);
return (char*)memcpy(buf, p, namlen);
}
cur = &curst;
par = &parst;
if (stat(".", par)) ERROR(errno);
@ -209,7 +196,13 @@ getcwd(char* buf, size_t len)
if (cur->st_ino == par->st_ino && cur->st_dev == par->st_dev)
{
namlen = strlen(p);
goto easy;
namlen++;
if (buf)
{
if (len < namlen) ERROR(ERANGE);
}
else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM);
return (char*)memcpy(buf, p, namlen);
}
}
}

View file

@ -39,11 +39,7 @@ __STDPP__directive pragma pp:nohide getenv
*/
Intercepts_t intercepts
#if _BLD_3d
;
#else
= { 0 };
#endif
#if _UWIN && !defined(getenv)

View file

@ -23,8 +23,6 @@
#include "intercepts.h"
#include <fs3d.h>
/*
* put name=value in the environment
* pointer to value returned
@ -75,15 +73,6 @@ setenviron(const char* akey)
n = INCREMENT;
if (!p || (last - p + 1) < n)
{
if (!p && fs3d(FS3D_TEST))
{
/*
* kick 3d initialization
*/
close(open(".", O_RDONLY|O_cloexec));
v = environ;
}
if (!(p = newof(p, char*, n, 0)))
return 0;
last = p + n - 1;

View file

@ -30,13 +30,8 @@
* remove redundant .'s and /'s
* move ..'s to the front
* /.. preserved (for pdu and newcastle hacks)
* FS_3D handles ...
* if (flags&PATH_PHYSICAL) then symlinks resolved at each component
* if (flags&PATH_DOTDOT) then each .. checked for access
* if (flags&PATH_EXISTS) then path must exist at each component
* if (flags&PATH_VERIFIED(n)) then first n chars of path exist
*
* longer pathname possible if (flags&PATH_PHYSICAL) or FS_3D ... involved
* longer pathname possible if (flags&PATH_PHYSICAL) involved
* 0 returned on error and if (flags&(PATH_DOTDOT|PATH_EXISTS)) then path
* will contain the components following the failure point
*/
@ -45,7 +40,6 @@
#include <ast.h>
#include <ls.h>
#include <fs3d.h>
#include <error.h>
char*
@ -70,9 +64,6 @@ pathcanon_20100601(char* path, size_t size, int flags)
char* v;
int loop;
int oerrno;
#if defined(FS_3D)
long visits = 0;
#endif
oerrno = errno;
dots = loop = 0;
@ -129,31 +120,7 @@ pathcanon_20100601(char* path, size_t size, int flags)
else for (t -= 5; t > r && *(t - 1) != '/'; t--);
break;
case 3:
#if defined(FS_3D)
{
char* x;
char* o;
int c;
o = t;
if ((t -= 5) <= path) t = path + 1;
c = *t;
*t = 0;
if (x = pathnext(phys, s - (*s != 0), &visits))
{
r = path;
if (t == r + 1) x = r;
v = s = t = x;
}
else
{
*t = c;
t = o;
}
}
#else
r = t;
#endif
break;
default:
if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path)

View file

@ -31,25 +31,12 @@
#include <ast.h>
/*
* building 3d flirts with the dark side
*/
#if _BLD_3d
#undef pathcat
#define pathcat_20100601 _3d_pathcat
#else
char*
pathcat(char* path, const char* dirs, int sep, const char* a, const char* b)
{
return pathcat_20100601(dirs, sep, a, b, path, PATH_MAX);
}
#endif
#undef _AST_API
#include <ast_api.h>

View file

@ -36,7 +36,6 @@
#include <ast.h>
#include <ctype.h>
#include <fs3d.h>
#include <preroot.h>
#include <ls.h>
@ -105,13 +104,6 @@ pathkey_20100601(const char* lang, const char* tool, const char* apath, char* ke
}
}
/*
* 3D
*/
if (!flags && fs3d(FS3D_TEST) && (c = mount(path, tmp, FS3D_GET|FS3D_ALL|FS3D_SIZE(PATH_MAX), NiL)) > 1 && c < PATH_MAX)
path = tmp;
/*
* preroot
*/

View file

@ -32,7 +32,6 @@ static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2012-05-01 $\0\n";
#include <ast.h>
#include <error.h>
#include <fs3d.h>
#include <ctype.h>
#include <regex.h>
#include <proc.h>
@ -142,19 +141,7 @@ static Feature_t dynamic[] =
0,
OP_conformance
},
#define OP_fs_3d 2
{
&dynamic[OP_fs_3d+1],
"FS_3D",
&null[0],
"0",
0,
5,
CONF_AST,
0,
OP_fs_3d
},
#define OP_getconf 3
#define OP_getconf 2
{
&dynamic[OP_getconf+1],
"GETCONF",
@ -170,7 +157,7 @@ static Feature_t dynamic[] =
CONF_READONLY,
OP_getconf
},
#define OP_hosttype 4
#define OP_hosttype 3
{
&dynamic[OP_hosttype+1],
"HOSTTYPE",
@ -182,7 +169,7 @@ static Feature_t dynamic[] =
CONF_READONLY,
OP_hosttype
},
#define OP_libpath 5
#define OP_libpath 4
{
&dynamic[OP_libpath+1],
"LIBPATH",
@ -198,7 +185,7 @@ static Feature_t dynamic[] =
0,
OP_libpath
},
#define OP_libprefix 6
#define OP_libprefix 5
{
&dynamic[OP_libprefix+1],
"LIBPREFIX",
@ -214,7 +201,7 @@ static Feature_t dynamic[] =
0,
OP_libprefix
},
#define OP_libsuffix 7
#define OP_libsuffix 6
{
&dynamic[OP_libsuffix+1],
"LIBSUFFIX",
@ -230,7 +217,7 @@ static Feature_t dynamic[] =
0,
OP_libsuffix
},
#define OP_path_attributes 8
#define OP_path_attributes 7
{
&dynamic[OP_path_attributes+1],
"PATH_ATTRIBUTES",
@ -246,7 +233,7 @@ static Feature_t dynamic[] =
CONF_READONLY,
OP_path_attributes
},
#define OP_path_resolve 9
#define OP_path_resolve 8
{
&dynamic[OP_path_resolve+1],
"PATH_RESOLVE",
@ -258,7 +245,7 @@ static Feature_t dynamic[] =
0,
OP_path_resolve
},
#define OP_universe 10
#define OP_universe 9
{
0,
"UNIVERSE",
@ -522,7 +509,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const
ok = 1;
break;
case OP_path_resolve:
ok = fs3d(FS3D_TEST);
ok = 0;
break;
case OP_universe:
ok = streq(_UNIV_DEFAULT, DEFAULT(OP_universe));
@ -692,10 +679,6 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int
#endif
break;
case OP_fs_3d:
fp->value = fs3d(value ? value[0] ? FS3D_ON : FS3D_OFF : FS3D_TEST) ? "1" : null;
break;
case OP_hosttype:
break;