2 libparted - a library for manipulating disk partitions
3 Copyright (C) 2000, 2007, 2009-2011 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <parted/parted.h>
22 #include <parted/endian.h>
26 # define _(String) dgettext (PACKAGE, String)
28 # define _(String) (String)
29 #endif /* ENABLE_NLS */
33 #define NTFS_BLOCK_SIZES ((int[2]){512, 0})
35 #define NTFS_SIGNATURE "NTFS"
38 ntfs_probe (PedGeometry* geom)
42 if (!ped_geometry_read (geom, buf, 0, 1))
45 if (strncmp (NTFS_SIGNATURE, buf + 3, strlen (NTFS_SIGNATURE)) == 0)
46 return ped_geometry_new (geom->dev, geom->start,
47 PED_LE64_TO_CPU (*(uint64_t*)
53 static PedFileSystemOps ntfs_ops = {
57 static PedFileSystemType ntfs_type = {
61 block_sizes: NTFS_BLOCK_SIZES
65 ped_file_system_ntfs_init ()
67 ped_file_system_type_register (&ntfs_type);
71 ped_file_system_ntfs_done ()
73 ped_file_system_type_unregister (&ntfs_type);