当前位置: 技术问答>linux和unix
如何用函数mount iso或者nfs?
来源: 互联网 发布时间:2016-05-15
本文导语: 在shell下,可以用mount -o nolock 192.168.018.4:/home /mnt/nfs 来mount nfs服务器 但是用mount函数怎么把nolock这个参数表现出来 还有iso是用mount -o loop path /mnt/iso/ 那函数怎么调用这个loop呢 简单的说,就是mount函数怎...
在shell下,可以用mount -o nolock 192.168.018.4:/home /mnt/nfs 来mount nfs服务器
但是用mount函数怎么把nolock这个参数表现出来
还有iso是用mount -o loop path /mnt/iso/
那函数怎么调用这个loop呢
简单的说,就是mount函数怎么实现在shell中mount命令的功能
但是用mount函数怎么把nolock这个参数表现出来
还有iso是用mount -o loop path /mnt/iso/
那函数怎么调用这个loop呢
简单的说,就是mount函数怎么实现在shell中mount命令的功能
|
int mount(const char *source, const char *target, const char *filesys-
temtype, unsigned long mountflags, const void *data);
source:源
target:目的
filesys-temtype:Values for the filesystemtype argument supported by the kernel are
listed in /proc/filesystems (like "minix", "ext2", "msdos", "proc",
"nfs", "iso9660" etc.). Further types may become available when the
appropriate modules are loaded.
mountflags:....
data:命令中的 -0参数 ,我的理解是 nolock放在 data数据中吧。
只了解个皮毛,抛砖引线吧。
http://topic.csdn.net/u/20081230/19/5656fe29-9dd0-4174-8501-809facf433c2.html 好像和你问题挺象的
temtype, unsigned long mountflags, const void *data);
source:源
target:目的
filesys-temtype:Values for the filesystemtype argument supported by the kernel are
listed in /proc/filesystems (like "minix", "ext2", "msdos", "proc",
"nfs", "iso9660" etc.). Further types may become available when the
appropriate modules are loaded.
mountflags:....
data:命令中的 -0参数 ,我的理解是 nolock放在 data数据中吧。
只了解个皮毛,抛砖引线吧。
http://topic.csdn.net/u/20081230/19/5656fe29-9dd0-4174-8501-809facf433c2.html 好像和你问题挺象的
|
我也在那个帖子里答复过了:
man 2 mount和 man 8 mount
filesystemtype:
Values for the filesystemtype argument supported by the kernel are listed in /proc/filesystems (like "minix",
"ext2", "msdos", "proc", "nfs", "iso9660" etc.). Further types may become available when the appropriate modules
are loaded.
内核必须要先支持的
mountflags:
man 2 mount去看
data:
The data argument is interpreted by the different file systems. Typically it is a string of comma-separated
options understood by this file system. See mount(8) for details of the options available for each filesystem
type.
man 2 mount和 man 8 mount
filesystemtype:
Values for the filesystemtype argument supported by the kernel are listed in /proc/filesystems (like "minix",
"ext2", "msdos", "proc", "nfs", "iso9660" etc.). Further types may become available when the appropriate modules
are loaded.
内核必须要先支持的
mountflags:
man 2 mount去看
data:
The data argument is interpreted by the different file systems. Typically it is a string of comma-separated
options understood by this file system. See mount(8) for details of the options available for each filesystem
type.