14887Schin 24887Schin /* : : generated by proto : : */ 34887Schin /*********************************************************************** 44887Schin * * 54887Schin * This software is part of the ast package * 6*12068SRoger.Faulkner@Oracle.COM * Copyright (c) 1985-2010 AT&T Intellectual Property * 74887Schin * and is licensed under the * 84887Schin * Common Public License, Version 1.0 * 98462SApril.Chin@Sun.COM * by AT&T Intellectual Property * 104887Schin * * 114887Schin * A copy of the License is available at * 124887Schin * http://www.opensource.org/licenses/cpl1.0.txt * 134887Schin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 144887Schin * * 154887Schin * Information and Software Systems Research * 164887Schin * AT&T Research * 174887Schin * Florham Park NJ * 184887Schin * * 194887Schin * Glenn Fowler <gsf@research.att.com> * 204887Schin * David Korn <dgk@research.att.com> * 214887Schin * Phong Vo <kpv@research.att.com> * 224887Schin * * 234887Schin ***********************************************************************/ 244887Schin 254887Schin /* 264887Schin * Glenn Fowler 274887Schin * AT&T Research 284887Schin * 294887Schin * 3d fs interface definitions 304887Schin */ 314887Schin 324887Schin #ifndef _FS3D_H 334887Schin #if !defined(__PROTO__) 344887Schin #include <prototyped.h> 354887Schin #endif 364887Schin #if !defined(__LINKAGE__) 374887Schin #define __LINKAGE__ /* 2004-08-11 transition */ 384887Schin #endif 394887Schin 404887Schin #define _FS3D_H 414887Schin 424887Schin #include <ast_fs.h> 434887Schin 444887Schin #if _int_st_spare1 454887Schin #define iview(p) ((p)->st_spare1) 464887Schin #define IVIEW(p,v) ((p)->st_spare1=(v)) 474887Schin #else 484887Schin #if _ary_st_spare4 494887Schin #define iview(p) ((p)->st_spare4[0]) 504887Schin #define IVIEW(p,v) ((p)->st_spare4[0]=(v)) 514887Schin #else 524887Schin #if _ary_st_pad4 534887Schin #define iview(p) ((p)->st_pad4[0]) 544887Schin #define IVIEW(p,v) ((p)->st_pad4[0]=(v)) 554887Schin #else 564887Schin #if _mem_st_rdev_stat 574887Schin #define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev) 584887Schin #define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0) 594887Schin #else 604887Schin #define iview(p) 0 614887Schin #define IVIEW(p,v) 624887Schin #endif 634887Schin #endif 644887Schin #endif 654887Schin #endif 664887Schin 674887Schin /* 684887Schin * special options 694887Schin */ 704887Schin 714887Schin #define FS3D_init "/#option/init" 724887Schin #define FS3D_on "/#option/3d" 734887Schin #define FS3D_off "/#option/2d" 744887Schin 754887Schin /* 764887Schin * fs3d(3) ops 774887Schin */ 784887Schin 794887Schin #define FS3D_OP(o,a) (((a)<<3)|(o)) 804887Schin 814887Schin #define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */ 824887Schin #define FS3D_OFF FS3D_OP_OFF 834887Schin #define FS3D_ON FS3D_OP_ON 844887Schin #define FS3D_TEST FS3D_OP_TEST 854887Schin #define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n) 864887Schin 874887Schin #define FS3D_op(x) ((x)&07) 884887Schin #define FS3D_arg(x) (((x)>>3)&07777) 894887Schin 904887Schin #define FS3D_OP_OFF 0 914887Schin #define FS3D_OP_ON 1 924887Schin #define FS3D_OP_TEST 2 934887Schin #define FS3D_OP_LIMIT 3 944887Schin #define FS3D_OP_INIT 7 954887Schin 964887Schin /* 974887Schin * mount(2) ops 984887Schin */ 994887Schin 1004887Schin #define FS3D_ALL (FS3D_VIEW|FS3D_VERSION) 1014887Schin #define FS3D_VIEW 002 1024887Schin #define FS3D_VERSION 004 1034887Schin #define FS3D_GET 010 1044887Schin #define FS3D_SIZE(n) ((n)<<4) 1054887Schin #define FS3D_SIZEOF(n) ((n)>>4) 1064887Schin 10710898Sroland.mainz@nrubsig.org #if !_BLD_3d 10810898Sroland.mainz@nrubsig.org #define mount(s,t,f,d) fs3d_mount(s,t,f,d) 10910898Sroland.mainz@nrubsig.org #endif 1104887Schin 1114887Schin #if _BLD_ast && defined(__EXPORT__) 1124887Schin #undef __MANGLE__ 1134887Schin #define __MANGLE__ __LINKAGE__ __EXPORT__ 1144887Schin #endif 1154887Schin 1164887Schin extern __MANGLE__ int fs3d __PROTO__((int)); 11710898Sroland.mainz@nrubsig.org extern __MANGLE__ int fs3d_mount __PROTO__((const char*, char*, int, __V_*)); 1184887Schin extern __MANGLE__ char* pathnext __PROTO__((char*, char*, long*)); 1194887Schin 1204887Schin #undef __MANGLE__ 1214887Schin #define __MANGLE__ __LINKAGE__ 1224887Schin 1234887Schin #endif 124