Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/ntfstools
In directory usw-pr-cvs1:/tmp/cvs-serv26646/ntfstools
Modified Files:
mkntfs.c ntfsdump_logfile.c ntfsfix.c
Log Message:
Finished provisional inode.c::ntfs_{open,close}_inode() functions. Also, started defining API provided by attrib.[ch], so far only done search context related stuff.
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/mkntfs.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -U2 -r1.66 -r1.67
--- mkntfs.c 18 Apr 2002 18:15:46 -0000 1.66
+++ mkntfs.c 19 Apr 2002 21:09:55 -0000 1.67
@@ -1186,5 +1186,5 @@
const char *val, const __s64 val_len)
{
- attr_search_context *ctx;
+ ntfs_attr_search_ctx *ctx;
ATTR_RECORD *a;
__u16 hdr_size;
@@ -1211,5 +1211,5 @@
uname = NULL;
/* Check if the attribute is already there. */
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx) {
Eprintf("Failed to allocate attribute search context.\n");
@@ -1341,5 +1341,5 @@
err_out:
if (ctx)
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (uname)
free(uname);
@@ -1353,5 +1353,5 @@
const ATTR_FLAGS flags, const char *val, const __s64 val_len)
{
- attr_search_context *ctx;
+ ntfs_attr_search_ctx *ctx;
ATTR_RECORD *a;
__u16 hdr_size;
@@ -1378,5 +1378,5 @@
uname = NULL;
/* Check if the attribute is already there. */
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx) {
Eprintf("Failed to allocate attribute search context.\n");
@@ -1512,5 +1512,5 @@
err_out:
if (ctx)
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (uname)
free(uname);
@@ -1527,5 +1527,5 @@
const char *val, const __u32 val_len)
{
- attr_search_context *ctx;
+ ntfs_attr_search_ctx *ctx;
ATTR_RECORD *a;
int asize, err, i;
@@ -1545,5 +1545,5 @@
uname = NULL;
/* Check if the attribute is already there. */
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx) {
Eprintf("Failed to allocate attribute search context.\n");
@@ -1605,5 +1605,5 @@
err_out:
if (ctx)
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (uname)
free(uname);
@@ -1658,5 +1658,5 @@
const FILE_NAME_TYPE_FLAGS file_name_type)
{
- attr_search_context *ctx;
+ ntfs_attr_search_ctx *ctx;
STANDARD_INFORMATION *si;
FILE_NAME_ATTR *fn;
@@ -1664,5 +1664,5 @@
/* Check if the attribute is already there. */
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx) {
Eprintf("Failed to allocate attribute search context.\n");
@@ -1673,5 +1673,5 @@
Eprintf("BUG: Standard information attribute not present in "
"file record\n");
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
return -EINVAL;
}
@@ -1682,5 +1682,5 @@
fn = (FILE_NAME_ATTR*)malloc(fn_size);
if (!fn) {
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
return -errno;
}
@@ -1691,5 +1691,5 @@
fn->last_mft_change_time = si->last_mft_change_time;
fn->last_access_time = si->last_access_time;
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
fn->allocated_size = cpu_to_le64(allocated_size);
@@ -2022,5 +2022,5 @@
INDEX_ALLOCATION **index)
{
- attr_search_context *ctx;
+ ntfs_attr_search_ctx *ctx;
ATTR_RECORD *a;
INDEX_ROOT *r;
@@ -2045,5 +2045,5 @@
uname = NULL;
/* Find the index root attribute. */
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx) {
Eprintf("Failed to allocate attribute search context.\n");
@@ -2161,5 +2161,5 @@
err_out:
if (ctx)
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (ia_val)
free(ia_val);
@@ -2733,5 +2733,5 @@
ATTR_RECORD *a;
MFT_REF root_ref;
- attr_search_context *ctx;
+ ntfs_attr_search_ctx *ctx;
char *sd;
NTFS_BOOT_SECTOR *bs;
@@ -3271,5 +3271,5 @@
opt.upcase, opt.upcase_len, &index_block);
if (!err) {
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx)
err_exit("Failed to allocate attribute search "
@@ -3277,5 +3277,5 @@
/* There is exactly one file name so this is ok. */
if (!find_attr($FILE_NAME, NULL, 0, 0, NULL, 0, NULL, 0, ctx)) {
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
err_exit("BUG: $FILE_NAME attribute not found.\n");
}
@@ -3285,5 +3285,5 @@
le16_to_cpu(a->value_offset)),
le32_to_cpu(a->value_length));
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
}
if (err)
@@ -3622,5 +3622,5 @@
err_exit("Not enough memory to allocate internal buffer.\n");;
j = stoucs(ustr, "$I30", i);
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx)
err_exit("Failed to allocate attribute search context: %s\n",
@@ -3628,5 +3628,5 @@
if (!find_attr($INDEX_ALLOCATION, ustr, j, IGNORE_CASE, opt.upcase,
opt.upcase_len, NULL, 0, ctx)) {
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
err_exit("BUG: $INDEX_ALLOCATION attribute not found.\n");
}
@@ -3634,13 +3634,13 @@
rl_index = decompress_run_list(a);
if (!rl_index) {
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
err_exit("Failed to decompress run list of $INDEX_ALLOCATION "
"attribute.\n");
}
if (sle64_to_cpu(a->initialized_size) < i) {
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
err_exit("BUG: $INDEX_ALLOCATION attribute too short.\n");
}
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
i = sizeof(INDEX_BLOCK) - sizeof(INDEX_HEADER) +
le32_to_cpu(index_block->index.allocated_size);
@@ -3656,10 +3656,10 @@
Vprintf("Syncing $Bitmap.\n");
m = (MFT_RECORD*)(buf + 6 * opt.mft_record_size);
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx)
err_exit("Failed to allocate attribute search context: %s\n",
strerror(errno));
if (!find_attr($DATA, NULL, 0, 0, NULL, 0, NULL, 0, ctx)) {
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
err_exit("BUG: $DATA attribute not found.\n");
}
@@ -3667,5 +3667,5 @@
if (a->non_resident) {
rl = decompress_run_list(a);
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (!rl)
err_exit("decompress_run_list() failed\n");
@@ -3678,5 +3678,5 @@
memcpy((char*)a + le16_to_cpu(a->value_offset), lcn_bitmap,
le32_to_cpu(a->value_length));
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
}
/*
Index: ntfsdump_logfile.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/ntfsdump_logfile.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -U2 -r1.15 -r1.16
--- ntfsdump_logfile.c 18 Apr 2002 18:15:46 -0000 1.15
+++ ntfsdump_logfile.c 19 Apr 2002 21:09:55 -0000 1.16
@@ -67,5 +67,5 @@
unsigned char *lfd = NULL;
ntfs_volume *vol = NULL;
- attr_search_context *ctx = NULL;
+ ntfs_attr_search_ctx *ctx = NULL;
RESTART_PAGE_HEADER *rph;
RESTART_AREA *rr;
@@ -128,5 +128,5 @@
goto error_exit;
}
- ctx = get_attr_search_ctx(NULL, m);
+ ctx = ntfs_get_attr_search_ctx(NULL, m);
if (!ctx) {
perror("Failed to allocate attribute search context");
@@ -357,5 +357,5 @@
free(lfd);
if (ctx)
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (m)
free(m);
Index: ntfsfix.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/ntfsfix.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -U2 -r1.25 -r1.26
--- ntfsfix.c 16 Apr 2002 15:34:32 -0000 1.25
+++ ntfsfix.c 19 Apr 2002 21:09:55 -0000 1.26
@@ -77,5 +77,5 @@
ntfs_volume *vol = NULL;
__u16 flags;
- attr_search_context *ctx = NULL;
+ ntfs_attr_search_ctx *ctx = NULL;
MFT_REF mref;
@@ -344,5 +344,5 @@
printf("Going to empty the journal ($LogFile)... ");
/* Find the $DATA attribute. */
- ctx = get_attr_search_ctx(NULL, (MFT_RECORD*)(b1 + (2 * mrs)));
+ ctx = ntfs_get_attr_search_ctx(NULL, (MFT_RECORD*)(b1 + (2 * mrs)));
if (!ctx) {
puts(FAILED);
@@ -432,5 +432,5 @@
final_exit:
if (ctx)
- put_attr_search_ctx(ctx);
+ ntfs_put_attr_search_ctx(ctx);
if (b1)
free(b1);
|