⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lis_mknod.9

📁 7号信令功能代码,为开源代码
💻 9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) lis_mknod.9,v 1.1.4.1 2004/01/12 23:33:04 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004  OpenSS7 Corp. <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date.  The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein.  The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" =========================================================================.\".\" Modified 2004/01/12 23:33:04 by brian.\".\" =========================================================================.so lis.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase lis.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".TH MKNOD 9 "2004/01/12 23:33:04" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH NAME.B mknod, lis_mknod\- create a special or ordinary file.SH SYNOPSIS.PP.B #include <sys/stream.h>.br.B #include <sys/dki.h>.HP 8.BI "int " retval " = lis_mknod(const char *" pathname ", mode_t " mode ", dev_t " dev );.SH DESCRIPTION.BR mknod ()is an.B LiS.[LiS.]wrapper function to the system call.BR mknod (2)that can be called from the kernel..PPThe purpose of this kernel function call is to permit.IR STREAMS (4)kernel modules to create their own character special devices.  This allows the.IR STREAMS (4)device driver to allocate a character device major number at kernel moduleinitialization, see.BR lis_register_strdev (9),and create the necessary character special file entires in.B /devafter the major number has been allocated.  This avoids fixed allocation ofcharacter device major numbers within the.B Linuxkernel..PP.BR mknod ()takes the same arguments as.BR mknod (2)..PP.I pathnameis a string which describes the path to the file..PP.I modeis the bitwise OR combination of the file type and permissions.  The file typeis one of the following:.TP 10.B S_IFREGNormal file to be created empty..TP 10.B S_IFCHRCharacter special file..TP 10.B S_IFBLKBlock special file..TP 10.B S_IFIFOFIFO named pipe..TP 10.B S_IFSOCKSocket..PPThe permissions is the normal combination of the file permissions and thecaller'spermissions:.BR "" ( "mode & ~umask" )..PP.I devis used only if the file type in.I modeis either.BR S_IFCHR " or " S_IFBLK ;where it specifies the combination of device major and device minor numbers.For other file types.I devis ignored..PPFor additional information, see.BR mknod (2)..SH "RETURN VALUE".PPUpon success, the requested file is created and.BR mknod ()returns zero (0).Upon failure, no file is created and.BR mknod ()returns a negative error number..SH ERRORS.PPWhen.BR mknod ()fails, it returns a negative error number that can contain any of the errorslisted under.BR mknod (2)..SH CAVEATS.BR mknod ()is implemented by changing the data segment to the kernel data segment andcalling.BR mount (2).This means that the.BR uid " and " euidof the caller is not changed.This makes this function rather useless if the process invoking it is not thekernel module loading daemon, or other process running with real rootpermission..SH "SEE ALSO".PP.BR mknod (2),.BR lis_mount (9),.BR lis_umount2 (9),.BR lis_unlink (9)..SH VERSIONS.PPThis manpage was written for.B LiS\c..[LiS.].PP.BR mknod ()appeared in SVR 2..\".\".XX.[magic.].[svr42.].[svr4.].\".\".[$LIST$.].TA

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -