Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaerr committed Sep 8, 2023
1 parent cba5ce8 commit 65e1fea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions elks/include/linuxmt/kdev_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#define __LINUXMT_KDEV_T_H

/* Some programs want their definitions of MAJOR and MINOR and MKDEV
* from the kernel sources.
* from the kernel sources. Here we use unsigned short instead of __u16.
*/
#define MINORBITS 8
#define MINORMASK ((1 << MINORBITS) - 1)
#define MAJOR(dev) ((__u16) ((dev) >> MINORBITS))
#define MINOR(dev) ((__u16) ((dev) & MINORMASK))
#define MKDEV(major,minor) ((__u16) (((major) << MINORBITS) | (minor)))
#define MAJOR(dev) ((unsigned short) ((dev) >> MINORBITS))
#define MINOR(dev) ((unsigned short) ((dev) & MINORMASK))
#define MKDEV(major,minor) ((unsigned short) (((major) << MINORBITS) | (minor)))
#define NODEV MKDEV(0,0)

#ifdef __KERNEL__
Expand Down

0 comments on commit 65e1fea

Please sign in to comment.