diff src/getidblock.c @ 149:f9773b6368e0

improve documentation of .pst format. remove decrypt option from getidblock - we always decrypt.
author Carl Byington <carl@five-ten-sg.com>
date Sat, 28 Feb 2009 11:55:48 -0800
parents 0695de3b5a98
children 06aa84023b48
line wrap: on
line diff
--- a/src/getidblock.c	Thu Feb 26 12:42:37 2009 -0800
+++ b/src/getidblock.c	Sat Feb 28 11:55:48 2009 -0800
@@ -1,7 +1,7 @@
 
 #include "define.h"
 
-int decrypt = 0, process = 0, binary = 0;
+int process = 0, binary = 0;
 pst_file pstfile;
 
 
@@ -12,7 +12,6 @@
     printf("\tfilename - name of the file to access\n");
     printf("\tid - ID of the block to fetch (0 to fetch all) - can begin with 0x for hex\n");
     printf("\toptions\n");
-    printf("\t\t-d\tDecrypt the block before printing\n");
     printf("\t\t-p\tProcess the block before finishing.\n");
     printf("\t\t\tView the debug log for information\n");
 }
@@ -27,15 +26,10 @@
 
     DEBUG_MAIN(("\n\n\nLooking at block index1 id %#"PRIx64"\n", id));
 
-    if ((readSize = pst_ff_getIDblock(&pstfile, id, &buf)) <= 0 || buf == 0) {
+    if ((readSize = pst_ff_getIDblock_dec(&pstfile, id, &buf)) <= 0 || buf == 0) {
         DIE(("Error loading block\n"));
     }
 
-    if (decrypt)
-        if (pst_decrypt(id, buf, readSize, (int) pstfile.encryption) != 0) {
-            DIE(("Error decrypting block\n"));
-        }
-
     DEBUG_MAIN(("Printing block id %#"PRIx64", size %#"PRIx64"\n", id, (uint64_t)readSize));
     if (binary) {
         if (fwrite(buf, 1, readSize, stdout) != 0) {
@@ -98,10 +92,6 @@
                 // enable binary output
                 binary = 1;
                 break;
-            case 'd':
-                //enable decrypt
-                decrypt = 1;
-                break;
             case 'p':
                 // enable procesing of block
                 process = 1;