From 8aa828ce32369e8725e63713f9c0e5f57a5ce10e Mon Sep 17 00:00:00 2001 From: zacheiss Date: Tue, 8 May 2001 03:09:39 +0000 Subject: [PATCH] Support filesystem aliases. --- gen/www.pc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gen/www.pc b/gen/www.pc index 0844929a..737e8486 100644 --- a/gen/www.pc +++ b/gen/www.pc @@ -151,6 +151,7 @@ void filsys(FILE *out) EXEC SQL BEGIN DECLARE SECTION; char label[FILESYS_LABEL_SIZE], path[FILESYS_NAME_SIZE]; char type[FILESYS_TYPE_SIZE], key[FSGROUP_KEY_SIZE]; + char alias[ALIAS_NAME_SIZE]; int status, fid; EXEC SQL END DECLARE SECTION; @@ -183,9 +184,26 @@ void filsys(FILE *out) EXEC SQL CLOSE group_cursor; } + EXEC SQL DECLARE alias_cursor CURSOR FOR + SELECT name INTO :alias FROM alias + WHERE type='FILESYS' AND trans=:label; + if (!*strtrim(path)) continue; fprintf(out, "%s:%s\n", label, path); + + EXEC SQL OPEN alias_cursor; + while (1) + { + EXEC SQL FETCH alias_cursor INTO :alias; + if (sqlca.sqlcode) + break; + + if (!*strtrim(alias)) + continue; + fprintf(out, "%s:%s\n", alias, path); + } + EXEC SQL CLOSE alias_cursor; } EXEC SQL CLOSE filsys_cursor; -- 2.45.2