autofs 源码分析
时间:2007-01-22 来源:renzy
1. 挂载是在 文件modules\mount_generic.c
建目录
status = mkdir_path(fullpath, 0555);
挂载
err = spawnll(LOG_NOTICE,PATH_MOUNT, PATH_MOUNT, "-t", fstype,SLOPPYOPT "-o",options, what, fullpath, NULL);
2.卸载是在 daemon\automount.c
left = umount_multi(ap.path, 0);
==================================
spawnll这段代码写得比较有意思,将另一个程序的输出到stdio的东西拦截下来。
相关阅读 更多 +