Linux stat64 这是什么风格
linux stat64 what style is this?
你好朋友们,我跟踪我的安卓恢复 n 找到了这个
open("/dev/tty0",
O_RDWR|O_DSYNC|O_LARGEFILE) = 3
ioctl(3, KDSETMODE, 0x1) = 0
stat64("/dev/late_display/control",
{st_mode=S_IFCHR|0660,
st_rdev=makedev(248, 0), ...}) = 0
write(2, "splash screen display", 21) = 21
write(2, ": ", 2) = 2
write(2, "No such file or directory", 25) = 25
write(2, "n", 1) = 1
open("/dev/late_display/control",
O_RDONLY|O_LARGEFILE) = 4
ioctl(4, SNDCTL_SEQ_SYNC, 0) = 0
close(4) = 0
stat64("/dev/graphics/fb0",
{st_mode=S_IFCHR|0660,
st_rdev=makedev(29, 0), ...}) = 0
open("/dev/graphics/fb0",
O_RDWR|O_LARGEFILE) = 4
我的问题是这是什么程序在 C 中这一行,我写得一样,但它在 { token 之前给出了错误的预期表达式,因此我的构建 CWM 无法找到 FB0 帧缓冲区。谢谢
stat64("/dev/late_display/control",
{st_mode=S_IFCHR|0660,
st_rdev=makedev(248, 0), ...})
这是
使用stat
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
int main()
{
struct stat buf;
const char *filename = "/dev/late_display/control";
if(stat(filename, &buf) != 0)
{
perror("stat");
return 1;
}
printf("stat succeededn");
return 0;
}
手册页是这些功能的绝佳参考man 2 stat
相关文章:
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- C++避免重复声明的语法是什么
- 在C++中,将大的无符号浮点数四舍五入为整数的最佳方法是什么
- 实现无开销push_back的最佳方法是什么
- C++从另一个类访问公共静态向量的正确方法是什么
- "throw expression code" 1e7 >返回 d 是什么?投掷标准::overflow_error( "too big" ) : d;意味 着?
- C++中名称篡改的目的是什么
- 在 c++ 中拥有一组结构的正确方法是什么?
- 这个指针和内存代码打印是什么?我不知道是打印垃圾还是如何打印我需要的值
- 是什么阻止DOMTimerCoordinator::NextID进入无休止的循环
- 派生类销毁的最佳实践是什么
- 这个语法std::class<>{}(arg1, arg2) 在C++中是什么意思?
- 通过JNI传递数据数组的最快方法是什么
- "using namespace std;"在C++的作用是什么?
- Linux stat64 这是什么风格
- Metro 风格混合应用 - C# + WebViews vs. JavaScript + WinRT C++ - 最佳选择是什么?
- 比较两个C风格字符串的正确函数是什么
- 在Google c++风格指南中引用的对象所有者是什么?
- Boost::asio这种奇怪的编码风格是什么
- 公开自定义stl风格迭代的首选方式是什么?