From: David Howells Date: Fri, 10 Jan 2014 00:13:10 +0000 (+0000) Subject: xg: Clean up Arla xg files X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=43243ed8daaf7b1419bfa378793975189875a8fe;p=users%2Fdhowells%2Fkafs-utils.git xg: Clean up Arla xg files Clean up Arla xg files to remove CVS-isms and Arla-specific bits. Signed-off-by: David Howells --- diff --git a/rpc-api/afsuuid.h b/rpc-api/afsuuid.h index 8344b7f..1d78fc8 100644 --- a/rpc-api/afsuuid.h +++ b/rpc-api/afsuuid.h @@ -2,22 +2,22 @@ * Copyright (c) 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -34,8 +34,6 @@ %#ifndef _AFSUUID_COMMON_ %#define _AFSUUID_COMMON_ -/* $Id: afsuuid.h,v 1.2 2004/08/27 11:14:44 lha Exp $ */ - #ifndef AFSUUID_GENERATE #define AFSUUID_GENERATE __attribute__((__nogenerate__)) #endif diff --git a/rpc-api/bos.xg b/rpc-api/bos.xg index d2ee7c6..179b788 100644 --- a/rpc-api/bos.xg +++ b/rpc-api/bos.xg @@ -1,25 +1,27 @@ -/* This is -*-c-*- */ - -/* +/* -*- c -*- + * + * Interface to the BOS server. + * + * * Copyright (c) 1999 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,18 +35,9 @@ * SUCH DAMAGE. */ -/* $Id: bos.xg,v 1.9 2004/08/27 11:14:44 lha Exp $ */ - -/* - * Interface to BOS server - */ - package BOZO_ -%#include - -error-function conv_to_arla_errno - +/* Error codes */ const BZNOTACTIVE = 39424; const BZNOENT = 39425; const BZBUSY = 39426; @@ -59,10 +52,6 @@ const BZBADTYPE = 39434; const BOZO_BSSIZE = 256; -/* - * - */ - const BSTAT_SHUTDOWN = 0; const BSTAT_NORMAL = 1; const BSTAT_SHUTTINGDOWN = 2; @@ -98,16 +87,6 @@ const KTIME_NOW = 0x20; const BOZO_RESTARTTIME_GENERAL = 0x1; /* general reboot time */ const BOZO_RESTARTTIME_NEWBIN = 0x2; /* new binary */ -#if 0 -const GETSTATUS_FSRUN = "file server running"; -const GETSTATUS_RSRUNVOLDOWN = "file server running; volser down"; -const GETSTATUS_SALVAGE = "salvaging file system"; -const GETSTATUS_FSSTART = "starting file server"; -const GETSTATUS_FSDOWN = "file server shutting down"; -const GETSTATUS_SALVAGERDOWN = "salvager shutting down"; -const GETSTATUS_FSSTOP = "salvager shut down"; -#endif - struct bozo_status { long goal; long fileGoal; @@ -140,21 +119,6 @@ struct bozo_keyInfo { long spare2; }; -#if 0 -struct bnode_ops { - struct bnode *(*create)(); - long (*timeout)(); - long (*getstat)(); - long (*setstat)(); - long (*delete)(); - long (*procexit)(); - long (*getstring)(); - long (*getparm)(); - long (*restartp)(); - long (*hascore)(); -}; -#endif - CreateBnode (IN string type, IN string instance, @@ -182,7 +146,7 @@ EnumerateInstance (IN long instance, GetInstanceInfo (IN string instance, OUT string type, OUT struct bozo_status *status) = 85; - + GetInstanceParm (IN string instance, IN long num, OUT string parm) = 86; @@ -264,4 +228,3 @@ GetInstanceStrings (IN string instance, OUT string spare1, OUT string spare2, OUT string spare3) = 114; - diff --git a/rpc-api/cb.xg b/rpc-api/cb.xg index 2bfb737..f965817 100644 --- a/rpc-api/cb.xg +++ b/rpc-api/cb.xg @@ -1,25 +1,27 @@ -/* This is -*-c-*- */ - -/* +/* -*- c -*- + * + * Interface to the Cache Manager + * + * * Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,21 +35,8 @@ * SUCH DAMAGE. */ -/* - * Interface to CM - */ - package RXAFSCB_ -%#include -%#include - -error-function conv_to_arla_errno - -/* - * Interface - */ - #include "common.h" struct AFSDBLockDesc { diff --git a/rpc-api/common.h b/rpc-api/common.h index cd9396b..6c163b9 100644 --- a/rpc-api/common.h +++ b/rpc-api/common.h @@ -1,23 +1,25 @@ -/* +/* Common definition used by several *.xg files + * + * * Copyright (c) 1995 - 2004 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -31,12 +33,6 @@ * SUCH DAMAGE. */ -/* - * Common definition used by several *.xg files - */ - -/* $Id: common.h,v 1.22 2005/10/20 19:41:16 lha Exp $ */ - %#ifndef _COMMON_ %#define _COMMON_ diff --git a/rpc-api/fs.xg b/rpc-api/fs.xg index 9d85585..42f2bae 100644 --- a/rpc-api/fs.xg +++ b/rpc-api/fs.xg @@ -1,25 +1,27 @@ -/* This is -*-c-*- */ - -/* +/* -*- c -*- + * + * Interface to the File Server. + * + * * Copyright (c) 1995 - 2002, 2004 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,18 +35,8 @@ * SUCH DAMAGE. */ -/* $Id: fs.xg,v 1.21 2004/12/19 20:00:59 lha Exp $ */ - -/* - * Interface to FS - */ - package RXAFS_ -%#include - -error-function conv_to_arla_errno - #define AFSUUID_GENERATE #include "common.h" @@ -180,14 +172,14 @@ BulkStatus (IN AFSCBFids *FidsArray, OUT AFSCBs *CBArray, OUT AFSVolSync *Sync) = 155; -SetLock (IN AFSFid *Fid, - IN ViceLockType Type, +SetLock (IN AFSFid *Fid, + IN ViceLockType Type, OUT AFSVolSync *Sync) = 156; -ExtendLock (IN AFSFid *Fid, +ExtendLock (IN AFSFid *Fid, OUT AFSVolSync *Sync) = 157; -ReleaseLock (IN AFSFid *Fid, +ReleaseLock (IN AFSFid *Fid, OUT AFSVolSync *Sync) = 158; FlushCPS (IN ViceIds *IdsArray, @@ -196,19 +188,19 @@ FlushCPS (IN ViceIds *IdsArray, OUT int32_t *spare2, OUT int32_t *spare3) = 162; -FetchData64 (IN AFSFid *Fid, - IN int64_t Pos, - IN int64_t Length, - OUT AFSFetchStatus *OutStatus, - OUT AFSCallBack *CallBack, +FetchData64 (IN AFSFid *Fid, + IN int64_t Pos, + IN int64_t Length, + OUT AFSFetchStatus *OutStatus, + OUT AFSCallBack *CallBack, OUT AFSVolSync *Sync) split = 65537; -StoreData64 (IN AFSFid *Fid, - IN AFSStoreStatus *InStatus, - IN uint64_t Pos, - IN uint64_t Length, - IN uint64_t FileLength, - OUT AFSFetchStatus *OutStatus, +StoreData64 (IN AFSFid *Fid, + IN AFSStoreStatus *InStatus, + IN uint64_t Pos, + IN uint64_t Length, + IN uint64_t FileLength, + OUT AFSFetchStatus *OutStatus, OUT AFSVolSync *Sync) split = 65538; GiveUpAllCallBacks () = 65539 ; diff --git a/rpc-api/ka.xg b/rpc-api/ka.xg index 671f2aa..32adf05 100644 --- a/rpc-api/ka.xg +++ b/rpc-api/ka.xg @@ -1,25 +1,27 @@ -/* This is -*-c-*- */ - -/* +/* -*- c -*- + * + * Interface to the Authentication Server (KA). + * + * * Copyright (c) 1999 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,11 +35,6 @@ * SUCH DAMAGE. */ - -/* - * Interface to KAS - */ - const AUTHENTICATE_OLD = 1; const CHANGEPASSWORD = 2; const GETTICKET_OLD = 3; @@ -83,8 +80,7 @@ const KADEBUGKCINFOSIZE = 25; #define Date uint32_t -/* Errors */ - +/* Error codes */ const KADATABASEINCONSISTENT = 180480; const KAEXIST = 180481; const KAIO = 180482; @@ -233,4 +229,3 @@ GetTicket (IN int32_t kvno, IN kaname instance, IN struct ka_CBS *atimes, INOUT struct ka_BBS *oanswer) = 23; - diff --git a/rpc-api/pts.xg b/rpc-api/pts.xg index 579d7b1..762f725 100644 --- a/rpc-api/pts.xg +++ b/rpc-api/pts.xg @@ -1,25 +1,27 @@ -/* This is -*-c-*- */ - -/* +/* -*- c -*- + * + * Interface to the Protection Server. + * + * * Copyright (c) 1998 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,23 +35,10 @@ * SUCH DAMAGE. */ -/* - * Interface to PTS - */ - package PR_ -%#include - -error-function conv_to_arla_errno - -/* - * Interface - */ - /* Opcodes */ - const PRINEWUSER = 500; const PRWHEREISIT = 501; const PRDUMPENTRY = 502; @@ -236,7 +225,6 @@ typedef long prlist; /* Error codes */ - const PREXIST = 267264 ; const PRIDEXIST = 267265 ; const PRNOIDS = 267266 ; diff --git a/rpc-api/ubik.xg b/rpc-api/ubik.xg index 20725fc..a326045 100644 --- a/rpc-api/ubik.xg +++ b/rpc-api/ubik.xg @@ -1,25 +1,25 @@ -/* -*- C -*- */ - -/* +/* -*- c -*- + * + * * Copyright (c) 1998 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,21 +33,8 @@ * SUCH DAMAGE. */ - -/* - * $Id: ubik.xg,v 1.11 2004/08/27 11:14:45 lha Exp $ - */ - package Ubik_ -%#include - -error-function conv_to_arla_errno - -/* - * Interface - */ - struct net_tid { long epoch; long counter; @@ -101,14 +88,12 @@ struct ubik_sdebug { /* Opcodes */ - const VOTE_BEACON = 10000; const VOTE_DEBUG = 10001; const VOTE_SDEBUG = 10002; const VOTE_GETSYNCSITE = 10003; /* Error codes */ - const UNOQUORUM = 5376; const UNOTSYNC = 5377; const UNHOSTS = 5378; @@ -148,9 +133,9 @@ const UREINITIALIZE = 5411; /* The rpc calls */ -Beacon (IN long state, - IN long voteStart, - IN net_version *Version, +Beacon (IN long state, + IN long voteStart, + IN net_version *Version, IN net_tid *tid) multi = VOTE_BEACON; Debug (OUT ubik_debug *db) = VOTE_DEBUG; diff --git a/rpc-api/vldb.xg b/rpc-api/vldb.xg index 033e483..a51ba82 100644 --- a/rpc-api/vldb.xg +++ b/rpc-api/vldb.xg @@ -1,25 +1,27 @@ -/* This is -*-c-*- */ - -/* +/* -*-c-*- + * + * Interface to the Volume Location Database Server. + * + * * Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,17 +35,8 @@ * SUCH DAMAGE. */ -/* - * Interface to VLDB - */ - package VL_ -%#include -%#include - -error-function conv_to_arla_errno - #include "common.h" /* @@ -103,7 +96,7 @@ const VLF_BOEXISTS = 0x4000; const VLF_BACKEXISTS = 0x4000; const VLF_DFSFILESET = 0x8000; -/* VL error interface */ +/* Error codes */ const VL_IDEXIST = 363520; const VL_IO = 363521; const VL_NAMEEXIST = 363522; @@ -138,10 +131,7 @@ const VL_MULTIPADDR = 363550; const VL_BADMASK = 363551; -/* - * Opcodes - */ - +/* Opcodes */ const VLCREATEENTRY = 501; const VLDELETEENTRY = 502; const VLGETENTRYBYID = 503; @@ -216,37 +206,6 @@ struct nvldbentry { long spares9; }; -struct vlentry { - u_long volumeId[MAXTYPES]; - long flags; - long LockAfsId; - long LockTimestamp; - long cloneId; - long AssociatedChain; - long nextIdHash[MAXTYPES]; - long nextNameHash; - long spares1[2]; - char name[VLDB_MAXNAMELEN]; - u_char volumeType; - u_char serverNumber[MAXNSERVERS]; - u_char serverPartition[MAXNSERVERS]; - u_char serverFlags[MAXNSERVERS]; - u_char RefCount; - char spares2[1]; -}; - -/* disk_vlentry is arla specific */ - -struct disk_vlentry { - u_long volumeId[MAXTYPES]; - long flags; - long cloneId; - string name<>; - long serverNumber<>; - long serverPartition<>; - long serverFlags<>; -}; - struct vital_vlheader { long vldbversion; long headersize; @@ -258,18 +217,6 @@ struct vital_vlheader { long totalEntries[MAXTYPES]; }; -typedef long longarray[MAXTYPES]; - -struct vlheader { - struct vital_vlheader vital_header; - u_long IpMappedAddr[MAXSERVERID]; - long VolnameHash[HASHSIZE]; -/* long VolidHashRW[HASHSIZE]; - long VolidHashRO[HASHSIZE]; - long VolidHashBACK[HASHSIZE];*/ - longarray VolidHash[HASHSIZE]; -}; - const VLUPDATE_VOLUMENAME = 0x1; const VLUPDATE_FLAGS = 0x4; @@ -367,7 +314,7 @@ typedef uvldbentry ubulkentries<>; typedef int32_t bulkaddrs; -/* +/* * Bits for ListAddrByAttributes.Mask * Note, IPADDR/INDEX/UUID are mutually exclusive */ @@ -488,7 +435,7 @@ UpdateEntryByName (IN string volname, IN VldbUpdateEntry *UpdateEntry, IN long ReleaseType) = VLUPDATEENTRYBYNAME; -#ifdef not_implemented_yet +#if 0 CreateEntryU(IN uvldbentry *newentry) = VLCREATEENTRYU; GetEntryByIDU() = VLGETENTRYBYIDU; @@ -540,7 +487,7 @@ struct VL_ListAddrUUID { afs_int32 error; opaque data; }; - + typedef VL_ListAddrUUID VL_ListAddrUUIDs<>; const VL_UUID_data_INVALID = 1; @@ -558,12 +505,12 @@ struct VL_UUID_data_gss_name { /* * `uuid' is the uuid we query information the diffrent types are in - * `query'. - * + * `query'. + * * For each `query'-item there can be one or more items in `reply'. * The reply items have `reply<>.type' set to the same type as in the * query. The are always sorted in the same order as the `query'. - * + * * If the `query' type isn't supported a `reply<>' is sent back with * `reply<>.error' set. * diff --git a/rpc-api/volumeserver.xg b/rpc-api/volumeserver.xg index 5065725..4dced90 100644 --- a/rpc-api/volumeserver.xg +++ b/rpc-api/volumeserver.xg @@ -1,25 +1,29 @@ -/* This is -*-c-*- */ - -/* +/* -*- c -*- + * + * Interface to Volume Server. + * + * reference /afs/nada.kth.se/misc/reference/programming/afs/shadow/ + * + * * Copyright (c) 1997 - 2004 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -33,19 +37,8 @@ * SUCH DAMAGE. */ -/* - * Interface to Volumeserver, - * reference /afs/nada.kth.se/misc/reference/programming/afs/shadow/ - * - * $Id: volumeserver.xg,v 1.27 2004/08/27 11:14:45 lha Exp $ - */ - package VOLSER_ -%#include - -error-function conv_to_arla_errno - const VLDB_MAXSERVER = 80; const VOLSERVICE_PORT = 7005; const VOLSERVICE_ID = 4; @@ -55,6 +48,7 @@ const VOLSER_OLDMAXVOLNAME = 32; const VOLSER_MAX_REPSITES = 7; const VNAMESIZE = 32; +/* Opcodes */ const VOLCREATEVOLUME = 100; const VOLDELETEVOLUME = 101; const VOLRESTORE = 102; @@ -89,6 +83,7 @@ const PARTVALID = 0x01; const VOK = 0x02; const VBUSY = 110; +/* Error codes */ const VOLSERTRELE_ERROR = 1492325120; const VOLSERNO_OP = 1492325121; const VOLSERREAD_DUMPERROR = 1492325122; @@ -122,26 +117,6 @@ const VTDeleteOnSalvage = 1; const VTOutOfService = 2; const VTDeleted = 4; -#if 0 -struct volser_trans { - volser_trans *next; - long tid; - long time; - long creationTime; - long returnCode; - long volid; - long partition; - long dumpTransId; - long dumpSeq; /* Not used */ - short refCount; - short iflags; - char vflags; - char tflags; - char incremental; - char lastProcName[30]; -/* struct rx_call *rxCallPtr; XXXXXXX BROKEN /lha */ -}; -#endif struct volDescription { char volName[VOLSER_MAXVOLNAME]; long volId; @@ -284,7 +259,7 @@ struct restoreCookie { long clone; long parent; }; - + typedef transDebugInfo transDebugEntries<>; typedef volintInfo volEntries<>; typedef xvolintInfo xvolEntries<>; @@ -374,7 +349,7 @@ AFSVolSetDate(IN long tid, AFSVolListPartitions(OUT struct pIDs *partIDs) = VOLLISTPARTITIONS; -AFSVolPartitionInfo(IN string name<>, +AFSVolPartitionInfo(IN string name<>, OUT struct diskPartition *partition) = VOLPARTITIONINFO; AFSVolListVolumes(IN long partID, @@ -390,7 +365,7 @@ AFSVolGetNthVolume(IN long index, OUT long *partition) = VOLGETNTHVOLUME; AFSVolMonitor(OUT transDebugEntries *result) = VOLMONITOR; - + AFSVolXListVolumes(IN long partID, IN long flags, OUT struct xvolEntries *resultEntries) = VOLXLISTVOLUMES;