Changeset a08bfc3
- Timestamp:
- Mar 17, 2010, 10:36:59 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 4133e34
- Parents:
- 356465e
- git-author:
- Nelson Elhage <nelhage@mit.edu> (04/13/09 20:35:44)
- git-committer:
- Nelson Elhage <nelhage@ksplice.com> (03/17/10 22:36:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zcrypt.c
r356465e ra08bfc3 190 190 if (!zoptions.message) 191 191 { 192 printf("Memory allocation error.\n");192 fprintf(stderr, "Memory allocation error.\n"); 193 193 error = TRUE; 194 194 } … … 210 210 if (error || fname == NULL) 211 211 { 212 printf("Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", argv[0]);213 printf(" [-advqtluon] [-s signature] [-f arg] [-m message]\n");214 printf(" One or more of class, instance, and keyfile must be specified.\n");212 fprintf(stderr, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", argv[0]); 213 fprintf(stderr, " [-advqtluon] [-s signature] [-f arg] [-m message]\n"); 214 fprintf(stderr, " One or more of class, instance, and keyfile must be specified.\n"); 215 215 } 216 216 else … … 230 230 } 231 231 */ 232 printf("Feature not yet implemented.\n");232 fprintf(stderr, "Feature not yet implemented.\n"); 233 233 } 234 234 else if (mode == M_SETKEY) … … 250 250 fkey = fopen(fname, "w"); 251 251 if (!fkey) 252 printf("Could not open key file for writing: %s\n", fname);252 fprintf(stderr, "Could not open key file for writing: %s\n", fname); 253 253 else 254 254 { 255 255 if (fputs(newkey, fkey) != strlen(newkey) || putc('\n', fkey) != '\n') 256 256 { 257 printf("Error writing to key file.\n");257 fprintf(stderr, "Error writing to key file.\n"); 258 258 fclose(fkey); 259 259 } … … 261 261 { 262 262 fclose(fkey); 263 printf("Key update complete.\n");263 fprintf(stderr, "Key update complete.\n"); 264 264 } 265 265 } … … 270 270 FILE *fkey = fopen(fname, "r"); 271 271 if (!fkey) 272 printf("Could not open key file: %s\n", fname);272 fprintf(stderr, "Could not open key file: %s\n", fname); 273 273 else 274 274 { … … 394 394 if (keyfile == NULL) 395 395 { 396 printf("Could not find key table entry.\n");396 fprintf(stderr, "Could not find key table entry.\n"); 397 397 } 398 398 else … … 404 404 strcpy(keyfile, temp); 405 405 else 406 printf("Memory allocation error.\n");406 fprintf(stderr, "Memory allocation error.\n"); 407 407 } 408 408 … … 410 410 } 411 411 else 412 printf("Could not open key table file: %s\n", filename);412 fprintf(stderr, "Could not open key table file: %s\n", filename); 413 413 414 414 for(i = 0; i < MAX_SEARCH; i++) { … … 485 485 close(fildes[0]); 486 486 execvp(argv[0], argv); 487 printf("Exec error: could not run zwrite\n");487 fprintf(stderr, "Exec error: could not run zwrite\n"); 488 488 exit(0); 489 489 } … … 564 564 if ((inptr = inbuff = (char *)malloc(MAX_RESULT)) == NULL) 565 565 { 566 printf("Memory allocation error\n");566 fprintf(stderr, "Memory allocation error\n"); 567 567 return FALSE; 568 568 } … … 594 594 if (!outfile) 595 595 { 596 printf("Could not run zwrite\n");596 fprintf(stderr, "Could not run zwrite\n"); 597 597 if (freein && inbuff) 598 598 free(inbuff);
Note: See TracChangeset
for help on using the changeset viewer.