* $Header$
*
* Copyright (C) 1987 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*
*/
static char *rcsid_qsupport_qc = "$Header$";
#endif lint
+#include <mit-copyright.h>
#include "query.h"
#include "sms_server.h"
#include <ctype.h>
##}
-/* setup_dfil: free any quota records associated with a filesystem
- * when it is deleted.
+/* setup_dfil: free any quota records and fsgroup info associated with
+ * a filesystem when it is deleted. Also adjust the allocation numbers.
*/
setup_dfil(q, argv, cl)
## where n.nfsphys_id = fs.phys_id and fs.filsys_id = @id
## repeat delete q where q.filsys_id = @id
+## repeat delete fsgroup where fsgroup.filsys_id = @id
+## repeat delete fsgroup where fsgroup.group_id = @id
return(SMS_SUCCESS);
##}
##}
-/* Sets the modtime on a machine record. The machine name is in argv[0].
- * This routine is different from the generic set_modtime in that the
- * name is uppercased first.
+/* Like set_modtime, but uppercases the name first.
*/
-set_mach_modtime(q, argv, cl)
+set_uppercase_modtime(q, argv, cl)
struct query *q;
char **argv;
client *cl;
##{
-## char *host, *entity;
+## char *name, *entity, *table;
## int who;
entity = cl->entity;
who = cl->users_id;
+ table = q->rtable;
+ name = argv[0];
- host = argv[0];
-## repeat replace m (modtime = "now", modby = @who, modwith = @entity)
-## where m.name = uppercase(@host)
+## replace table (modtime = "now", modby = who, modwith = entity)
+## where table.#name = uppercase(name)
return(SMS_SUCCESS);
##}
## repeat retrieve (flag = any(l.#name where l.#name = @login))
if (flag)
return(SMS_IN_USE);
-## repeat retrieve (flag = any(filesys.#name where filesys.#name = @login))
+## repeat retrieve (flag = any(filesys.#label where filesys.#label = @login))
if (flag)
return(SMS_IN_USE);
com_err(whoami, 0, "new login name OK");