|
From: Nicolas H. <nhu...@gh...> - 2003-09-02 14:01:02
|
Paul Alfille wrote:
> Any idea what "function" needs to be implemented? fstat?
Maybe "statfs, fstatfs - get file system statistics" ?
Extract of man page :
------------------------------------------------------
STATFS(2) Linux Programmer's Manual
STATFS(2)
NAME
statfs, fstatfs - get file system statistics
SYNOPSIS
#include <sys/vfs.h>
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);
DESCRIPTION
statfs returns information about a mounted file system. path
is the path name of any file within the mounted filesystem. buf is a
pointer to a statfs structure defined
as follows:
------------------------------------------------------
The user command "stat" gives the following good results on either
device dirs or files (besides the date already stated) :
[nhuillard@palma:devices]$ stat DS9097U
File: "DS9097U"
Size: 0 Blocks: 0 IO Block: 4096 Directory
Device: 9h/9d Inode: 226 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: Thu Jan 1 01:00:00 1970
Modify: Thu Jan 1 01:00:00 1970
Change: Thu Jan 1 01:00:00 1970
[nhuillard@palma:devices]$ stat 01.7E54CC080000
File: "01.7E54CC080000"
Size: 0 Blocks: 0 IO Block: 4096 Directory
Device: 9h/9d Inode: 229 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: Thu Jan 1 01:00:00 1970
Modify: Thu Jan 1 01:00:00 1970
Change: Thu Jan 1 01:00:00 1970
[nhuillard@palma:devices]$ stat 10.629F54000800/tempC
File: "10.629F54000800/tempC"
Size: 32 Blocks: 0 IO Block: 4096 Regular File
Device: 9h/9d Inode: 240 Links: 1
Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: Thu Jan 1 01:00:00 1970
Modify: Thu Jan 1 01:00:00 1970
Change: Thu Jan 1 01:00:00 1970
[nhuillard@palma:devices]$ stat 10.629F54000800/crc8
File: "10.629F54000800/crc8"
Size: 2 Blocks: 0 IO Block: 4096 Regular File
Device: 9h/9d Inode: 241 Links: 1
Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: Thu Jan 1 01:00:00 1970
Modify: Thu Jan 1 01:00:00 1970
Change: Thu Jan 1 01:00:00 1970
NH
|