Linux mount函数问题

晓敬 晓敬 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

#include <iostream>
#include <stdio.h>
#include <sys/mount.h>

int main(){
int mountfd = mount("/dev/sda10","/mnt/","vfat",MS_SYNCHRONOUS,"iocharse t=utf-8");
std::cout << mountfd << std::endl;
std::cout << MS_SYNCHRONOUS << std::endl;
perror("mount");
return 0;
}

程序运行之后返回的结果是:
mountfd = -1
MS_SYNCHRONOUS = 16
mount: Invalid argument
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
晓敬
Linux/Unix社区 23,224 成员 74,535 内容