技术控

    今日:35| 主题:49312
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Writing a macOS Filesystem – A Base Project

[复制链接]
淡笑忘 发表于 2016-10-4 04:22:41
175 3

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
I’ve pushed a basic remote macOS filesystem project to GitHub. Its got all the bits and pieces necessary to work but I haven’t audited all parts of it for correctness. I’ll do that as I start implementing each area. What’s complete is all the project infrastructure to do filesystem and kernel development. I can’t stress enough the importance of taking care of your development environment to get the code, compile, deploy/test, debug cycle working as fast as possible. I can go from a fresh checkout to compiled, deployed, unit tested (yes you can unit test in the kernel), and remote filesystem mounted in under a minute. There’s a lot going on to make the above happen as you will see.
  What’s In The Box

  To get a working macOS filesystem you need three things: filesystem, kernel extension and NetFS plugin. Now the last one isn’t technically necessary but if you’re being a good steward of the platform you should include it.
  Filesystem

     
Writing a macOS Filesystem – A Base Project-1 (necessary,checkout,deployed,possible,minute)
   This is what lives in the /Library/Filesystems folder. You can see the shipped filesystems by looking at /System/Library/Filesystems. For the most part there isn’t much code here. What you’ll find is the very important Info.plist describing the filesystem and
   associated utilities such as mount, fsck, newfs, etc. Since Lustre is a remote filesystem we just have mount.
    Extension

Writing a macOS Filesystem – A Base Project-2 (necessary,checkout,deployed,possible,minute)

  The core of how a filesystem is implemented in it’s kernel extension. This lives in the /Library/Extensions folder and is structured like any other kernel extension. There’s one important difference from most other kernel extensions though. In the Info.plist there’s this:
  [code]OSBundleAllowUserLoad
[/code]  If you plan to have a filesystem which may be mounted by normal (non-Admin) users, they need to be able to load the associated kernel extension. This key allows that to happen.
  NetFS Plugin
123下一页
友荐云推荐




上一篇:The SVG `path` Syntax: An Illustrated Guide
下一篇:Exfiltrating files with BusyBox
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

thpaf 发表于 2016-10-11 12:32:52
开启抢楼模式,楼下速度跟上!
回复 支持 反对

使用道具 举报

姜雨城 发表于 2016-10-11 12:49:29
加关注!
回复 支持 反对

使用道具 举报

爱生活爱SEO 发表于 2016-11-18 15:35:52
牛人 佩服!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表