X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/075fe5bb74596bf0ddeee144abf56abafe4ec011..cc3056a630c91797f58f89ec8fffe3a438f68ddc:/clients/moira/nfs.c diff --git a/clients/moira/nfs.c b/clients/moira/nfs.c index 52fe5c20..b7d252df 100644 --- a/clients/moira/nfs.c +++ b/clients/moira/nfs.c @@ -2,9 +2,9 @@ static char rcsid_module_c[] = "$Header$"; #endif lint -/* This is the file nfs.c for allmaint, the SMS client that allows - * a user to maintaint most important parts of the SMS database. - * It Contains: The nfs maintanance code. +/* This is the file nfs.c for the SMS Client, which allows a nieve + * user to quickly and easily maintain most parts of the SMS database. + * It Contains: All functions for manipulating NFS Physical directories. * * Created: 5/6/88 * By: Chris D. Peterson @@ -13,7 +13,7 @@ * $Author$ * $Header$ * - * Copyright 1987, 1988 by the Massachusetts Institute of Technology. + * Copyright 1988 by the Massachusetts Institute of Technology. * * For further information on copyright and distribution * see the file mit-copyright.h @@ -22,20 +22,20 @@ #include #include #include +#include #include #include "mit-copyright.h" -#include "allmaint.h" -#include "allmaint_funcs.h" +#include "defs.h" +#include "f_defs.h" #include "globals.h" -#include "infodefs.h" /* #include */ #define TYPE_NFS "NFS" #define DEFAULT_DIR "/mit" -#define DEFAULT_DEVICE "ra0a" +#define DEFAULT_DEVICE "/dev/ra1c" #define DEFAULT_STATUS DEFAULT_YES /* active. */ #define DEFAULT_ALLOC "0" #define DEFAULT_SIZE "0" @@ -178,8 +178,8 @@ char **argv; if ( (args[1] = GetDirName()) == NULL) return(DM_NORMAL); - if ( (stat = sms_query("get_nfsphys", 2, args, - StoreInfo, (char *) &elem)) != SMS_SUCCESS) + if ( (stat = do_sms_query("get_nfsphys", 2, args, + StoreInfo, (char *) &elem)) != SMS_SUCCESS) com_err(program_name, stat, " in ShowNFSServices."); free(args[1]); /* prevents memory leaks. */ @@ -213,8 +213,8 @@ int argc; if (!ValidName(args[0]) || !ValidName(args[1])) return(DM_NORMAL); - if ( (stat = sms_query("get_nfsphys", 2, args, - NullFunc, (char *) NULL)) == SMS_SUCCESS) + if ( (stat = do_sms_query("get_nfsphys", 2, args, + NullFunc, (char *) NULL)) == SMS_SUCCESS) Put_message("This service already exists."); if (stat != SMS_NO_MATCH) com_err(program_name, stat, " in get_nfsphys."); @@ -230,8 +230,8 @@ int argc; add_args = AskNFSInfo(info); - if ((stat = sms_query("add_nfsphys", CountArgs(add_args), add_args, - Scream, (char *) NULL)) != 0) + if ((stat = do_sms_query("add_nfsphys", CountArgs(add_args), add_args, + Scream, (char *) NULL)) != 0) com_err(program_name, stat, " in AdsNFSService"); FreeInfo(info); @@ -255,8 +255,8 @@ Bool junk; register int stat; args = AskNFSInfo(info); - if ((stat = sms_query("update_nfsphys", CountArgs(args), args, - Scream, (char *)NULL)) != SMS_SUCCESS) + if ((stat = do_sms_query("update_nfsphys", CountArgs(args), args, + Scream, (char *)NULL)) != SMS_SUCCESS) com_err(program_name, stat, (char *) NULL); } @@ -283,8 +283,8 @@ int argc; if ( (args[1] = GetDirName()) == NULL) return(DM_NORMAL); - if ( (stat = sms_query("get_nfsphys", 2, args, - StoreInfo, (char *) &elem)) != SMS_SUCCESS) { + if ( (stat = do_sms_query("get_nfsphys", 2, args, + StoreInfo, (char *) &elem)) != SMS_SUCCESS) { com_err(program_name, stat, " in UpdateNFSService."); return (DM_NORMAL); } @@ -342,11 +342,11 @@ Bool one_item; args[0] = info[NFS_NAME]; args[1] = info[NFS_DIR]; args[2] = NULL; - switch(stat = sms_query("get_filesys_by_nfsphys", CountArgs(args), - args, StoreInfo, &elem)) { + switch(stat = do_sms_query("get_filesys_by_nfsphys", CountArgs(args), + args, StoreInfo, (char *)&elem)) { case SMS_NO_MATCH: /* it is unused, delete it. */ - if ( (stat = sms_query("delete_nfsphys", 2, info, Scream, - (char *) NULL )) != SMS_SUCCESS) + if ( (stat = do_sms_query("delete_nfsphys", 2, info, Scream, + (char *) NULL )) != SMS_SUCCESS) com_err(program_name, stat, " in DeleteNFSService"); else Put_message("Physical Filesystem Deleted."); @@ -392,8 +392,8 @@ char **argv; if ( (args[1] = GetDirName()) == NULL) return(DM_NORMAL); - switch(stat = sms_query("get_nfsphys", 2, args, - StoreInfo, (char *) &elem)) { + switch(stat = do_sms_query("get_nfsphys", 2, args, + StoreInfo, (char *) &elem)) { case SMS_NO_MATCH: Put_message("This filsystem does not exist!"); return(DM_NORMAL); @@ -411,14 +411,3 @@ char **argv; FreeQueue(elem); return(DM_NORMAL); } - -/* - * Local Variables: - * mode: c - * c-indent-level: 4 - * c-continued-statement-offset: 4 - * c-brace-offset: -4 - * c-argdecl-indent: 4 - * c-label-offset: -4 - * End: - */