File: filesystem.C

package info (click to toggle)
librudiments0 0.27-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,528 kB
  • ctags: 2,284
  • sloc: cpp: 14,657; sh: 7,547; ansic: 2,664; makefile: 945; xml: 15
file content (53 lines) | stat: -rw-r--r-- 1,487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2003  David Muse
// See the file COPYING for more information

#include <rudiments/filesystem.h>
#include <stdio.h>

int main(int argc, const char **argv) {

	filesystem	fs;
	fs.initialize("/");

	printf("root fileststem stats:\n");
	printf("	type:				0x%08x\n",
				fs.getType());
	printf("	block size:			%ld\n",
				fs.getBlockSize());
	printf("	optimum tranfer block size:	%ld\n",
				fs.getOptimumTransferBlockSize());
	printf("	total blocks:			%ld\n",
				fs.getTotalBlocks());
	printf("	free blocks:			%ld\n",
				fs.getFreeBlocks());
	printf("	available blocks:		%ld\n",
				fs.getAvailableBlocks());
	printf("	total nodes:			%ld\n",
				fs.getTotalFileNodes());
	printf("	free nodes:			%ld\n",
				fs.getFreeFileNodes());
	printf("	available nodes:		%ld\n",
				fs.getAvailableFileNodes());
	printf("	filesystem id:			%ld\n",
				fs.getFileSystemId());
	printf("	maximum file name length:	%ld\n",
				fs.getMaximumFileNameLength());
	printf("	owner:				%ld\n",
				fs.getOwner());
	printf("	sync writes:			%ld\n",
				fs.getSyncWrites());
	printf("	async writes:			%ld\n",
				fs.getAsyncWrites());
	printf("	fs type name:			%s\n",
				fs.getTypeName());
	printf("	mount point:			%s\n",
				fs.getMountPoint());
	printf("	sync reads:			%ld\n",
				fs.getSyncReads());
	printf("	async reads:			%ld\n",
				fs.getAsyncReads());
	printf("	device name:			%s\n",
				fs.getDeviceName());
	printf("	fs specific string:		%s\n",
				fs.getFilesystemSpecificString());
}