mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Revert "fs: Remove NTFS classic"
This reverts commit 7ffa8f3d30.
Reverts the removal of the classic read-only ntfs driver to
serve as the base for a new read-write ntfs implementation.
If we stack changes on top of the revert patch, It will significantly
reduce the diff size, making the review easier.
This revert intentionally excludes the restoration of Kconfig and
Makefile. The Kconfig and Makefile will be added back in the final patch
of this series, enabling the driver only after all features and
improvements have been applied.
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
36
fs/ntfs/collate.h
Normal file
36
fs/ntfs/collate.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* collate.h - Defines for NTFS kernel collation handling. Part of the
|
||||
* Linux-NTFS project.
|
||||
*
|
||||
* Copyright (c) 2004 Anton Altaparmakov
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_NTFS_COLLATE_H
|
||||
#define _LINUX_NTFS_COLLATE_H
|
||||
|
||||
#include "types.h"
|
||||
#include "volume.h"
|
||||
|
||||
static inline bool ntfs_is_collation_rule_supported(COLLATION_RULE cr) {
|
||||
int i;
|
||||
|
||||
/*
|
||||
* FIXME: At the moment we only support COLLATION_BINARY and
|
||||
* COLLATION_NTOFS_ULONG, so we return false for everything else for
|
||||
* now.
|
||||
*/
|
||||
if (unlikely(cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG))
|
||||
return false;
|
||||
i = le32_to_cpu(cr);
|
||||
if (likely(((i >= 0) && (i <= 0x02)) ||
|
||||
((i >= 0x10) && (i <= 0x13))))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
extern int ntfs_collate(ntfs_volume *vol, COLLATION_RULE cr,
|
||||
const void *data1, const int data1_len,
|
||||
const void *data2, const int data2_len);
|
||||
|
||||
#endif /* _LINUX_NTFS_COLLATE_H */
|
||||
Reference in New Issue
Block a user