make_dev.9 (a0942a6000928264f437f48cc6499faa97ed054f) make_dev.9 (c97dc39f0211d44537ca2fc9e738c86763a69f6a)
1.\" Copyright (c) 1999 Chris Costello
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 19 unchanged lines hidden (view full) ---

28.Os
29.Dt MAKE_DEV 9
30.Sh NAME
31.Nm make_dev ,
32.Nm make_dev_alias ,
33.Nm destroy_dev ,
34.Nm dev_depends
35.Nd manage
1.\" Copyright (c) 1999 Chris Costello
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 19 unchanged lines hidden (view full) ---

28.Os
29.Dt MAKE_DEV 9
30.Sh NAME
31.Nm make_dev ,
32.Nm make_dev_alias ,
33.Nm destroy_dev ,
34.Nm dev_depends
35.Nd manage
36.Vt dev_t Ns 's
36.Vt cdev Ns 's
37and DEVFS registration for devices
38.Sh SYNOPSIS
39.In sys/param.h
40.In sys/conf.h
37and DEVFS registration for devices
38.Sh SYNOPSIS
39.In sys/param.h
40.In sys/conf.h
41.Ft dev_t
41.Ft struct cdev
42.Fn make_dev "struct cdevsw *cdevsw" "int minor" "uid_t uid" "gid_t gid" "int perms" "const char *fmt" ...
42.Fn make_dev "struct cdevsw *cdevsw" "int minor" "uid_t uid" "gid_t gid" "int perms" "const char *fmt" ...
43.Ft dev_t
44.Fn make_dev_alias "dev_t pdev" "const char *fmt" ...
43.Ft struct cdev
44.Fn make_dev_alias "struct cdev pdev" "const char *fmt" ...
45.Ft void
45.Ft void
46.Fn destroy_dev "dev_t dev"
46.Fn destroy_dev "struct cdev dev"
47.Ft void
47.Ft void
48.Fn dev_depends "dev_t pdev" "dev_t cdev"
48.Fn dev_depends "struct cdev pdev" "struct cdev cdev"
49.Sh DESCRIPTION
50The
51.Fn make_dev
52function creates a
49.Sh DESCRIPTION
50The
51.Fn make_dev
52function creates a
53.Fa dev_t
53.Fa cdev
54structure for a new device.
55If DEVFS is available, it is also notified of
56the presence of the new device.
57The device will be owned by
58.Va uid ,
59with the group ownership as
60.Va gid ,
61and with the name as specified in

--- 25 unchanged lines hidden (view full) ---

87#ifndef _POSIX_SOURCE
88#define S_ISTXT 0001000
89#endif
90.Ed
91.Pp
92The
93.Fn make_dev_alias
94function takes the returned
54structure for a new device.
55If DEVFS is available, it is also notified of
56the presence of the new device.
57The device will be owned by
58.Va uid ,
59with the group ownership as
60.Va gid ,
61and with the name as specified in

--- 25 unchanged lines hidden (view full) ---

87#ifndef _POSIX_SOURCE
88#define S_ISTXT 0001000
89#endif
90.Ed
91.Pp
92The
93.Fn make_dev_alias
94function takes the returned
95.Ft dev_t
95.Ft cdev
96from
97.Fn make_dev
98and makes another (aliased) name for this device.
99It is an error to call
100.Fn make_dev_alias
101prior to calling
102.Fn make_dev .
103.Pp
104The
105.Fn destroy_dev
106function takes the returned
96from
97.Fn make_dev
98and makes another (aliased) name for this device.
99It is an error to call
100.Fn make_dev_alias
101prior to calling
102.Fn make_dev .
103.Pp
104The
105.Fn destroy_dev
106function takes the returned
107.Fa dev_t
107.Fa cdev
108from
109.Fn make_dev
110and destroys the registration for that device.
111Do not call
112.Fn destroy_dev
113on devices that were created with
114.Fn make_dev_alias .
115.Pp

--- 27 unchanged lines hidden ---
108from
109.Fn make_dev
110and destroys the registration for that device.
111Do not call
112.Fn destroy_dev
113on devices that were created with
114.Fn make_dev_alias .
115.Pp

--- 27 unchanged lines hidden ---