Reorder ptyfs pseudo inode numbers so that 0 and 1 are unused, 2 is
the root of the file system, and slaves and masters alternate starting at 3. This means the inode numbers won't be really large until you really allocate a really lot of ptys.
This commit is contained in:
parent
817b002242
commit
c64e485f42
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ptyfs.h,v 1.2 2004/11/25 05:15:10 christos Exp $ */
|
||||
/* $NetBSD: ptyfs.h,v 1.3 2004/12/16 05:30:18 atatat Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993
|
||||
|
@ -127,7 +127,8 @@ struct ptyfs_args {
|
|||
#define UIO_MX 32
|
||||
|
||||
#define PTYFS_FILENO(pty, type) \
|
||||
((((uint32_t)type) << 30) | (pty + 1))
|
||||
((type == PTYFSroot) ? 2 : \
|
||||
((((pty) + 1) * 2 + (((type) == PTYFSpts) ? 1 : 2))))
|
||||
|
||||
#define PTYFS_MAKEDEV(ptyfs) \
|
||||
pty_makedev((ptyfs)->ptyfs_type == PTYFSpts ? 't' : 'p', (ptyfs)->ptyfs_pty)
|
||||
|
|
Loading…
Reference in New Issue