| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to increment the Logical Block Address in eax by the number of
sectors we passed to getlinsec after every invocation, otherwise we'll
start with the same sector everytime.
This bug was discovered when booting an isohybrid image, which failed
to boot after printing the following error,
"Image checksum error, sorry..."
because the isolinux.bin was bigger than 32K, and thus invoked the
getlinsec loop that reads the file in chunks.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
This is a significant rewrite of the generic lookup logic inside
core/fs/fs.c's searchdir function. Previously, there was a
memory leak if a path involved multiple directories. After a
sufficiently large number of invocations, this could be observed.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
|
| |
|
|
|
|
|
| |
comapi_chainboot was obsoleted in 3.80.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
|
|
|
|
|
|
| |
Check if a pointer is NULL due to specifying an invalid inode group
number.
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initialization of the cache doubly-linked list had
head->next->prev instead of head->prev->next; this entry is supposed
to initialize the ->next entry of the last entry in the list (which
points back to the head node.)
For clarity, consistently use "head" to refer to the head node; the
mixing of "head" and "dev->cache_head" needlessly obfuscated the code.
The wild pointer reference caused crashes on some systems.
Reported-by: Jan Safrata <jsafrata@centrum.cz>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
Handle mangle in FAT the same as in the generic version, except for \
-> / conversion.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
| |
Actually keep track of the pathnames for all elements for on-disk
filesystems. This makes sure we can always reconstruct the correct
path.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
For conventional filesystems (i.e. not PXE), collapse /./ and /../ in
the path when doing chdir.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The subvolume name in path.data is not NUL-terminated, so don't use
strcmp on it.
Before this patch, it would accumulate the following (given
subvolumes with names "ext2_saved", "home", "gentoo" and "boot"):
ext2_saved
home_saved
gentooaved
bootooaved
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
| |
We don't actually have any constructors/destructors in the core at
this time, but handle .init/fini_table in case that happens...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
In ntfs_readdir(), if one entry has INDEX_ENTRY_END flag set, it won't
contain indexed_file member, that'd be used afterwards when looking for
the MFT record that is associated with that index entry.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
| |
As an attribute may be stored in a NTFS record rather than the current
record being used, these checks wouldn't work anymore for this case.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Once ntfs_attr_lookup() is called, it may change the MFT record passed
as parameter so that the next calls that need the latest found MFT
record don't have it anymore. So the __ntfs_attr_lookup() variant will
provide support to the ntfs_attr_lookup() function handling both old
and new MFT records.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
After invoking ntfs_attr_lookup(), the attribute type that we're looking
for may be allocated in a other MFT record, so the parameter which gets
the current MFT record can be changed once to point to the other MFT
record that actually contains the wanted attribute type.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
This missing field just messed up when reading the
ntfs_attr_list_entry's fields to be used in any case. Also add a
check to avoid reading the same MFT record which contains the
attribute list and also the wanted attribute type.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
| |
Instead of either hanging out or printing a fatal message on the screen
when not finding attributes from attribute list's entries, handle
offsets that will determine if we reached end of a attribute list.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFT records that contain $ATTRIBUTE_LIST attributes, for example, are
those that there are many hards links, or the file itself is very
fragmented, and so on.
So when attributes of a MFT record that don't fit in a MFT record, those
will be stored in one or more MFT records and can be found through the
attribute list's entries of the MFT record being acessed, which are in
the $ATTRIBUTE_LIST attribute.
ntfs_attr_list_lookup() function will be called once we didn't find the
attribute within the MFT record itself so that the attribute will presumably
be stored in another MFT record, according to the information that has
been retrieved from the attribute list's entry.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
When installing Syslinux in an NTFS volume and then booting it up,
Syslinux will print on the screen an EDD error ocurred on btrfs probing
because that volume is not actually a btrfs one. Thus, to work around
that issue add ntfs_fs_ops structure just before the btrfs_fs_ops so
that fs_init() function will execute the ntfs_fs_ops->fs_init() function
first, and on success, btrfs_fs_ops->fs_init() won't be executed either.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using the COMBOOT32 module "ls" for listining directory entries on
an NTFS volume, for e.g. directories as "/Foobar" (a Win32 filename)
could be only listed as "ls.c32 /foobar" and neither "ls.c32
"/Foobar" nor "ls.c32 /FOOBAR". POSIX filenames must be handled in a
case-sensitivity way, while Win32 filenames are handled in a
non-case-sensitivity way.
Note also that the POSIX/Win32 filename compare is done in the
ntfs_filename_cmp() function.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
Add missing year information in the license headers.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
| |
A typical Linux kernel will be way, way too big for the low memory
bootstrap area, so throw an error message if we end up in the
bootstrap path with something that cannot possibly fit below 640K.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
| |
Latetly, we kept a state information within the inode structure, that
was actually a mistake. Now, a ntfs_readdir_state structure is allocated
to keep a state that'll help on listing directory entries from sucessive
ntfs_readdir() calls.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
If reading the NTFS BIOS parameter block fails for any reason,
we will not attempt to continue to work towards finding an
NTFS filesystem on the disk/partition.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The MFT record lookup strategies are different for NTFS
versions 3.0 and 3.1, so we use a function pointer for
the appropriate function.
We start off using 3.0 by default, then use that to read
the $Volume meta-file and find out the actual version.
Then we adjust the function pointer, as needed.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
| |
NTFS files can contain multiple data runs, so use a runlist for handling
multiple data runs of a single file, and also modify ntfs_next_extent()
in order to support this new feature.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
ntfs_mft_record_lookup() always started its lookup from the same block,
which was though a mistake. So the lookup became very slow. Now
determine its starting block number from the calculated MFT record's LCN
number.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
lbytes variable wasn't set correctly.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
Now I'd recommend to test it :-)
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
Need more tests, hence I don't recommend to rely on it right now.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
gerth and sha0, you need to test it! :-)
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
Also change the other length field accordingly.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
| |
gerth, you HAVE to test it! :-)
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
parse_data_run() used to get the wrong value of VCNs starting at LCN,
so it was only getting the value 1 and the NTFS driver didn't look at
the other VCNs.
Now, everything seems to work, except the readdir() function :-P
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
|
|
|
| |
My tests were: menu.c32 (worked), cat.32 (worked, ls.c32 (not worked).
Looks like we have a bug in ntfs_readdir(). It will check it out later.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
| |
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|