#include <stdio.h>
#include <strings.h>
#include <sms.h>
+#include <sms_app.h>
#include <menu.h>
#include "mit-copyright.h"
#include "defs.h"
#include "f_defs.h"
#include "globals.h"
-#include "infodefs.h"
static char * def_quota = NULL;
static char *val[] = {"def_quota", NULL};
if (override || (def_quota == NULL)) {
- if ( (status = sms_query("get_value", CountArgs(val),
- val, StoreInfo, (char *) &top)) != SMS_SUCCESS) {
+ if ( (status = do_sms_query("get_value", CountArgs(val), val,
+ StoreInfo, (char *) &top)) != SMS_SUCCESS) {
com_err(program_name, status, " in ShowDefaultQuota");
if (def_quota == NULL) {
Put_message("No default Quota Found, setting default to 0.");
"change the default quota for all new users");
if(Confirm(temp_buf)) {
newval[1] = argv[1];
- if ( (status = sms_query("update_value", CountArgs(newval),
- newval, Scream, NULL)) == SMS_SUCCESS ) {
+ if ( (status = do_sms_query("update_value", CountArgs(newval),
+ newval, Scream, NULL)) == SMS_SUCCESS ) {
FreeAndClear(&def_quota, TRUE);
def_quota = Strsave(argv[1]);
}
if ( (args = GetQuotaArgs(FALSE) ) == NULL)
return(DM_NORMAL);
- if ( (status = sms_query("get_nfs_quota", CountArgs(args), args,
- StoreInfo, (char *) &top)) != SMS_SUCCESS)
+ if ( (status = do_sms_query("get_nfs_quota", CountArgs(args), args,
+ StoreInfo, (char *) &top)) != SMS_SUCCESS)
com_err(program_name, status, " in get_nfs_quota");
FreeInfo(args); /* done with args free them. */
if ( (args = GetQuotaArgs(TRUE) ) == NULL)
return(DM_NORMAL);
- if ( (status = sms_query("add_nfs_quota", CountArgs(args), args,
- Scream, (char *) NULL)) != SMS_SUCCESS)
+ if ( (status = do_sms_query("add_nfs_quota", CountArgs(args), args,
+ Scream, (char *) NULL)) != SMS_SUCCESS)
com_err(program_name, status, " in get_nfs_quota");
FreeInfo(args);
sprintf(temp_buf, "New quota for filesystem %s (in KB)", info[Q_FILESYS]);
GetValueFromUser(temp_buf, &info[Q_QUOTA]);
- if (status = sms_query("update_nfs_quota", 3, info,
- Scream, (char *) NULL) != SMS_SUCCESS) {
+ if (status = do_sms_query("update_nfs_quota", 3, info,
+ Scream, (char *) NULL) != SMS_SUCCESS) {
com_err(program_name, status, " in update_nfs_quota");
sprintf(temp_buf,"Could not perform quota change on %s",
info[Q_FILESYS]);
if ( (args = GetQuotaArgs(FALSE) ) == NULL)
return(DM_NORMAL);
- if ( (status = sms_query("get_nfs_quota", 2, args,
- StoreInfo, (char *) &top)) != SMS_SUCCESS)
+ if ( (status = do_sms_query("get_nfs_quota", 2, args,
+ StoreInfo, (char *) &top)) != SMS_SUCCESS)
com_err(program_name, status, " in get_nfs_quota");
FreeInfo(args); /* done with args, free them. */
info[Q_LOGIN], info[Q_FILESYS]);
if (!one_item || Confirm(temp_buf)) {
- if ( (status = sms_query("delete_nfs_quota", 2, info,
- Scream, (char *) NULL)) != SMS_SUCCESS)
+ if ( (status = do_sms_query("delete_nfs_quota", 2, info,
+ Scream, (char *) NULL)) != SMS_SUCCESS)
com_err(program_name, status, " in delete_nfs_quota");
else
Put_message("Quota sucessfully removed.");
if ( (args = GetQuotaArgs(FALSE) ) == NULL)
return(DM_NORMAL);
- if ( (status = sms_query("get_nfs_quota", 2, args,
- StoreInfo, (char *) &top)) != SMS_SUCCESS)
+ if ( (status = do_sms_query("get_nfs_quota", 2, args,
+ StoreInfo, (char *) &top)) != SMS_SUCCESS)
com_err(program_name, status, " in get_nfs_quota");
FreeInfo(args);