FreeBSD Bugzilla – Attachment 184797 Details for
Bug 221048
minor() truncates device number to 32 bits, whereas dev_t type was extended to 64 bits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Change major()/minor() to work with 64bit dev_t.
1.patch (text/plain), 875 bytes, created by
Konstantin Belousov
on 2017-07-28 12:42:27 UTC
(
hide
)
Description:
Change major()/minor() to work with 64bit dev_t.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2017-07-28 12:42:27 UTC
Size:
875 bytes
patch
obsolete
>diff --git a/sys/sys/types.h b/sys/sys/types.h >index 8d0af5713b4..fce57e412ed 100644 >--- a/sys/sys/types.h >+++ b/sys/sys/types.h >@@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > #include <sys/select.h> > >-/* >- * minor() gives a cookie instead of an index since we don't want to >- * change the meanings of bits 0-15 or waste time and space shifting >- * bits 16-31 for devices that don't use them. >- */ >-#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ >-#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ >-#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ >+#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ >+#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ >+#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > > /* > * These declarations belong elsewhere, but are repeated here and in
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 221048
: 184797