1da2e3ebdSchin 2da2e3ebdSchin /* : : generated by proto : : */ 3da2e3ebdSchin /*********************************************************************** 4da2e3ebdSchin * * 5da2e3ebdSchin * This software is part of the ast package * 6*3e14f97fSRoger A. Faulkner * Copyright (c) 1985-2010 AT&T Intellectual Property * 7da2e3ebdSchin * and is licensed under the * 8da2e3ebdSchin * Common Public License, Version 1.0 * 97c2fbfb3SApril Chin * by AT&T Intellectual Property * 10da2e3ebdSchin * * 11da2e3ebdSchin * A copy of the License is available at * 12da2e3ebdSchin * http://www.opensource.org/licenses/cpl1.0.txt * 13da2e3ebdSchin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 14da2e3ebdSchin * * 15da2e3ebdSchin * Information and Software Systems Research * 16da2e3ebdSchin * AT&T Research * 17da2e3ebdSchin * Florham Park NJ * 18da2e3ebdSchin * * 19da2e3ebdSchin * Glenn Fowler <gsf@research.att.com> * 20da2e3ebdSchin * David Korn <dgk@research.att.com> * 21da2e3ebdSchin * Phong Vo <kpv@research.att.com> * 22da2e3ebdSchin * * 23da2e3ebdSchin ***********************************************************************/ 24da2e3ebdSchin 25da2e3ebdSchin /* 26da2e3ebdSchin * Glenn Fowler 27da2e3ebdSchin * AT&T Research 28da2e3ebdSchin * 29da2e3ebdSchin * 3d fs interface definitions 30da2e3ebdSchin */ 31da2e3ebdSchin 32da2e3ebdSchin #ifndef _FS3D_H 33da2e3ebdSchin #if !defined(__PROTO__) 34da2e3ebdSchin #include <prototyped.h> 35da2e3ebdSchin #endif 36da2e3ebdSchin #if !defined(__LINKAGE__) 37da2e3ebdSchin #define __LINKAGE__ /* 2004-08-11 transition */ 38da2e3ebdSchin #endif 39da2e3ebdSchin 40da2e3ebdSchin #define _FS3D_H 41da2e3ebdSchin 42da2e3ebdSchin #include <ast_fs.h> 43da2e3ebdSchin 44da2e3ebdSchin #if _int_st_spare1 45da2e3ebdSchin #define iview(p) ((p)->st_spare1) 46da2e3ebdSchin #define IVIEW(p,v) ((p)->st_spare1=(v)) 47da2e3ebdSchin #else 48da2e3ebdSchin #if _ary_st_spare4 49da2e3ebdSchin #define iview(p) ((p)->st_spare4[0]) 50da2e3ebdSchin #define IVIEW(p,v) ((p)->st_spare4[0]=(v)) 51da2e3ebdSchin #else 52da2e3ebdSchin #if _ary_st_pad4 53da2e3ebdSchin #define iview(p) ((p)->st_pad4[0]) 54da2e3ebdSchin #define IVIEW(p,v) ((p)->st_pad4[0]=(v)) 55da2e3ebdSchin #else 56da2e3ebdSchin #if _mem_st_rdev_stat 57da2e3ebdSchin #define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev) 58da2e3ebdSchin #define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0) 59da2e3ebdSchin #else 60da2e3ebdSchin #define iview(p) 0 61da2e3ebdSchin #define IVIEW(p,v) 62da2e3ebdSchin #endif 63da2e3ebdSchin #endif 64da2e3ebdSchin #endif 65da2e3ebdSchin #endif 66da2e3ebdSchin 67da2e3ebdSchin /* 68da2e3ebdSchin * special options 69da2e3ebdSchin */ 70da2e3ebdSchin 71da2e3ebdSchin #define FS3D_init "/#option/init" 72da2e3ebdSchin #define FS3D_on "/#option/3d" 73da2e3ebdSchin #define FS3D_off "/#option/2d" 74da2e3ebdSchin 75da2e3ebdSchin /* 76da2e3ebdSchin * fs3d(3) ops 77da2e3ebdSchin */ 78da2e3ebdSchin 79da2e3ebdSchin #define FS3D_OP(o,a) (((a)<<3)|(o)) 80da2e3ebdSchin 81da2e3ebdSchin #define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */ 82da2e3ebdSchin #define FS3D_OFF FS3D_OP_OFF 83da2e3ebdSchin #define FS3D_ON FS3D_OP_ON 84da2e3ebdSchin #define FS3D_TEST FS3D_OP_TEST 85da2e3ebdSchin #define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n) 86da2e3ebdSchin 87da2e3ebdSchin #define FS3D_op(x) ((x)&07) 88da2e3ebdSchin #define FS3D_arg(x) (((x)>>3)&07777) 89da2e3ebdSchin 90da2e3ebdSchin #define FS3D_OP_OFF 0 91da2e3ebdSchin #define FS3D_OP_ON 1 92da2e3ebdSchin #define FS3D_OP_TEST 2 93da2e3ebdSchin #define FS3D_OP_LIMIT 3 94da2e3ebdSchin #define FS3D_OP_INIT 7 95da2e3ebdSchin 96da2e3ebdSchin /* 97da2e3ebdSchin * mount(2) ops 98da2e3ebdSchin */ 99da2e3ebdSchin 100da2e3ebdSchin #define FS3D_ALL (FS3D_VIEW|FS3D_VERSION) 101da2e3ebdSchin #define FS3D_VIEW 002 102da2e3ebdSchin #define FS3D_VERSION 004 103da2e3ebdSchin #define FS3D_GET 010 104da2e3ebdSchin #define FS3D_SIZE(n) ((n)<<4) 105da2e3ebdSchin #define FS3D_SIZEOF(n) ((n)>>4) 106da2e3ebdSchin 10734f9b3eeSRoland Mainz #if !_BLD_3d 10834f9b3eeSRoland Mainz #define mount(s,t,f,d) fs3d_mount(s,t,f,d) 10934f9b3eeSRoland Mainz #endif 110da2e3ebdSchin 111da2e3ebdSchin #if _BLD_ast && defined(__EXPORT__) 112da2e3ebdSchin #undef __MANGLE__ 113da2e3ebdSchin #define __MANGLE__ __LINKAGE__ __EXPORT__ 114da2e3ebdSchin #endif 115da2e3ebdSchin 116da2e3ebdSchin extern __MANGLE__ int fs3d __PROTO__((int)); 11734f9b3eeSRoland Mainz extern __MANGLE__ int fs3d_mount __PROTO__((const char*, char*, int, __V_*)); 118da2e3ebdSchin extern __MANGLE__ char* pathnext __PROTO__((char*, char*, long*)); 119da2e3ebdSchin 120da2e3ebdSchin #undef __MANGLE__ 121da2e3ebdSchin #define __MANGLE__ __LINKAGE__ 122da2e3ebdSchin 123da2e3ebdSchin #endif 124