Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ntfs: remove private wrapper of endian helpers

The base versions handle constant folding now and are shorter than these
private wrappers, use them directly.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Harvey Harrison and committed by
Linus Torvalds
63cd8854 311d0761

+211 -223
+2 -2
fs/ntfs/dir.c
··· 32 32 /** 33 33 * The little endian Unicode string $I30 as a global constant. 34 34 */ 35 - ntfschar I30[5] = { const_cpu_to_le16('$'), const_cpu_to_le16('I'), 36 - const_cpu_to_le16('3'), const_cpu_to_le16('0'), 0 }; 35 + ntfschar I30[5] = { cpu_to_le16('$'), cpu_to_le16('I'), 36 + cpu_to_le16('3'), cpu_to_le16('0'), 0 }; 37 37 38 38 /** 39 39 * ntfs_lookup_inode_by_name - find an inode in a directory given its name
+1 -2
fs/ntfs/inode.c
··· 1975 1975 goto em_put_err_out; 1976 1976 next_al_entry = (ATTR_LIST_ENTRY*)((u8*)al_entry + 1977 1977 le16_to_cpu(al_entry->length)); 1978 - if (le32_to_cpu(al_entry->type) > 1979 - const_le32_to_cpu(AT_DATA)) 1978 + if (le32_to_cpu(al_entry->type) > le32_to_cpu(AT_DATA)) 1980 1979 goto em_put_err_out; 1981 1980 if (AT_DATA != al_entry->type) 1982 1981 continue;
+155 -166
fs/ntfs/layout.h
··· 31 31 32 32 #include "types.h" 33 33 34 - /* 35 - * Constant endianness conversion defines. 36 - */ 37 - #define const_le16_to_cpu(x) __constant_le16_to_cpu(x) 38 - #define const_le32_to_cpu(x) __constant_le32_to_cpu(x) 39 - #define const_le64_to_cpu(x) __constant_le64_to_cpu(x) 40 - 41 - #define const_cpu_to_le16(x) __constant_cpu_to_le16(x) 42 - #define const_cpu_to_le32(x) __constant_cpu_to_le32(x) 43 - #define const_cpu_to_le64(x) __constant_cpu_to_le64(x) 44 - 45 34 /* The NTFS oem_id "NTFS " */ 46 - #define magicNTFS const_cpu_to_le64(0x202020205346544eULL) 35 + #define magicNTFS cpu_to_le64(0x202020205346544eULL) 47 36 48 37 /* 49 38 * Location of bootsector on partition: ··· 103 114 */ 104 115 enum { 105 116 /* Found in $MFT/$DATA. */ 106 - magic_FILE = const_cpu_to_le32(0x454c4946), /* Mft entry. */ 107 - magic_INDX = const_cpu_to_le32(0x58444e49), /* Index buffer. */ 108 - magic_HOLE = const_cpu_to_le32(0x454c4f48), /* ? (NTFS 3.0+?) */ 117 + magic_FILE = cpu_to_le32(0x454c4946), /* Mft entry. */ 118 + magic_INDX = cpu_to_le32(0x58444e49), /* Index buffer. */ 119 + magic_HOLE = cpu_to_le32(0x454c4f48), /* ? (NTFS 3.0+?) */ 109 120 110 121 /* Found in $LogFile/$DATA. */ 111 - magic_RSTR = const_cpu_to_le32(0x52545352), /* Restart page. */ 112 - magic_RCRD = const_cpu_to_le32(0x44524352), /* Log record page. */ 122 + magic_RSTR = cpu_to_le32(0x52545352), /* Restart page. */ 123 + magic_RCRD = cpu_to_le32(0x44524352), /* Log record page. */ 113 124 114 125 /* Found in $LogFile/$DATA. (May be found in $MFT/$DATA, also?) */ 115 - magic_CHKD = const_cpu_to_le32(0x444b4843), /* Modified by chkdsk. */ 126 + magic_CHKD = cpu_to_le32(0x444b4843), /* Modified by chkdsk. */ 116 127 117 128 /* Found in all ntfs record containing records. */ 118 - magic_BAAD = const_cpu_to_le32(0x44414142), /* Failed multi sector 129 + magic_BAAD = cpu_to_le32(0x44414142), /* Failed multi sector 119 130 transfer was detected. */ 120 131 /* 121 132 * Found in $LogFile/$DATA when a page is full of 0xff bytes and is 122 133 * thus not initialized. Page must be initialized before using it. 123 134 */ 124 - magic_empty = const_cpu_to_le32(0xffffffff) /* Record is empty. */ 135 + magic_empty = cpu_to_le32(0xffffffff) /* Record is empty. */ 125 136 }; 126 137 127 138 typedef le32 NTFS_RECORD_TYPE; ··· 247 258 * information about the mft record in which they are present. 248 259 */ 249 260 enum { 250 - MFT_RECORD_IN_USE = const_cpu_to_le16(0x0001), 251 - MFT_RECORD_IS_DIRECTORY = const_cpu_to_le16(0x0002), 261 + MFT_RECORD_IN_USE = cpu_to_le16(0x0001), 262 + MFT_RECORD_IS_DIRECTORY = cpu_to_le16(0x0002), 252 263 } __attribute__ ((__packed__)); 253 264 254 265 typedef le16 MFT_RECORD_FLAGS; ··· 298 309 * Note: The _LE versions will return a CPU endian formatted value! 299 310 */ 300 311 #define MFT_REF_MASK_CPU 0x0000ffffffffffffULL 301 - #define MFT_REF_MASK_LE const_cpu_to_le64(MFT_REF_MASK_CPU) 312 + #define MFT_REF_MASK_LE cpu_to_le64(MFT_REF_MASK_CPU) 302 313 303 314 typedef u64 MFT_REF; 304 315 typedef le64 leMFT_REF; ··· 466 477 * a revealing choice of symbol I do not know what is... (-; 467 478 */ 468 479 enum { 469 - AT_UNUSED = const_cpu_to_le32( 0), 470 - AT_STANDARD_INFORMATION = const_cpu_to_le32( 0x10), 471 - AT_ATTRIBUTE_LIST = const_cpu_to_le32( 0x20), 472 - AT_FILE_NAME = const_cpu_to_le32( 0x30), 473 - AT_OBJECT_ID = const_cpu_to_le32( 0x40), 474 - AT_SECURITY_DESCRIPTOR = const_cpu_to_le32( 0x50), 475 - AT_VOLUME_NAME = const_cpu_to_le32( 0x60), 476 - AT_VOLUME_INFORMATION = const_cpu_to_le32( 0x70), 477 - AT_DATA = const_cpu_to_le32( 0x80), 478 - AT_INDEX_ROOT = const_cpu_to_le32( 0x90), 479 - AT_INDEX_ALLOCATION = const_cpu_to_le32( 0xa0), 480 - AT_BITMAP = const_cpu_to_le32( 0xb0), 481 - AT_REPARSE_POINT = const_cpu_to_le32( 0xc0), 482 - AT_EA_INFORMATION = const_cpu_to_le32( 0xd0), 483 - AT_EA = const_cpu_to_le32( 0xe0), 484 - AT_PROPERTY_SET = const_cpu_to_le32( 0xf0), 485 - AT_LOGGED_UTILITY_STREAM = const_cpu_to_le32( 0x100), 486 - AT_FIRST_USER_DEFINED_ATTRIBUTE = const_cpu_to_le32( 0x1000), 487 - AT_END = const_cpu_to_le32(0xffffffff) 480 + AT_UNUSED = cpu_to_le32( 0), 481 + AT_STANDARD_INFORMATION = cpu_to_le32( 0x10), 482 + AT_ATTRIBUTE_LIST = cpu_to_le32( 0x20), 483 + AT_FILE_NAME = cpu_to_le32( 0x30), 484 + AT_OBJECT_ID = cpu_to_le32( 0x40), 485 + AT_SECURITY_DESCRIPTOR = cpu_to_le32( 0x50), 486 + AT_VOLUME_NAME = cpu_to_le32( 0x60), 487 + AT_VOLUME_INFORMATION = cpu_to_le32( 0x70), 488 + AT_DATA = cpu_to_le32( 0x80), 489 + AT_INDEX_ROOT = cpu_to_le32( 0x90), 490 + AT_INDEX_ALLOCATION = cpu_to_le32( 0xa0), 491 + AT_BITMAP = cpu_to_le32( 0xb0), 492 + AT_REPARSE_POINT = cpu_to_le32( 0xc0), 493 + AT_EA_INFORMATION = cpu_to_le32( 0xd0), 494 + AT_EA = cpu_to_le32( 0xe0), 495 + AT_PROPERTY_SET = cpu_to_le32( 0xf0), 496 + AT_LOGGED_UTILITY_STREAM = cpu_to_le32( 0x100), 497 + AT_FIRST_USER_DEFINED_ATTRIBUTE = cpu_to_le32( 0x1000), 498 + AT_END = cpu_to_le32(0xffffffff) 488 499 }; 489 500 490 501 typedef le32 ATTR_TYPE; ··· 528 539 * equal then the second le32 values would be compared, etc. 529 540 */ 530 541 enum { 531 - COLLATION_BINARY = const_cpu_to_le32(0x00), 532 - COLLATION_FILE_NAME = const_cpu_to_le32(0x01), 533 - COLLATION_UNICODE_STRING = const_cpu_to_le32(0x02), 534 - COLLATION_NTOFS_ULONG = const_cpu_to_le32(0x10), 535 - COLLATION_NTOFS_SID = const_cpu_to_le32(0x11), 536 - COLLATION_NTOFS_SECURITY_HASH = const_cpu_to_le32(0x12), 537 - COLLATION_NTOFS_ULONGS = const_cpu_to_le32(0x13), 542 + COLLATION_BINARY = cpu_to_le32(0x00), 543 + COLLATION_FILE_NAME = cpu_to_le32(0x01), 544 + COLLATION_UNICODE_STRING = cpu_to_le32(0x02), 545 + COLLATION_NTOFS_ULONG = cpu_to_le32(0x10), 546 + COLLATION_NTOFS_SID = cpu_to_le32(0x11), 547 + COLLATION_NTOFS_SECURITY_HASH = cpu_to_le32(0x12), 548 + COLLATION_NTOFS_ULONGS = cpu_to_le32(0x13), 538 549 }; 539 550 540 551 typedef le32 COLLATION_RULE; ··· 548 559 * NT4. 549 560 */ 550 561 enum { 551 - ATTR_DEF_INDEXABLE = const_cpu_to_le32(0x02), /* Attribute can be 562 + ATTR_DEF_INDEXABLE = cpu_to_le32(0x02), /* Attribute can be 552 563 indexed. */ 553 - ATTR_DEF_MULTIPLE = const_cpu_to_le32(0x04), /* Attribute type 564 + ATTR_DEF_MULTIPLE = cpu_to_le32(0x04), /* Attribute type 554 565 can be present multiple times in the 555 566 mft records of an inode. */ 556 - ATTR_DEF_NOT_ZERO = const_cpu_to_le32(0x08), /* Attribute value 567 + ATTR_DEF_NOT_ZERO = cpu_to_le32(0x08), /* Attribute value 557 568 must contain at least one non-zero 558 569 byte. */ 559 - ATTR_DEF_INDEXED_UNIQUE = const_cpu_to_le32(0x10), /* Attribute must be 570 + ATTR_DEF_INDEXED_UNIQUE = cpu_to_le32(0x10), /* Attribute must be 560 571 indexed and the attribute value must be 561 572 unique for the attribute type in all of 562 573 the mft records of an inode. */ 563 - ATTR_DEF_NAMED_UNIQUE = const_cpu_to_le32(0x20), /* Attribute must be 574 + ATTR_DEF_NAMED_UNIQUE = cpu_to_le32(0x20), /* Attribute must be 564 575 named and the name must be unique for 565 576 the attribute type in all of the mft 566 577 records of an inode. */ 567 - ATTR_DEF_RESIDENT = const_cpu_to_le32(0x40), /* Attribute must be 578 + ATTR_DEF_RESIDENT = cpu_to_le32(0x40), /* Attribute must be 568 579 resident. */ 569 - ATTR_DEF_ALWAYS_LOG = const_cpu_to_le32(0x80), /* Always log 580 + ATTR_DEF_ALWAYS_LOG = cpu_to_le32(0x80), /* Always log 570 581 modifications to this attribute, 571 582 regardless of whether it is resident or 572 583 non-resident. Without this, only log ··· 603 614 * Attribute flags (16-bit). 604 615 */ 605 616 enum { 606 - ATTR_IS_COMPRESSED = const_cpu_to_le16(0x0001), 607 - ATTR_COMPRESSION_MASK = const_cpu_to_le16(0x00ff), /* Compression method 617 + ATTR_IS_COMPRESSED = cpu_to_le16(0x0001), 618 + ATTR_COMPRESSION_MASK = cpu_to_le16(0x00ff), /* Compression method 608 619 mask. Also, first 609 620 illegal value. */ 610 - ATTR_IS_ENCRYPTED = const_cpu_to_le16(0x4000), 611 - ATTR_IS_SPARSE = const_cpu_to_le16(0x8000), 621 + ATTR_IS_ENCRYPTED = cpu_to_le16(0x4000), 622 + ATTR_IS_SPARSE = cpu_to_le16(0x8000), 612 623 } __attribute__ ((__packed__)); 613 624 614 625 typedef le16 ATTR_FLAGS; ··· 800 811 * flags appear in all of the above. 801 812 */ 802 813 enum { 803 - FILE_ATTR_READONLY = const_cpu_to_le32(0x00000001), 804 - FILE_ATTR_HIDDEN = const_cpu_to_le32(0x00000002), 805 - FILE_ATTR_SYSTEM = const_cpu_to_le32(0x00000004), 806 - /* Old DOS volid. Unused in NT. = const_cpu_to_le32(0x00000008), */ 814 + FILE_ATTR_READONLY = cpu_to_le32(0x00000001), 815 + FILE_ATTR_HIDDEN = cpu_to_le32(0x00000002), 816 + FILE_ATTR_SYSTEM = cpu_to_le32(0x00000004), 817 + /* Old DOS volid. Unused in NT. = cpu_to_le32(0x00000008), */ 807 818 808 - FILE_ATTR_DIRECTORY = const_cpu_to_le32(0x00000010), 819 + FILE_ATTR_DIRECTORY = cpu_to_le32(0x00000010), 809 820 /* Note, FILE_ATTR_DIRECTORY is not considered valid in NT. It is 810 821 reserved for the DOS SUBDIRECTORY flag. */ 811 - FILE_ATTR_ARCHIVE = const_cpu_to_le32(0x00000020), 812 - FILE_ATTR_DEVICE = const_cpu_to_le32(0x00000040), 813 - FILE_ATTR_NORMAL = const_cpu_to_le32(0x00000080), 822 + FILE_ATTR_ARCHIVE = cpu_to_le32(0x00000020), 823 + FILE_ATTR_DEVICE = cpu_to_le32(0x00000040), 824 + FILE_ATTR_NORMAL = cpu_to_le32(0x00000080), 814 825 815 - FILE_ATTR_TEMPORARY = const_cpu_to_le32(0x00000100), 816 - FILE_ATTR_SPARSE_FILE = const_cpu_to_le32(0x00000200), 817 - FILE_ATTR_REPARSE_POINT = const_cpu_to_le32(0x00000400), 818 - FILE_ATTR_COMPRESSED = const_cpu_to_le32(0x00000800), 826 + FILE_ATTR_TEMPORARY = cpu_to_le32(0x00000100), 827 + FILE_ATTR_SPARSE_FILE = cpu_to_le32(0x00000200), 828 + FILE_ATTR_REPARSE_POINT = cpu_to_le32(0x00000400), 829 + FILE_ATTR_COMPRESSED = cpu_to_le32(0x00000800), 819 830 820 - FILE_ATTR_OFFLINE = const_cpu_to_le32(0x00001000), 821 - FILE_ATTR_NOT_CONTENT_INDEXED = const_cpu_to_le32(0x00002000), 822 - FILE_ATTR_ENCRYPTED = const_cpu_to_le32(0x00004000), 831 + FILE_ATTR_OFFLINE = cpu_to_le32(0x00001000), 832 + FILE_ATTR_NOT_CONTENT_INDEXED = cpu_to_le32(0x00002000), 833 + FILE_ATTR_ENCRYPTED = cpu_to_le32(0x00004000), 823 834 824 - FILE_ATTR_VALID_FLAGS = const_cpu_to_le32(0x00007fb7), 835 + FILE_ATTR_VALID_FLAGS = cpu_to_le32(0x00007fb7), 825 836 /* Note, FILE_ATTR_VALID_FLAGS masks out the old DOS VolId and the 826 837 FILE_ATTR_DEVICE and preserves everything else. This mask is used 827 838 to obtain all flags that are valid for reading. */ 828 - FILE_ATTR_VALID_SET_FLAGS = const_cpu_to_le32(0x000031a7), 839 + FILE_ATTR_VALID_SET_FLAGS = cpu_to_le32(0x000031a7), 829 840 /* Note, FILE_ATTR_VALID_SET_FLAGS masks out the old DOS VolId, the 830 841 F_A_DEVICE, F_A_DIRECTORY, F_A_SPARSE_FILE, F_A_REPARSE_POINT, 831 842 F_A_COMPRESSED, and F_A_ENCRYPTED and preserves the rest. This mask ··· 835 846 * FILENAME_ATTR attributes but not in the STANDARD_INFORMATION 836 847 * attribute of an mft record. 837 848 */ 838 - FILE_ATTR_DUP_FILE_NAME_INDEX_PRESENT = const_cpu_to_le32(0x10000000), 849 + FILE_ATTR_DUP_FILE_NAME_INDEX_PRESENT = cpu_to_le32(0x10000000), 839 850 /* Note, this is a copy of the corresponding bit from the mft record, 840 851 telling us whether this is a directory or not, i.e. whether it has 841 852 an index root attribute or not. */ 842 - FILE_ATTR_DUP_VIEW_INDEX_PRESENT = const_cpu_to_le32(0x20000000), 853 + FILE_ATTR_DUP_VIEW_INDEX_PRESENT = cpu_to_le32(0x20000000), 843 854 /* Note, this is a copy of the corresponding bit from the mft record, 844 855 telling us whether this file has a view index present (eg. object id 845 856 index, quota index, one of the security indexes or the encrypting ··· 1435 1446 /* Specific rights for files and directories are as follows: */ 1436 1447 1437 1448 /* Right to read data from the file. (FILE) */ 1438 - FILE_READ_DATA = const_cpu_to_le32(0x00000001), 1449 + FILE_READ_DATA = cpu_to_le32(0x00000001), 1439 1450 /* Right to list contents of a directory. (DIRECTORY) */ 1440 - FILE_LIST_DIRECTORY = const_cpu_to_le32(0x00000001), 1451 + FILE_LIST_DIRECTORY = cpu_to_le32(0x00000001), 1441 1452 1442 1453 /* Right to write data to the file. (FILE) */ 1443 - FILE_WRITE_DATA = const_cpu_to_le32(0x00000002), 1454 + FILE_WRITE_DATA = cpu_to_le32(0x00000002), 1444 1455 /* Right to create a file in the directory. (DIRECTORY) */ 1445 - FILE_ADD_FILE = const_cpu_to_le32(0x00000002), 1456 + FILE_ADD_FILE = cpu_to_le32(0x00000002), 1446 1457 1447 1458 /* Right to append data to the file. (FILE) */ 1448 - FILE_APPEND_DATA = const_cpu_to_le32(0x00000004), 1459 + FILE_APPEND_DATA = cpu_to_le32(0x00000004), 1449 1460 /* Right to create a subdirectory. (DIRECTORY) */ 1450 - FILE_ADD_SUBDIRECTORY = const_cpu_to_le32(0x00000004), 1461 + FILE_ADD_SUBDIRECTORY = cpu_to_le32(0x00000004), 1451 1462 1452 1463 /* Right to read extended attributes. (FILE/DIRECTORY) */ 1453 - FILE_READ_EA = const_cpu_to_le32(0x00000008), 1464 + FILE_READ_EA = cpu_to_le32(0x00000008), 1454 1465 1455 1466 /* Right to write extended attributes. (FILE/DIRECTORY) */ 1456 - FILE_WRITE_EA = const_cpu_to_le32(0x00000010), 1467 + FILE_WRITE_EA = cpu_to_le32(0x00000010), 1457 1468 1458 1469 /* Right to execute a file. (FILE) */ 1459 - FILE_EXECUTE = const_cpu_to_le32(0x00000020), 1470 + FILE_EXECUTE = cpu_to_le32(0x00000020), 1460 1471 /* Right to traverse the directory. (DIRECTORY) */ 1461 - FILE_TRAVERSE = const_cpu_to_le32(0x00000020), 1472 + FILE_TRAVERSE = cpu_to_le32(0x00000020), 1462 1473 1463 1474 /* 1464 1475 * Right to delete a directory and all the files it contains (its 1465 1476 * children), even if the files are read-only. (DIRECTORY) 1466 1477 */ 1467 - FILE_DELETE_CHILD = const_cpu_to_le32(0x00000040), 1478 + FILE_DELETE_CHILD = cpu_to_le32(0x00000040), 1468 1479 1469 1480 /* Right to read file attributes. (FILE/DIRECTORY) */ 1470 - FILE_READ_ATTRIBUTES = const_cpu_to_le32(0x00000080), 1481 + FILE_READ_ATTRIBUTES = cpu_to_le32(0x00000080), 1471 1482 1472 1483 /* Right to change file attributes. (FILE/DIRECTORY) */ 1473 - FILE_WRITE_ATTRIBUTES = const_cpu_to_le32(0x00000100), 1484 + FILE_WRITE_ATTRIBUTES = cpu_to_le32(0x00000100), 1474 1485 1475 1486 /* 1476 1487 * The standard rights (bits 16 to 23). These are independent of the ··· 1478 1489 */ 1479 1490 1480 1491 /* Right to delete the object. */ 1481 - DELETE = const_cpu_to_le32(0x00010000), 1492 + DELETE = cpu_to_le32(0x00010000), 1482 1493 1483 1494 /* 1484 1495 * Right to read the information in the object's security descriptor, 1485 1496 * not including the information in the SACL, i.e. right to read the 1486 1497 * security descriptor and owner. 1487 1498 */ 1488 - READ_CONTROL = const_cpu_to_le32(0x00020000), 1499 + READ_CONTROL = cpu_to_le32(0x00020000), 1489 1500 1490 1501 /* Right to modify the DACL in the object's security descriptor. */ 1491 - WRITE_DAC = const_cpu_to_le32(0x00040000), 1502 + WRITE_DAC = cpu_to_le32(0x00040000), 1492 1503 1493 1504 /* Right to change the owner in the object's security descriptor. */ 1494 - WRITE_OWNER = const_cpu_to_le32(0x00080000), 1505 + WRITE_OWNER = cpu_to_le32(0x00080000), 1495 1506 1496 1507 /* 1497 1508 * Right to use the object for synchronization. Enables a process to 1498 1509 * wait until the object is in the signalled state. Some object types 1499 1510 * do not support this access right. 1500 1511 */ 1501 - SYNCHRONIZE = const_cpu_to_le32(0x00100000), 1512 + SYNCHRONIZE = cpu_to_le32(0x00100000), 1502 1513 1503 1514 /* 1504 1515 * The following STANDARD_RIGHTS_* are combinations of the above for ··· 1506 1517 */ 1507 1518 1508 1519 /* These are currently defined to READ_CONTROL. */ 1509 - STANDARD_RIGHTS_READ = const_cpu_to_le32(0x00020000), 1510 - STANDARD_RIGHTS_WRITE = const_cpu_to_le32(0x00020000), 1511 - STANDARD_RIGHTS_EXECUTE = const_cpu_to_le32(0x00020000), 1520 + STANDARD_RIGHTS_READ = cpu_to_le32(0x00020000), 1521 + STANDARD_RIGHTS_WRITE = cpu_to_le32(0x00020000), 1522 + STANDARD_RIGHTS_EXECUTE = cpu_to_le32(0x00020000), 1512 1523 1513 1524 /* Combines DELETE, READ_CONTROL, WRITE_DAC, and WRITE_OWNER access. */ 1514 - STANDARD_RIGHTS_REQUIRED = const_cpu_to_le32(0x000f0000), 1525 + STANDARD_RIGHTS_REQUIRED = cpu_to_le32(0x000f0000), 1515 1526 1516 1527 /* 1517 1528 * Combines DELETE, READ_CONTROL, WRITE_DAC, WRITE_OWNER, and 1518 1529 * SYNCHRONIZE access. 1519 1530 */ 1520 - STANDARD_RIGHTS_ALL = const_cpu_to_le32(0x001f0000), 1531 + STANDARD_RIGHTS_ALL = cpu_to_le32(0x001f0000), 1521 1532 1522 1533 /* 1523 1534 * The access system ACL and maximum allowed access types (bits 24 to 1524 1535 * 25, bits 26 to 27 are reserved). 1525 1536 */ 1526 - ACCESS_SYSTEM_SECURITY = const_cpu_to_le32(0x01000000), 1527 - MAXIMUM_ALLOWED = const_cpu_to_le32(0x02000000), 1537 + ACCESS_SYSTEM_SECURITY = cpu_to_le32(0x01000000), 1538 + MAXIMUM_ALLOWED = cpu_to_le32(0x02000000), 1528 1539 1529 1540 /* 1530 1541 * The generic rights (bits 28 to 31). These map onto the standard and ··· 1532 1543 */ 1533 1544 1534 1545 /* Read, write, and execute access. */ 1535 - GENERIC_ALL = const_cpu_to_le32(0x10000000), 1546 + GENERIC_ALL = cpu_to_le32(0x10000000), 1536 1547 1537 1548 /* Execute access. */ 1538 - GENERIC_EXECUTE = const_cpu_to_le32(0x20000000), 1549 + GENERIC_EXECUTE = cpu_to_le32(0x20000000), 1539 1550 1540 1551 /* 1541 1552 * Write access. For files, this maps onto: ··· 1544 1555 * For directories, the mapping has the same numerical value. See 1545 1556 * above for the descriptions of the rights granted. 1546 1557 */ 1547 - GENERIC_WRITE = const_cpu_to_le32(0x40000000), 1558 + GENERIC_WRITE = cpu_to_le32(0x40000000), 1548 1559 1549 1560 /* 1550 1561 * Read access. For files, this maps onto: ··· 1553 1564 * For directories, the mapping has the same numberical value. See 1554 1565 * above for the descriptions of the rights granted. 1555 1566 */ 1556 - GENERIC_READ = const_cpu_to_le32(0x80000000), 1567 + GENERIC_READ = cpu_to_le32(0x80000000), 1557 1568 }; 1558 1569 1559 1570 typedef le32 ACCESS_MASK; ··· 1593 1604 * The object ACE flags (32-bit). 1594 1605 */ 1595 1606 enum { 1596 - ACE_OBJECT_TYPE_PRESENT = const_cpu_to_le32(1), 1597 - ACE_INHERITED_OBJECT_TYPE_PRESENT = const_cpu_to_le32(2), 1607 + ACE_OBJECT_TYPE_PRESENT = cpu_to_le32(1), 1608 + ACE_INHERITED_OBJECT_TYPE_PRESENT = cpu_to_le32(2), 1598 1609 }; 1599 1610 1600 1611 typedef le32 OBJECT_ACE_FLAGS; ··· 1695 1706 * expressed as offsets from the beginning of the security descriptor. 1696 1707 */ 1697 1708 enum { 1698 - SE_OWNER_DEFAULTED = const_cpu_to_le16(0x0001), 1699 - SE_GROUP_DEFAULTED = const_cpu_to_le16(0x0002), 1700 - SE_DACL_PRESENT = const_cpu_to_le16(0x0004), 1701 - SE_DACL_DEFAULTED = const_cpu_to_le16(0x0008), 1709 + SE_OWNER_DEFAULTED = cpu_to_le16(0x0001), 1710 + SE_GROUP_DEFAULTED = cpu_to_le16(0x0002), 1711 + SE_DACL_PRESENT = cpu_to_le16(0x0004), 1712 + SE_DACL_DEFAULTED = cpu_to_le16(0x0008), 1702 1713 1703 - SE_SACL_PRESENT = const_cpu_to_le16(0x0010), 1704 - SE_SACL_DEFAULTED = const_cpu_to_le16(0x0020), 1714 + SE_SACL_PRESENT = cpu_to_le16(0x0010), 1715 + SE_SACL_DEFAULTED = cpu_to_le16(0x0020), 1705 1716 1706 - SE_DACL_AUTO_INHERIT_REQ = const_cpu_to_le16(0x0100), 1707 - SE_SACL_AUTO_INHERIT_REQ = const_cpu_to_le16(0x0200), 1708 - SE_DACL_AUTO_INHERITED = const_cpu_to_le16(0x0400), 1709 - SE_SACL_AUTO_INHERITED = const_cpu_to_le16(0x0800), 1717 + SE_DACL_AUTO_INHERIT_REQ = cpu_to_le16(0x0100), 1718 + SE_SACL_AUTO_INHERIT_REQ = cpu_to_le16(0x0200), 1719 + SE_DACL_AUTO_INHERITED = cpu_to_le16(0x0400), 1720 + SE_SACL_AUTO_INHERITED = cpu_to_le16(0x0800), 1710 1721 1711 - SE_DACL_PROTECTED = const_cpu_to_le16(0x1000), 1712 - SE_SACL_PROTECTED = const_cpu_to_le16(0x2000), 1713 - SE_RM_CONTROL_VALID = const_cpu_to_le16(0x4000), 1714 - SE_SELF_RELATIVE = const_cpu_to_le16(0x8000) 1722 + SE_DACL_PROTECTED = cpu_to_le16(0x1000), 1723 + SE_SACL_PROTECTED = cpu_to_le16(0x2000), 1724 + SE_RM_CONTROL_VALID = cpu_to_le16(0x4000), 1725 + SE_SELF_RELATIVE = cpu_to_le16(0x8000) 1715 1726 } __attribute__ ((__packed__)); 1716 1727 1717 1728 typedef le16 SECURITY_DESCRIPTOR_CONTROL; ··· 1899 1910 * Possible flags for the volume (16-bit). 1900 1911 */ 1901 1912 enum { 1902 - VOLUME_IS_DIRTY = const_cpu_to_le16(0x0001), 1903 - VOLUME_RESIZE_LOG_FILE = const_cpu_to_le16(0x0002), 1904 - VOLUME_UPGRADE_ON_MOUNT = const_cpu_to_le16(0x0004), 1905 - VOLUME_MOUNTED_ON_NT4 = const_cpu_to_le16(0x0008), 1913 + VOLUME_IS_DIRTY = cpu_to_le16(0x0001), 1914 + VOLUME_RESIZE_LOG_FILE = cpu_to_le16(0x0002), 1915 + VOLUME_UPGRADE_ON_MOUNT = cpu_to_le16(0x0004), 1916 + VOLUME_MOUNTED_ON_NT4 = cpu_to_le16(0x0008), 1906 1917 1907 - VOLUME_DELETE_USN_UNDERWAY = const_cpu_to_le16(0x0010), 1908 - VOLUME_REPAIR_OBJECT_ID = const_cpu_to_le16(0x0020), 1918 + VOLUME_DELETE_USN_UNDERWAY = cpu_to_le16(0x0010), 1919 + VOLUME_REPAIR_OBJECT_ID = cpu_to_le16(0x0020), 1909 1920 1910 - VOLUME_CHKDSK_UNDERWAY = const_cpu_to_le16(0x4000), 1911 - VOLUME_MODIFIED_BY_CHKDSK = const_cpu_to_le16(0x8000), 1921 + VOLUME_CHKDSK_UNDERWAY = cpu_to_le16(0x4000), 1922 + VOLUME_MODIFIED_BY_CHKDSK = cpu_to_le16(0x8000), 1912 1923 1913 - VOLUME_FLAGS_MASK = const_cpu_to_le16(0xc03f), 1924 + VOLUME_FLAGS_MASK = cpu_to_le16(0xc03f), 1914 1925 1915 1926 /* To make our life easier when checking if we must mount read-only. */ 1916 - VOLUME_MUST_MOUNT_RO_MASK = const_cpu_to_le16(0xc027), 1927 + VOLUME_MUST_MOUNT_RO_MASK = cpu_to_le16(0xc027), 1917 1928 } __attribute__ ((__packed__)); 1918 1929 1919 1930 typedef le16 VOLUME_FLAGS; ··· 2098 2109 * The user quota flags. Names explain meaning. 2099 2110 */ 2100 2111 enum { 2101 - QUOTA_FLAG_DEFAULT_LIMITS = const_cpu_to_le32(0x00000001), 2102 - QUOTA_FLAG_LIMIT_REACHED = const_cpu_to_le32(0x00000002), 2103 - QUOTA_FLAG_ID_DELETED = const_cpu_to_le32(0x00000004), 2112 + QUOTA_FLAG_DEFAULT_LIMITS = cpu_to_le32(0x00000001), 2113 + QUOTA_FLAG_LIMIT_REACHED = cpu_to_le32(0x00000002), 2114 + QUOTA_FLAG_ID_DELETED = cpu_to_le32(0x00000004), 2104 2115 2105 - QUOTA_FLAG_USER_MASK = const_cpu_to_le32(0x00000007), 2116 + QUOTA_FLAG_USER_MASK = cpu_to_le32(0x00000007), 2106 2117 /* This is a bit mask for the user quota flags. */ 2107 2118 2108 2119 /* 2109 2120 * These flags are only present in the quota defaults index entry, i.e. 2110 2121 * in the entry where owner_id = QUOTA_DEFAULTS_ID. 2111 2122 */ 2112 - QUOTA_FLAG_TRACKING_ENABLED = const_cpu_to_le32(0x00000010), 2113 - QUOTA_FLAG_ENFORCEMENT_ENABLED = const_cpu_to_le32(0x00000020), 2114 - QUOTA_FLAG_TRACKING_REQUESTED = const_cpu_to_le32(0x00000040), 2115 - QUOTA_FLAG_LOG_THRESHOLD = const_cpu_to_le32(0x00000080), 2123 + QUOTA_FLAG_TRACKING_ENABLED = cpu_to_le32(0x00000010), 2124 + QUOTA_FLAG_ENFORCEMENT_ENABLED = cpu_to_le32(0x00000020), 2125 + QUOTA_FLAG_TRACKING_REQUESTED = cpu_to_le32(0x00000040), 2126 + QUOTA_FLAG_LOG_THRESHOLD = cpu_to_le32(0x00000080), 2116 2127 2117 - QUOTA_FLAG_LOG_LIMIT = const_cpu_to_le32(0x00000100), 2118 - QUOTA_FLAG_OUT_OF_DATE = const_cpu_to_le32(0x00000200), 2119 - QUOTA_FLAG_CORRUPT = const_cpu_to_le32(0x00000400), 2120 - QUOTA_FLAG_PENDING_DELETES = const_cpu_to_le32(0x00000800), 2128 + QUOTA_FLAG_LOG_LIMIT = cpu_to_le32(0x00000100), 2129 + QUOTA_FLAG_OUT_OF_DATE = cpu_to_le32(0x00000200), 2130 + QUOTA_FLAG_CORRUPT = cpu_to_le32(0x00000400), 2131 + QUOTA_FLAG_PENDING_DELETES = cpu_to_le32(0x00000800), 2121 2132 }; 2122 2133 2123 2134 typedef le32 QUOTA_FLAGS; ··· 2161 2172 * Predefined owner_id values (32-bit). 2162 2173 */ 2163 2174 enum { 2164 - QUOTA_INVALID_ID = const_cpu_to_le32(0x00000000), 2165 - QUOTA_DEFAULTS_ID = const_cpu_to_le32(0x00000001), 2166 - QUOTA_FIRST_USER_ID = const_cpu_to_le32(0x00000100), 2175 + QUOTA_INVALID_ID = cpu_to_le32(0x00000000), 2176 + QUOTA_DEFAULTS_ID = cpu_to_le32(0x00000001), 2177 + QUOTA_FIRST_USER_ID = cpu_to_le32(0x00000100), 2167 2178 }; 2168 2179 2169 2180 /* ··· 2178 2189 * Index entry flags (16-bit). 2179 2190 */ 2180 2191 enum { 2181 - INDEX_ENTRY_NODE = const_cpu_to_le16(1), /* This entry contains a 2192 + INDEX_ENTRY_NODE = cpu_to_le16(1), /* This entry contains a 2182 2193 sub-node, i.e. a reference to an index block in form of 2183 2194 a virtual cluster number (see below). */ 2184 - INDEX_ENTRY_END = const_cpu_to_le16(2), /* This signifies the last 2195 + INDEX_ENTRY_END = cpu_to_le16(2), /* This signifies the last 2185 2196 entry in an index block. The index entry does not 2186 2197 represent a file but it can point to a sub-node. */ 2187 2198 2188 - INDEX_ENTRY_SPACE_FILLER = const_cpu_to_le16(0xffff), /* gcc: Force 2199 + INDEX_ENTRY_SPACE_FILLER = cpu_to_le16(0xffff), /* gcc: Force 2189 2200 enum bit width to 16-bit. */ 2190 2201 } __attribute__ ((__packed__)); 2191 2202 ··· 2323 2334 * These are the predefined reparse point tags: 2324 2335 */ 2325 2336 enum { 2326 - IO_REPARSE_TAG_IS_ALIAS = const_cpu_to_le32(0x20000000), 2327 - IO_REPARSE_TAG_IS_HIGH_LATENCY = const_cpu_to_le32(0x40000000), 2328 - IO_REPARSE_TAG_IS_MICROSOFT = const_cpu_to_le32(0x80000000), 2337 + IO_REPARSE_TAG_IS_ALIAS = cpu_to_le32(0x20000000), 2338 + IO_REPARSE_TAG_IS_HIGH_LATENCY = cpu_to_le32(0x40000000), 2339 + IO_REPARSE_TAG_IS_MICROSOFT = cpu_to_le32(0x80000000), 2329 2340 2330 - IO_REPARSE_TAG_RESERVED_ZERO = const_cpu_to_le32(0x00000000), 2331 - IO_REPARSE_TAG_RESERVED_ONE = const_cpu_to_le32(0x00000001), 2332 - IO_REPARSE_TAG_RESERVED_RANGE = const_cpu_to_le32(0x00000001), 2341 + IO_REPARSE_TAG_RESERVED_ZERO = cpu_to_le32(0x00000000), 2342 + IO_REPARSE_TAG_RESERVED_ONE = cpu_to_le32(0x00000001), 2343 + IO_REPARSE_TAG_RESERVED_RANGE = cpu_to_le32(0x00000001), 2333 2344 2334 - IO_REPARSE_TAG_NSS = const_cpu_to_le32(0x68000005), 2335 - IO_REPARSE_TAG_NSS_RECOVER = const_cpu_to_le32(0x68000006), 2336 - IO_REPARSE_TAG_SIS = const_cpu_to_le32(0x68000007), 2337 - IO_REPARSE_TAG_DFS = const_cpu_to_le32(0x68000008), 2345 + IO_REPARSE_TAG_NSS = cpu_to_le32(0x68000005), 2346 + IO_REPARSE_TAG_NSS_RECOVER = cpu_to_le32(0x68000006), 2347 + IO_REPARSE_TAG_SIS = cpu_to_le32(0x68000007), 2348 + IO_REPARSE_TAG_DFS = cpu_to_le32(0x68000008), 2338 2349 2339 - IO_REPARSE_TAG_MOUNT_POINT = const_cpu_to_le32(0x88000003), 2350 + IO_REPARSE_TAG_MOUNT_POINT = cpu_to_le32(0x88000003), 2340 2351 2341 - IO_REPARSE_TAG_HSM = const_cpu_to_le32(0xa8000004), 2352 + IO_REPARSE_TAG_HSM = cpu_to_le32(0xa8000004), 2342 2353 2343 - IO_REPARSE_TAG_SYMBOLIC_LINK = const_cpu_to_le32(0xe8000000), 2354 + IO_REPARSE_TAG_SYMBOLIC_LINK = cpu_to_le32(0xe8000000), 2344 2355 2345 - IO_REPARSE_TAG_VALID_VALUES = const_cpu_to_le32(0xe000ffff), 2356 + IO_REPARSE_TAG_VALID_VALUES = cpu_to_le32(0xe000ffff), 2346 2357 }; 2347 2358 2348 2359 /*
+3 -3
fs/ntfs/logfile.h
··· 104 104 * in this particular client array. Also inside the client records themselves, 105 105 * this means that there are no client records preceding or following this one. 106 106 */ 107 - #define LOGFILE_NO_CLIENT const_cpu_to_le16(0xffff) 107 + #define LOGFILE_NO_CLIENT cpu_to_le16(0xffff) 108 108 #define LOGFILE_NO_CLIENT_CPU 0xffff 109 109 110 110 /* ··· 112 112 * information about the log file in which they are present. 113 113 */ 114 114 enum { 115 - RESTART_VOLUME_IS_CLEAN = const_cpu_to_le16(0x0002), 116 - RESTART_SPACE_FILLER = const_cpu_to_le16(0xffff), /* gcc: Force enum bit width to 16. */ 115 + RESTART_VOLUME_IS_CLEAN = cpu_to_le16(0x0002), 116 + RESTART_SPACE_FILLER = cpu_to_le16(0xffff), /* gcc: Force enum bit width to 16. */ 117 117 } __attribute__ ((__packed__)); 118 118 119 119 typedef le16 RESTART_AREA_FLAGS;
+1 -1
fs/ntfs/mft.c
··· 2839 2839 */ 2840 2840 2841 2841 /* Mark the mft record as not in use. */ 2842 - m->flags &= const_cpu_to_le16(~const_le16_to_cpu(MFT_RECORD_IN_USE)); 2842 + m->flags &= ~MFT_RECORD_IN_USE; 2843 2843 2844 2844 /* Increment the sequence number, skipping zero, if it is not zero. */ 2845 2845 old_seq_no = m->sequence_number;
+25 -25
fs/ntfs/super.c
··· 618 618 * many BIOSes will refuse to boot from a bootsector if the magic is 619 619 * incorrect, so we emit a warning. 620 620 */ 621 - if (!silent && b->end_of_sector_marker != const_cpu_to_le16(0xaa55)) 621 + if (!silent && b->end_of_sector_marker != cpu_to_le16(0xaa55)) 622 622 ntfs_warning(sb, "Invalid end of sector marker."); 623 623 return true; 624 624 not_ntfs: ··· 1242 1242 u32 *kaddr, *kend; 1243 1243 ntfs_name *name = NULL; 1244 1244 int ret = 1; 1245 - static const ntfschar hiberfil[13] = { const_cpu_to_le16('h'), 1246 - const_cpu_to_le16('i'), const_cpu_to_le16('b'), 1247 - const_cpu_to_le16('e'), const_cpu_to_le16('r'), 1248 - const_cpu_to_le16('f'), const_cpu_to_le16('i'), 1249 - const_cpu_to_le16('l'), const_cpu_to_le16('.'), 1250 - const_cpu_to_le16('s'), const_cpu_to_le16('y'), 1251 - const_cpu_to_le16('s'), 0 }; 1245 + static const ntfschar hiberfil[13] = { cpu_to_le16('h'), 1246 + cpu_to_le16('i'), cpu_to_le16('b'), 1247 + cpu_to_le16('e'), cpu_to_le16('r'), 1248 + cpu_to_le16('f'), cpu_to_le16('i'), 1249 + cpu_to_le16('l'), cpu_to_le16('.'), 1250 + cpu_to_le16('s'), cpu_to_le16('y'), 1251 + cpu_to_le16('s'), 0 }; 1252 1252 1253 1253 ntfs_debug("Entering."); 1254 1254 /* ··· 1296 1296 goto iput_out; 1297 1297 } 1298 1298 kaddr = (u32*)page_address(page); 1299 - if (*(le32*)kaddr == const_cpu_to_le32(0x72626968)/*'hibr'*/) { 1299 + if (*(le32*)kaddr == cpu_to_le32(0x72626968)/*'hibr'*/) { 1300 1300 ntfs_debug("Magic \"hibr\" found in hiberfil.sys. Windows is " 1301 1301 "hibernated on the volume. This is the " 1302 1302 "system volume."); ··· 1337 1337 MFT_REF mref; 1338 1338 struct inode *tmp_ino; 1339 1339 ntfs_name *name = NULL; 1340 - static const ntfschar Quota[7] = { const_cpu_to_le16('$'), 1341 - const_cpu_to_le16('Q'), const_cpu_to_le16('u'), 1342 - const_cpu_to_le16('o'), const_cpu_to_le16('t'), 1343 - const_cpu_to_le16('a'), 0 }; 1344 - static ntfschar Q[3] = { const_cpu_to_le16('$'), 1345 - const_cpu_to_le16('Q'), 0 }; 1340 + static const ntfschar Quota[7] = { cpu_to_le16('$'), 1341 + cpu_to_le16('Q'), cpu_to_le16('u'), 1342 + cpu_to_le16('o'), cpu_to_le16('t'), 1343 + cpu_to_le16('a'), 0 }; 1344 + static ntfschar Q[3] = { cpu_to_le16('$'), 1345 + cpu_to_le16('Q'), 0 }; 1346 1346 1347 1347 ntfs_debug("Entering."); 1348 1348 /* ··· 1416 1416 struct page *page; 1417 1417 ntfs_name *name = NULL; 1418 1418 USN_HEADER *uh; 1419 - static const ntfschar UsnJrnl[9] = { const_cpu_to_le16('$'), 1420 - const_cpu_to_le16('U'), const_cpu_to_le16('s'), 1421 - const_cpu_to_le16('n'), const_cpu_to_le16('J'), 1422 - const_cpu_to_le16('r'), const_cpu_to_le16('n'), 1423 - const_cpu_to_le16('l'), 0 }; 1424 - static ntfschar Max[5] = { const_cpu_to_le16('$'), 1425 - const_cpu_to_le16('M'), const_cpu_to_le16('a'), 1426 - const_cpu_to_le16('x'), 0 }; 1427 - static ntfschar J[3] = { const_cpu_to_le16('$'), 1428 - const_cpu_to_le16('J'), 0 }; 1419 + static const ntfschar UsnJrnl[9] = { cpu_to_le16('$'), 1420 + cpu_to_le16('U'), cpu_to_le16('s'), 1421 + cpu_to_le16('n'), cpu_to_le16('J'), 1422 + cpu_to_le16('r'), cpu_to_le16('n'), 1423 + cpu_to_le16('l'), 0 }; 1424 + static ntfschar Max[5] = { cpu_to_le16('$'), 1425 + cpu_to_le16('M'), cpu_to_le16('a'), 1426 + cpu_to_le16('x'), 0 }; 1427 + static ntfschar J[3] = { cpu_to_le16('$'), 1428 + cpu_to_le16('J'), 0 }; 1429 1429 1430 1430 ntfs_debug("Entering."); 1431 1431 /*
+24 -24
fs/ntfs/usnjrnl.h
··· 116 116 * documentation: http://www.linux-ntfs.org/ 117 117 */ 118 118 enum { 119 - USN_REASON_DATA_OVERWRITE = const_cpu_to_le32(0x00000001), 120 - USN_REASON_DATA_EXTEND = const_cpu_to_le32(0x00000002), 121 - USN_REASON_DATA_TRUNCATION = const_cpu_to_le32(0x00000004), 122 - USN_REASON_NAMED_DATA_OVERWRITE = const_cpu_to_le32(0x00000010), 123 - USN_REASON_NAMED_DATA_EXTEND = const_cpu_to_le32(0x00000020), 124 - USN_REASON_NAMED_DATA_TRUNCATION= const_cpu_to_le32(0x00000040), 125 - USN_REASON_FILE_CREATE = const_cpu_to_le32(0x00000100), 126 - USN_REASON_FILE_DELETE = const_cpu_to_le32(0x00000200), 127 - USN_REASON_EA_CHANGE = const_cpu_to_le32(0x00000400), 128 - USN_REASON_SECURITY_CHANGE = const_cpu_to_le32(0x00000800), 129 - USN_REASON_RENAME_OLD_NAME = const_cpu_to_le32(0x00001000), 130 - USN_REASON_RENAME_NEW_NAME = const_cpu_to_le32(0x00002000), 131 - USN_REASON_INDEXABLE_CHANGE = const_cpu_to_le32(0x00004000), 132 - USN_REASON_BASIC_INFO_CHANGE = const_cpu_to_le32(0x00008000), 133 - USN_REASON_HARD_LINK_CHANGE = const_cpu_to_le32(0x00010000), 134 - USN_REASON_COMPRESSION_CHANGE = const_cpu_to_le32(0x00020000), 135 - USN_REASON_ENCRYPTION_CHANGE = const_cpu_to_le32(0x00040000), 136 - USN_REASON_OBJECT_ID_CHANGE = const_cpu_to_le32(0x00080000), 137 - USN_REASON_REPARSE_POINT_CHANGE = const_cpu_to_le32(0x00100000), 138 - USN_REASON_STREAM_CHANGE = const_cpu_to_le32(0x00200000), 139 - USN_REASON_CLOSE = const_cpu_to_le32(0x80000000), 119 + USN_REASON_DATA_OVERWRITE = cpu_to_le32(0x00000001), 120 + USN_REASON_DATA_EXTEND = cpu_to_le32(0x00000002), 121 + USN_REASON_DATA_TRUNCATION = cpu_to_le32(0x00000004), 122 + USN_REASON_NAMED_DATA_OVERWRITE = cpu_to_le32(0x00000010), 123 + USN_REASON_NAMED_DATA_EXTEND = cpu_to_le32(0x00000020), 124 + USN_REASON_NAMED_DATA_TRUNCATION= cpu_to_le32(0x00000040), 125 + USN_REASON_FILE_CREATE = cpu_to_le32(0x00000100), 126 + USN_REASON_FILE_DELETE = cpu_to_le32(0x00000200), 127 + USN_REASON_EA_CHANGE = cpu_to_le32(0x00000400), 128 + USN_REASON_SECURITY_CHANGE = cpu_to_le32(0x00000800), 129 + USN_REASON_RENAME_OLD_NAME = cpu_to_le32(0x00001000), 130 + USN_REASON_RENAME_NEW_NAME = cpu_to_le32(0x00002000), 131 + USN_REASON_INDEXABLE_CHANGE = cpu_to_le32(0x00004000), 132 + USN_REASON_BASIC_INFO_CHANGE = cpu_to_le32(0x00008000), 133 + USN_REASON_HARD_LINK_CHANGE = cpu_to_le32(0x00010000), 134 + USN_REASON_COMPRESSION_CHANGE = cpu_to_le32(0x00020000), 135 + USN_REASON_ENCRYPTION_CHANGE = cpu_to_le32(0x00040000), 136 + USN_REASON_OBJECT_ID_CHANGE = cpu_to_le32(0x00080000), 137 + USN_REASON_REPARSE_POINT_CHANGE = cpu_to_le32(0x00100000), 138 + USN_REASON_STREAM_CHANGE = cpu_to_le32(0x00200000), 139 + USN_REASON_CLOSE = cpu_to_le32(0x80000000), 140 140 }; 141 141 142 142 typedef le32 USN_REASON_FLAGS; ··· 148 148 * http://www.linux-ntfs.org/ 149 149 */ 150 150 enum { 151 - USN_SOURCE_DATA_MANAGEMENT = const_cpu_to_le32(0x00000001), 152 - USN_SOURCE_AUXILIARY_DATA = const_cpu_to_le32(0x00000002), 153 - USN_SOURCE_REPLICATION_MANAGEMENT = const_cpu_to_le32(0x00000004), 151 + USN_SOURCE_DATA_MANAGEMENT = cpu_to_le32(0x00000001), 152 + USN_SOURCE_AUXILIARY_DATA = cpu_to_le32(0x00000002), 153 + USN_SOURCE_REPLICATION_MANAGEMENT = cpu_to_le32(0x00000004), 154 154 }; 155 155 156 156 typedef le32 USN_SOURCE_INFO_FLAGS;