]> andersk Git - moira.git/commitdiff
Laura Baldwin memorial "don't break hesiod" patch.
authorzacheiss <zacheiss>
Tue, 30 Sep 2008 18:42:42 +0000 (18:42 +0000)
committerzacheiss <zacheiss>
Tue, 30 Sep 2008 18:42:42 +0000 (18:42 +0000)
server/mr_server.h
server/qsetup.pc
server/queries2.c

index 0563098071862c3caee97852483b3f4ff2f8159d..de7306798536ac057f4f3438bba4c4d2a2caa7ad 100644 (file)
@@ -254,6 +254,7 @@ int setup_dpsv(struct query *q, char *argv[], client *cl);
 int setup_dcon(struct query *q, char *argv[], client *cl);
 int setup_acon(struct query *q, char *argv[], client *cl);
 int setup_scli(struct query *q, char *argv[], client *cl);
+int setup_aali(struct query *q, char *argv[], client *cl);
 
 /* prototypes from qsupport.pc */
 int set_pobox(struct query *q, char *argv[], client *cl);
index 8c52a8c0364cc2709ebf4d0c873f4b558f8d7ab6..4bea49e85c135ec588a5e49943c9d38db550533a 100644 (file)
@@ -1579,6 +1579,27 @@ int hostinfo_check(char *info, int num)
     return 1;
 }
 
+int setup_aali(struct query *q, char *argv[], client *cl)
+{
+  EXEC SQL BEGIN DECLARE SECTION;
+  int cnt;
+  char *name, *type, *trans;
+  EXEC SQL END DECLARE SECTION;
+  name = argv[0];
+  type = argv[1];
+  trans = argv[2];
+
+  if (strcmp(strtrim(type), "FILESYS"))
+    return MR_SUCCESS;
+
+  EXEC SQL SELECT count(label) INTO :cnt FROM filesys WHERE
+    label = :trans;
+  if (cnt > 0)
+    return MR_EXISTS;
+
+  return MR_SUCCESS;
+}
+
 int setup_acon(struct query *q, char *argv[], client *cl)
 {
   EXEC SQL BEGIN DECLARE SECTION;
index 35306c5ed8dd9389927d96bd6e8be7019868662f..10436cbd9cf7ea05e9065a39236282b3b77012f8 100644 (file)
@@ -3565,7 +3565,7 @@ static struct validate aali_validate = {
   3,
   0,
   0,
-  0,
+  setup_aali,
   0,
 };
 
This page took 0.053489 seconds and 5 git commands to generate.