statvfs()和体statfs()系统调用之间的区别? [英] Difference between statvfs() and statfs() system calls?

查看:3067
本文介绍了statvfs()和体statfs()系统调用之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在 体statfs() statvfs() 同时呼吁时,他们存在如此相似?

Why do the statfs() and statvfs() calls both exist when they're so similar?

在什么情况下我preFER一个比其他?

Under what circumstances would I prefer one over the other?

推荐答案


犯错,历史原因。

最初4.4BSD定义的体statfs()电话。后来的Linux实现具有相同名称略有不同的呼叫。 POSIX通过定义 statvfs()

Originally 4.4BSD defined a statfs() call. Linux later implemented a slightly different call with the same name. Posix standardized it between all freenix and Unix versions by defining statvfs().

体statfs()和具体的操作系统

statvfs()是符合POSIX

由于他们都返回略有不同的结构,后来者一起去不能取代第一。

As they all return slightly different structures, later ones to come along can't replace the first.

在一般你应该使用 statvfs(),POSIX的之一。小心使用POSIX的意见,不过,在某些情况下(PTY,例如)BSD(或其他)一个是在实践中更加便于携带。

In general you should use statvfs(), the Posix one. Be careful about "use Posix" advice, though, as in some cases (pty, for example) the BSD (or whatever) one is more portable in practice.

这篇关于statvfs()和体statfs()系统调用之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆