File: sysfs.2

package info (click to toggle)
man-pages-it 2.80-3
  • links: PTS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 1,660 kB
  • ctags: 13
  • sloc: makefile: 109
file content (107 lines) | stat: -rw-r--r-- 3,199 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Created   Wed Aug  9 1995     Thomas K. Dyas <tdyas@eden.rutgers.edu>
.\"
.\" FIXME -- I can't find this in SVr4!
.\"
.\" Tradotto da Goffredo Baroncelli il 21/4/1998 <kreijack@usa.net>
.\" Aggiornamento a man-pages-2.11 di Giulio Daprel <giulio@pluto.it>
.\" novembre 2005
.\"
.TH SYSFS 2 "9 agosto 1995" "Linux 1.3.16" "Linux Programmer's Manual"
.SH NOME
sysfs \- acquisisce informazioni sul file system
.SH SINTASSI
.BI "int sysfs(int " option ", const char *" fsname );

.BI "int sysfs(int " option ", unsigned int " fs_index ", char *" buf );

.BI "int sysfs(int " option );
.SH DESCRIZIONE
.BR sysfs ()
restituisce informazioni sui tipi di file system presenti nel kernel.
La sintassi della chiamata di sistema
.BR sysfs ()
dipende dal parametro
.I option
:

.TP
.B 1
Converte la stringa identificatrice del file system
.I fsname
in un indice che identifica il file system.
.TP
.B 2
Converte un'indice di un file-system 
.I fs_index
in una stringa terminata con un byte nul. Questa stringa viene scritta nel 
buffer a cui punta
.IR buf .
Assicurarsi che
.I buf
abbia abbastanza spazio per accettare la stringa.
.TP
.B 3
Restituisce il numero di tipi di file-system presenti nel kernel.

.PP
La numerazione degli indici dei tipi di file system presenti incomincia 
da zero.
.SH "VALORI RESTITUITI"
In caso di successo
.BR sysfs ()
restituisce l'indice del file system con l'opzione
.BR 1 ,
zero con l'opzione
.BR 2 ,
e il numero del file systems attualmente configurato con l'opzione
.BR 3 .
In caso di errore viene restituito \-1, e viene impostato
.I errno .
.SH ERRORI
.TP
.B EFAULT
.RI "O " fsname " o " buf
sono al di fuori del proprio spazio di indirizzamento accessibile.
.TP
.B EINVAL
.I fsname
non  un identificatore valido di file system;
.I fs_index
 fuori dai limiti;
.I option
non  valida.
.PP
.SH "CONFORME A"
SVr4.
.SH NOTA
Su Linux, con il filesystem
.I proc
montato su
.IR /proc ,
la stessa informazione pu essere ricavata da
.IR /proc/filesystems .
.SH BACHI
Non c' supporto a libc o glibc.
Non c' modo di capire quanto deve essere grande \fIbuf\fP.