make_dev.9 (94b1839d20ddac8b097319032bce4e9af74904f4) | make_dev.9 (bd00dbfafc21d67f71804cf71ad2c259d1f8e196) |
---|---|
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. --- 15 unchanged lines hidden (view full) --- 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd September 25, 1999 28.Os 29.Dt MAKE_DEV 9 30.Sh NAME 31.Nm make_dev , | 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. --- 15 unchanged lines hidden (view full) --- 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd September 25, 1999 28.Os 29.Dt MAKE_DEV 9 30.Sh NAME 31.Nm make_dev , |
32.Nm remove_dev 33.Nd "Create or remove dev_t and devfs registration for a new device" | 32.Nm destroy_dev 33.Nd "Create or destroy dev_t and devfs registration for a new device" |
34.Sh SYNOPSIS 35.Fd #include <sys/types.h> 36.Fd #include <sys/conf.h> 37.Ft dev_t | 34.Sh SYNOPSIS 35.Fd #include <sys/types.h> 36.Fd #include <sys/conf.h> 37.Ft dev_t |
38.Fn make_dev "struct cdevsw *devsw" "int minor" "uid_t uid" "gid_t gid" "int perms" "char *fmt" ... | 38.Fn make_dev "struct cdevsw *cdevsw" "int minor" "uid_t uid" "gid_t gid" "int perms" "char *fmt" ... |
39.Ft void | 39.Ft void |
40.Fn remove_dev "dev_t dev" | 40.Fn destroy_dev "dev_t dev" |
41.Sh DESCRIPTION 42The 43.Fn make_dev 44function creates a 45.Fa dev_t 46structure for a new device. If DEVFS is available, it is also notified of 47the presence of the new device. The device will be owned by 48.Va uid , --- 26 unchanged lines hidden (view full) --- 75#define S_ISGID 0002000 /* set group id on execution */ 76#define S_ISVTX 0001000 /* sticky bit */ 77#ifndef _POSIX_SOURCE 78#define S_ISTXT 0001000 79#endif 80.Ed 81.Pp 82The | 41.Sh DESCRIPTION 42The 43.Fn make_dev 44function creates a 45.Fa dev_t 46structure for a new device. If DEVFS is available, it is also notified of 47the presence of the new device. The device will be owned by 48.Va uid , --- 26 unchanged lines hidden (view full) --- 75#define S_ISGID 0002000 /* set group id on execution */ 76#define S_ISVTX 0001000 /* sticky bit */ 77#ifndef _POSIX_SOURCE 78#define S_ISTXT 0001000 79#endif 80.Ed 81.Pp 82The |
83.Fn remove_dev | 83.Fn destroy_dev |
84function takes the returned 85.Fa dev_t 86from 87.Fn make_dev | 84function takes the returned 85.Fa dev_t 86from 87.Fn make_dev |
88and removes the registration for that device. | 88and destroys the registration for that device. |
89.Sh HISTORY 90The 91.Fn make_dev 92and | 89.Sh HISTORY 90The 91.Fn make_dev 92and |
93.Fn remove_dev | 93.Fn destroy_dev |
94functions first appeared in 95.Fx 4.0 . | 94functions first appeared in 95.Fx 4.0 . |