Changes by: szaka
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357.server4you.de:/tmp/cvs-serv16263
Modified Files:
ntfsclone.c
Log Message:
fix missing error outputs
Index: ntfsclone.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsclone.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -r1.80 -r1.81
--- ntfsclone.c 15 Jun 2006 18:43:25 -0000 1.80
+++ ntfsclone.c 13 Aug 2006 14:34:07 -0000 1.81
@@ -717,6 +717,7 @@ static void wipe_index_entry_timestams(I
{
s64 timestamp = utc2ntfs(0);
+ /* FIXME: can fall into infinite loop if corrupted */
while (!(e->flags & INDEX_ENTRY_END)) {
e->key.file_name.creation_time = timestamp;
@@ -743,7 +744,7 @@ static void wipe_index_allocation_timest
indexr = ntfs_index_root_get(ni, attr);
if (!indexr) {
- ntfs_log_perror("Failed to read $INDEX_ROOT attribute");
+ perr_printf("Failed to read $INDEX_ROOT attribute");
return;
}
@@ -755,22 +756,22 @@ static void wipe_index_allocation_timest
byte = bitmap = ntfs_attr_readall(ni, AT_BITMAP, name, name_len, NULL);
if (!byte) {
- ntfs_log_perror("Failed to read $BITMAP attribute");
+ perr_printf("Failed to read $BITMAP attribute");
goto out_indexr;
}
na = ntfs_attr_open(ni, AT_INDEX_ALLOCATION, name, name_len);
if (!na) {
- ntfs_log_perror("Failed to open $INDEX_ALLOCATION attribute");
+ perr_printf("Failed to open $INDEX_ALLOCATION attribute");
goto out_bitmap;
}
tmp_indexa = indexa = malloc(na->data_size);
if (!tmp_indexa) {
- ntfs_log_perror("malloc failed");
+ perr_printf("malloc failed");
goto out_na;
}
if (ntfs_attr_pread(na, 0, na->data_size, indexa) != na->data_size) {
- ntfs_log_perror("Failed to read $INDEX_ALLOCATION attribute");
+ perr_printf("Failed to read $INDEX_ALLOCATION attribute");
goto out_indexa;
}
@@ -779,7 +780,7 @@ static void wipe_index_allocation_timest
if (*byte & (1 << bit)) {
if (ntfs_mst_post_read_fixup((NTFS_RECORD *)tmp_indexa,
indexr->index_block_size)) {
- ntfs_log_perror("Damaged INDX record");
+ perr_printf("Damaged INDX record");
goto out_indexa;
}
entry = (INDEX_ENTRY *)((u8 *)tmp_indexa + le32_to_cpu(
@@ -792,7 +793,7 @@ static void wipe_index_allocation_timest
if (ntfs_mst_pre_write_fixup((NTFS_RECORD *)tmp_indexa,
indexr->index_block_size)) {
- ntfs_log_perror("INDX write fixup failed");
+ perr_printf("INDX write fixup failed");
goto out_indexa;
}
}
@@ -806,7 +807,7 @@ static void wipe_index_allocation_timest
}
if (ntfs_rl_pwrite(vol, na->rl, 0, na->data_size, indexa) != na->data_size)
- ntfs_log_perror("ntfs_rl_pwrite failed");
+ perr_printf("ntfs_rl_pwrite failed");
out_indexa:
free(indexa);
out_na:
|