cluster.c revision 7e7bd3dccbfe8f79e25e5c1554b5bc3a9aaca321
/**
* cluster - Part of the Linux-NTFS project.
*
* Copyright (c) 2002-2003 Richard Russon
*
* This function will locate the owner of any given sector or cluster range.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (in the main directory of the Linux-NTFS
* distribution in the file COPYING); if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "cluster.h"
#include "utils.h"
#include "logging.h"
/**
* cluster_find
*/
{
int j;
int result = -1;
return -1;
while (mft_next_record(m_ctx) == 0) {
continue;
ntfs_log_verbose("Inode: %llu\n", (unsigned long long)
if (!rec->non_resident) {
continue;
}
if (!runs) {
ntfs_log_error("Couldn't read the data runs.\n");
goto done;
}
ntfs_log_verbose("\t\tVCN\tLCN\tLength\n");
if (a_begin < 0)
continue; // sparse, discontiguous, etc
ntfs_log_verbose("\t\t%lld\t%lld-%lld (%lld)\n",
//dprint list
continue; // before or after search range
return 1;
}
}
}
result = 0;
done:
return result;
}