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:
parent
2db9953ae0
commit
fbc6cd4286
32 changed files with 83 additions and 683 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,11 +39,7 @@ __STDPP__directive pragma pp:nohide getenv
|
|||
*/
|
||||
|
||||
Intercepts_t intercepts
|
||||
#if _BLD_3d
|
||||
;
|
||||
#else
|
||||
= { 0 };
|
||||
#endif
|
||||
|
||||
#if _UWIN && !defined(getenv)
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue