Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1575376
 поиск   регистрация   авторизация 
 
Группа :: Система/Настройка/Оборудование
Пакет: testdisk

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: testdisk-6.4.patch


--- testdisk-6.4/src/ntfs_fix.org.c	2006-04-30 13:53:50.000000000 +0200
+++ testdisk-6.4/src/ntfs_fix.c	2006-06-22 21:59:55.000000000 +0200
@@ -68,44 +68,44 @@
   int i, ret = -1; /* failure */
   BOOL done;
 
-  ntfs_log_info("\nProcessing $MFT and $MFTMirr...\n");
+  ecrit_rapport("\nProcessing $MFT and $MFTMirr...\n");
 
   /* Load data from $MFT and $MFTMirr and compare the contents. */
   m = (u8*)malloc(vol->mftmirr_size << vol->mft_record_size_bits);
   if (!m) {
-    ntfs_log_perror("Failed to allocate memory");
+    ecrit_rapport("Failed to allocate memory");
     return -1;
   }
   m2 = (u8*)malloc(vol->mftmirr_size << vol->mft_record_size_bits);
   if (!m2) {
-    ntfs_log_perror("Failed to allocate memory");
+    ecrit_rapport("Failed to allocate memory");
     free(m);
     return -1;
   }
 
-  ntfs_log_info("Reading $MFT... ");
+  ecrit_rapport("Reading $MFT... ");
   l = ntfs_attr_mst_pread(vol->mft_na, 0, vol->mftmirr_size,
       vol->mft_record_size, m);
   if (l != vol->mftmirr_size) {
-    ntfs_log_info(FAILED);
+    ecrit_rapport(FAILED);
     if (l != -1)
       errno = EIO;
-    ntfs_log_perror("Failed to read $MFT");
+    ecrit_rapport("Failed to read $MFT");
     goto error_exit;
   }
-  ntfs_log_info(OK);
+  ecrit_rapport(OK);
 
-  ntfs_log_info("Reading $MFTMirr... ");
+  ecrit_rapport("Reading $MFTMirr... ");
   l = ntfs_attr_mst_pread(vol->mftmirr_na, 0, vol->mftmirr_size,
       vol->mft_record_size, m2);
   if (l != vol->mftmirr_size) {
-    ntfs_log_info(FAILED);
+    ecrit_rapport(FAILED);
     if (l != -1)
       errno = EIO;
-    ntfs_log_perror("Failed to read $MFTMirr");
+    ecrit_rapport("Failed to read $MFTMirr");
     goto error_exit;
   }
-  ntfs_log_info(OK);
+  ecrit_rapport(OK);
 
   /*
    * FIXME: Need to actually check the $MFTMirr for being real. Otherwise
@@ -119,7 +119,7 @@
    * MD disk and if yes then bomb out right at the start of the program?
    */
 
-  ntfs_log_info("Comparing $MFTMirr to $MFT... ");
+  ecrit_rapport("Comparing $MFTMirr to $MFT... ");
   done = FALSE;
   for (i = 0; i < vol->mftmirr_size; ++i) {
     const char *ESTR[12] = { "$MFT", "$MFTMirr", "$LogFile",
@@ -135,22 +135,22 @@
       s = "mft record";
 
     if (ntfs_is_baad_recordp(m + i * vol->mft_record_size)) {
-      ntfs_log_info("FAILED");
-      ntfs_log_error("$MFT error: Incomplete multi sector "
+      ecrit_rapport("FAILED");
+      ecrit_rapport("$MFT error: Incomplete multi sector "
 	  "transfer detected in %s.\nCannot "
 	  "handle this yet. )-:\n", s);
       goto error_exit;
     }
     if (!ntfs_is_mft_recordp(m + i * vol->mft_record_size)) {
-      ntfs_log_info("FAILED");
-      ntfs_log_error("$MFT error: Invalid mft record for "
+      ecrit_rapport("FAILED");
+      ecrit_rapport("$MFT error: Invalid mft record for "
 	  "%s.\nCannot handle this yet. )-:\n",
 	  s);
       goto error_exit;
     }
     if (ntfs_is_baad_recordp(m2 + i * vol->mft_record_size)) {
-      ntfs_log_info("FAILED");
-      ntfs_log_error("$MFTMirr error: Incomplete multi "
+      ecrit_rapport("FAILED");
+      ecrit_rapport("$MFTMirr error: Incomplete multi "
 	  "sector transfer detected in %s.\n", s);
       goto error_exit;
     }
@@ -160,20 +160,20 @@
 	      (u8*)m + i * vol->mft_record_size)))) {
       if (!done) {
 	done = TRUE;
-	ntfs_log_info(FAILED);
-	ntfs_log_info("Correcting differences in $MFTMirr...");
+	ecrit_rapport(FAILED);
+	ecrit_rapport("Correcting differences in $MFTMirr...");
       }
       br = ntfs_mft_record_write(vol, i, (MFT_RECORD*)(m +
 	    i * vol->mft_record_size));
       if (br) {
-	ntfs_log_info(FAILED);
-	ntfs_log_perror("Error correcting $MFTMirr");
+	ecrit_rapport(FAILED);
+	ecrit_rapport("Error correcting $MFTMirr");
 	goto error_exit;
       }
     }
   }
-  ntfs_log_info(OK);
-  ntfs_log_info("Processing of $MFT and $MFTMirr completed successfully.\n");
+  ecrit_rapport(OK);
+  ecrit_rapport("Processing of $MFT and $MFTMirr completed successfully.\n");
   ret = 0;
 error_exit:
   free(m);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005