Changeset 18850 for trunk/ippTools/src/pxadmin.c
- Timestamp:
- Aug 1, 2008, 9:05:29 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxadmin.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxadmin.c
r18777 r18850 128 128 psString dbName = psMetadataLookupStr(&status, config->modules->complete, "DBNAME"); 129 129 130 fprintf (stdout, "*** delete the tables from database %s? ***\n", dbName); 131 fprintf (stdout, "*** to delete the tables, answer YES, and give password ***\n"); 132 fprintf (stdout, "*** WARNING: this action is permanent ***\n\n"); 133 134 fprintf (stdout, "delete the tables (YES/[n]): "); 135 fgets (line, 128, stdin); 136 sscanf (line, "%s", answer); 130 fprintf(stdout, "*** delete the tables from database %s? ***\n", dbName); 131 fprintf(stdout, "*** to delete the tables, answer YES, and give password ***\n"); 132 fprintf(stdout, "*** WARNING: this action is permanent ***\n\n"); 133 134 fprintf(stdout, "delete the tables (YES/[n]): "); 135 if (!fgets(line, 128, stdin)) { 136 psError(PS_ERR_IO, true, "Unable to read response."); 137 return false; 138 } 139 sscanf(line, "%s", answer); 137 140 if (strcmp (answer, "YES")) { 138 141 psError(PS_ERR_UNKNOWN, true, "tables NOT deleleted"); … … 140 143 } 141 144 142 fprintf (stdout, "enter dbh connection password: "); 143 fgets (line, 128, stdin); 144 sscanf (line, "%s", answer); 145 fprintf(stdout, "enter dbh connection password: "); 146 if (!fgets(line, 128, stdin)) { 147 psError(PS_ERR_IO, true, "Unable to read response."); 148 return false; 149 } 150 sscanf(line, "%s", answer); 145 151 146 152 psString dbPassword = psMetadataLookupStr(&status, config->modules->complete, "DBPASSWORD");
Note:
See TracChangeset
for help on using the changeset viewer.
