static char rcsid_module_c[] = "$Header$";
#endif lint
-/* This is the file cluseter.c for allmaint, the SMS client that allows
- * a user to maintaint most important parts of the SMS database.
+/* This is the file cluster.c for the SMS Client, which allows a nieve
+ * user to quickly and easily maintain most parts of the SMS database.
* It Contains:
*
* Created: 4/22/88
* By: Chris D. Peterson
- * Based upon: Clusermaint.c by marcus: 87/07/22
*
* $Source$
* $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
#include <menu.h>
#include "mit-copyright.h"
-#include "allmaint.h"
-#include "allmaint_funcs.h"
+#include "defs.h"
+#include "f_defs.h"
#include "globals.h"
#include "infodefs.h"
Put_message("");
sprintf(buf, "Machine: %-30s Type: %s", info[M_NAME], info[M_TYPE]);
Put_message(buf);
- sprintf(buf, "Last Modified at %s, by %s with %s",info[M_MODTIME],
- info[M_MODBY], info[M_MODWITH]);
+ sprintf(buf, MOD_FORMAT, info[M_MODBY], info[M_MODTIME], info[M_MODWITH]);
Put_message(buf);
return(info[M_NAME]);
}
Put_message(buf);
sprintf(buf, "Location: %s", info[C_LOCATION]);
Put_message(buf);
- sprintf(buf, "Last Modified at %s, by %s with %s",info[C_MODTIME],
- info[C_MODBY], info[C_MODWITH]);
+ sprintf(buf, MOD_FORMAT, info[C_MODBY], info[C_MODTIME], info[C_MODWITH]);
Put_message(buf);
return(info[C_NAME]);
}
switch (type) {
case MACHINE:
if ( (stat = sms_query("get_machine", 1, &name1,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, " in get_machine.");
return(NULL);
}
break;
case CLUSTER:
if ( (stat = sms_query("get_cluster", 1, &name1,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, " in get_cluster.");
return(NULL);
}
args[MAP_MACHINE] = name1;
args[MAP_CLUSTER] = name2;
if ( (stat = sms_query("get_machine_to_cluster_map", 2, args,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, " in get_machine_to_cluster_map.");
return(NULL);
}
args[CD_NAME] = name1;
args[CD_LABEL] = name2;
if ( (stat = sms_query("get_cluster_data", 2, args,
- StoreInfo, &elem)) != 0) {
+ StoreInfo, (char *)&elem)) != 0) {
com_err(program_name, stat, " in get_cluster_data.");
return(NULL);
}
args[0] = name;
args[1] = "*";
stat = sms_query("get_machine_to_cluster_map", 2, args,
- StoreInfo, &elem);
+ StoreInfo, (char *)&elem);
if (stat && stat != SMS_NO_MATCH) {
com_err(program_name, stat, " in get_machine_to_cluster_map.");
return(DM_NORMAL);
args[MAP_END] = NULL;
stat = sms_query("get_machine_to_cluster_map", CountArgs(args), args,
- StoreInfo, &elem);
+ StoreInfo, (char *)&elem);
if (stat == SMS_NO_MATCH) {
sprintf(buf, "The machine %s is not is the cluster %s.",
args[MAP_MACHINE], args[MAP_CLUSTER]);
Put_message(buf);
return(DM_NORMAL);
}
- if (stat)
+ if (stat != SMS_SUCCESS)
com_err(program_name, stat, " in delete_machine_from_cluster");
elem = QueueTop(elem);
args[MAP_MACHINE] = "*";
args[MAP_CLUSTER] = name;
stat = sms_query("get_machine_to_cluster_map", 2, args,
- StoreInfo, &elem);
+ StoreInfo, (char *)&elem);
if (stat && stat != SMS_NO_MATCH) {
com_err(program_name, stat, " in get_machine_to_cluster_map.");
return(DM_NORMAL);
return(DM_NORMAL);
}
-/* Function Name: MachinesInCluster
- * Description: Shows all machines in a give cluster.
- * Arguments: argv, argc - name of cluster in argv[1].
- * Returns: DM_NORMAL;
- */
-
-/* ARGSUSED */
-int
-MachinesInCluster(argc, argv)
-int argc;
-char **argv;
-{
- char *info[10];
- info[0] = argv[0];
- info[2] = argv[1];
- info[1] = "*";
- return(MachineToClusterMap(3, info));
-}
-
/*
* Local Variables:
* mode: c