forked from ish-app/ish
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add devices.h, replace magic dev numbers with defines
- Loading branch information
Showing
15 changed files
with
103 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
// Pasteboard is implementation of /dev/clipboard device | ||
|
||
#define CLIPBOARD_DEV_MINOR 0 | ||
|
||
extern struct dev_ops clipboard_dev; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef FS_DEVICES_H | ||
#define FS_DEVICES_H | ||
|
||
// losely based on devices.txt from linux | ||
|
||
// --- memory devices --- | ||
#define MEM_MAJOR 1 | ||
// /dev/null | ||
#define DEV_NULL_MINOR 3 | ||
// /dev/zero | ||
#define DEV_ZERO_MINOR 5 | ||
// /dev/full | ||
#define DEV_FULL_MINOR 7 | ||
// /dev/random | ||
#define DEV_RANDOM_MINOR 8 | ||
// /dev/urandom | ||
#define DEV_URANDOM_MINOR 9 | ||
|
||
// --- tty devices --- | ||
// /dev/ttyX where X is minor | ||
#define TTY_CONSOLE_MAJOR 4 | ||
|
||
// --- alternate tty devices --- | ||
#define TTY_ALTERNATE_MAJOR 5 | ||
// /dev/tty | ||
#define DEV_TTY_MINOR 0 | ||
// /dev/console | ||
#define DEV_CONSOLE_MINOR 1 | ||
// /dev/ptmx | ||
#define DEV_PTMX_MINOR 2 | ||
|
||
// --- pseudo tty devices --- | ||
#define TTY_PSEUDO_MASTER_MAJOR 128 | ||
#define TTY_PSEUDO_SLAVE_MAJOR 136 | ||
|
||
// --- dynamic devices --- | ||
#define DYN_DEV_MAJOR 240 | ||
|
||
// /dev/clipboard | ||
#define DEV_CLIPBOARD_MINOR 0 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters