Changes by: flatcap
Update of /cvsroot/linux-ntfs/linux-ntfs/libntfs
In directory usw-pr-cvs1:/tmp/cvs-serv21128/libntfs
Modified Files:
Makefile.am Makefile.in attrib.c inode.c volume.c
Added Files:
runlist.c
Log Message:
move the runlist functions from attrib.c to runlist.c
--- NEW FILE ---
/**
* $Id: runlist.c,v 1.1 2002/07/09 19:17:49 flatcap Exp $
*
* runlist.c - Run list handling code. Part of the Linux-NTFS project.
*
* Copyright (c) 2002 Anton Altaparmakov.
* Copyright (c) 2002 Richard Russon.
*
* This program/include file is free software; you can redistribute it and/or
* modify 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/include file 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
[...1140 lines suppressed...]
dst += 1 + len_len + lcn_len;
}
if (dst <= dst_max) {
/* Terminator byte. */
*dst = 0;
return 0;
}
size_err:
errno = ENOSPC;
return -1;
err_out:
if (rl[i].lcn == LCN_RL_NOT_MAPPED)
errno = EINVAL;
else
errno = EIO;
return -1;
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -U2 -r1.15 -r1.16
--- Makefile.am 6 Jun 2002 15:43:58 -0000 1.15
+++ Makefile.am 9 Jul 2002 19:17:48 -0000 1.16
@@ -47,4 +47,5 @@
mft.c \
mst.c \
+ runlist.c \
unistr.c \
volume.c
Index: Makefile.in
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/Makefile.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -U2 -r1.21 -r1.22
--- Makefile.in 6 Jun 2002 15:43:59 -0000 1.21
+++ Makefile.in 9 Jul 2002 19:17:48 -0000 1.22
@@ -131,4 +131,5 @@
mft.c \
mst.c \
+ runlist.c \
unistr.c \
volume.c
@@ -146,5 +147,5 @@
libntfs_la_LIBADD =
libntfs_la_OBJECTS = attrib.lo bootsect.lo debug.lo dir.lo disk_io.lo \
-inode.lo mft.lo mst.lo unistr.lo volume.lo
+inode.lo mft.lo mst.lo runlist.lo unistr.lo volume.lo
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -159,6 +160,6 @@
GZIP_ENV = --best
DEP_FILES = .deps/attrib.P .deps/bootsect.P .deps/debug.P .deps/dir.P \
-.deps/disk_io.P .deps/inode.P .deps/mft.P .deps/mst.P .deps/unistr.P \
-.deps/volume.P
+.deps/disk_io.P .deps/inode.P .deps/mft.P .deps/mst.P .deps/runlist.P \
+.deps/unistr.P .deps/volume.P
SOURCES = $(libntfs_la_SOURCES)
OBJECTS = $(libntfs_la_OBJECTS)
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/attrib.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -U2 -r1.56 -r1.57
--- attrib.c 9 Jul 2002 00:06:49 -0000 1.56
+++ attrib.c 9 Jul 2002 19:17:49 -0000 1.57
@@ -37,4 +37,5 @@
#include "layout.h"
#include "inode.h"
+#include "runlist.h"
uchar_t AT_NONAME[] = { const_cpu_to_le16('\0') };
@@ -542,901 +543,4 @@
}
-/*
- * Internal function:
- *
[...1135 lines suppressed...]
- /* Update header byte. */
- *dst = lcn_len << 4 | len_len;
- /* Position ourselves at next mapping pairs array element. */
- dst += 1 + len_len + lcn_len;
- }
- if (dst <= dst_max) {
- /* Terminator byte. */
- *dst = 0;
- return 0;
- }
-size_err:
- errno = ENOSPC;
- return -1;
-err_out:
- if (rl[i].lcn == LCN_RL_NOT_MAPPED)
- errno = EINVAL;
- else
- errno = EIO;
return -1;
}
Index: inode.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/inode.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -U2 -r1.13 -r1.14
--- inode.c 8 Jul 2002 23:27:16 -0000 1.13
+++ inode.c 9 Jul 2002 19:17:49 -0000 1.14
@@ -31,4 +31,5 @@
#include "mft.h"
#include "attrib.h"
+#include "runlist.h"
static __inline__ ntfs_inode *__allocate_ntfs_inode(ntfs_volume *vol)
Index: volume.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/volume.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -U2 -r1.47 -r1.48
--- volume.c 9 Jul 2002 01:01:40 -0000 1.47
+++ volume.c 9 Jul 2002 19:17:49 -0000 1.48
@@ -37,4 +37,5 @@
#include "debug.h"
#include "inode.h"
+#include "runlist.h"
/*
|