Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bits
File: sysmacros.h
/* Definitions of macros to access `dev_t' values.
[0] Fix | Delete
Copyright (C) 1996-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
#ifndef _BITS_SYSMACROS_H
[18] Fix | Delete
#define _BITS_SYSMACROS_H 1
[19] Fix | Delete
[20] Fix | Delete
#ifndef _SYS_SYSMACROS_H
[21] Fix | Delete
# error "Never include <bits/sysmacros.h> directly; use <sys/sysmacros.h> instead."
[22] Fix | Delete
#endif
[23] Fix | Delete
[24] Fix | Delete
/* dev_t in glibc is a 64-bit quantity, with 32-bit major and minor numbers.
[25] Fix | Delete
Our default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of
[26] Fix | Delete
the major number and m is a hex digit of the minor number. This is
[27] Fix | Delete
downward compatible with legacy systems where dev_t is 16 bits wide,
[28] Fix | Delete
encoded as MMmm. It is also downward compatible with the Linux kernel,
[29] Fix | Delete
which (as of 2016) uses 32-bit dev_t, encoded as mmmM MMmm.
[30] Fix | Delete
[31] Fix | Delete
Systems that use an incompatible encoding for dev_t should override this
[32] Fix | Delete
file in the appropriate sysdeps subdirectory. */
[33] Fix | Delete
[34] Fix | Delete
#define __SYSMACROS_DECLARE_MAJOR(DECL_TEMPL) \
[35] Fix | Delete
DECL_TEMPL(unsigned int, major, (__dev_t __dev))
[36] Fix | Delete
[37] Fix | Delete
#define __SYSMACROS_DEFINE_MAJOR(DECL_TEMPL) \
[38] Fix | Delete
__SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \
[39] Fix | Delete
{ \
[40] Fix | Delete
unsigned int __major; \
[41] Fix | Delete
__major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); \
[42] Fix | Delete
__major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); \
[43] Fix | Delete
return __major; \
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
#define __SYSMACROS_DECLARE_MINOR(DECL_TEMPL) \
[47] Fix | Delete
DECL_TEMPL(unsigned int, minor, (__dev_t __dev))
[48] Fix | Delete
[49] Fix | Delete
#define __SYSMACROS_DEFINE_MINOR(DECL_TEMPL) \
[50] Fix | Delete
__SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \
[51] Fix | Delete
{ \
[52] Fix | Delete
unsigned int __minor; \
[53] Fix | Delete
__minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); \
[54] Fix | Delete
__minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); \
[55] Fix | Delete
return __minor; \
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
#define __SYSMACROS_DECLARE_MAKEDEV(DECL_TEMPL) \
[59] Fix | Delete
DECL_TEMPL(__dev_t, makedev, (unsigned int __major, unsigned int __minor))
[60] Fix | Delete
[61] Fix | Delete
#define __SYSMACROS_DEFINE_MAKEDEV(DECL_TEMPL) \
[62] Fix | Delete
__SYSMACROS_DECLARE_MAKEDEV (DECL_TEMPL) \
[63] Fix | Delete
{ \
[64] Fix | Delete
__dev_t __dev; \
[65] Fix | Delete
__dev = (((__dev_t) (__major & 0x00000fffu)) << 8); \
[66] Fix | Delete
__dev |= (((__dev_t) (__major & 0xfffff000u)) << 32); \
[67] Fix | Delete
__dev |= (((__dev_t) (__minor & 0x000000ffu)) << 0); \
[68] Fix | Delete
__dev |= (((__dev_t) (__minor & 0xffffff00u)) << 12); \
[69] Fix | Delete
return __dev; \
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
#endif /* bits/sysmacros.h */
[73] Fix | Delete
[74] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function