OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [doc/] [filesystem/] [fsrequirements.t] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c  COPYRIGHT (c) 1988-2002.
3
@c  On-Line Applications Research Corporation (OAR).
4
@c  All rights reserved.
5
@c
6
@c  fsrequirements.t,v 1.9 2002/01/17 21:47:44 joel Exp
7
@c
8
 
9
 
10
@chapter Filesystem Implementation Requirements
11
 
12
This chapter details the behavioral requirements that all filesystem
13
implementations must adhere to.
14
 
15
@section General
16
 
17
The RTEMS filesystem framework was intended to be compliant with the
18
POSIX Files and Directories interface standard. The following filesystem
19
characteristics resulted in a functional switching layer.
20
 
21
@example
22
Figure of the Filesystem Functional Layering goes here.
23
This figure includes networking and disk caching layering.
24
@end example
25
 
26
@ifset use-ascii
27
@example
28
@group
29
@end group
30
@end example
31
@end ifset
32
 
33
@ifset use-tex
34
@c @image{FunctionalLayerCake,6in,4in}
35
@end ifset
36
 
37
@ifset use-html
38
@end ifset
39
 
40
@enumerate
41
 
42
@item Application programs are presented with a standard set of POSIX
43
compliant functions that allow them to interface with the files, devices
44
and directories in the filesystem. The interfaces to these routines do
45
not reflect the type of subordinate filesystem implementation in which
46
the file will be found.
47
 
48
@item The filesystem framework developed under RTEMS allows for mounting
49
filesystem of different types under the base filesystem.
50
 
51
@item The mechanics of locating file information may be quite different
52
between filesystem types.
53
 
54
@item The process of locating a file may require crossing filesystem
55
boundaries.
56
 
57
@item The transitions between filesystem and the processing required to
58
access information in different filesystem is not visible at the level
59
of the POSIX function call.
60
 
61
@item The POSIX interface standard provides file access by character
62
pathname to the file in some functions and through an integer file
63
descriptor in other functions.
64
 
65
@item The nature of the integer file descriptor and its associated
66
processing is operating system and filesystem specific.
67
 
68
@item Directory and device information must be processed with some of the
69
same routines that apply to files.
70
 
71
@item The form and content of directory and device information differs
72
greatly from that of a regular file.
73
 
74
@item Files, directories and devices represent elements (nodes) of a tree
75
hierarchy.
76
 
77
@item The rules for processing each of the node types that exist under the
78
filesystem are node specific but are still not reflected in the POSIX
79
interface routines.
80
 
81
@end enumerate
82
 
83
 
84
@example
85
Figure of the Filesystem Functional Layering goes here.
86
This figure focuses on the Base Filesystem and IMFS.
87
@end example
88
 
89
@example
90
Figure of the IMFS Memfile control blocks
91
@end example
92
 
93
@section File and Directory Removal Constraints
94
 
95
The following POSIX constraints must be honored by all filesystems.
96
 
97
@itemize @bullet
98
 
99
@item If a node is a directory with children it cannot be removed.
100
 
101
@item The root node of any filesystem, whether the base filesystem or a
102
mounted filesystem, cannot be removed.
103
 
104
@item A node that is a directory that is acting as the mount point of a file
105
system cannot be removed.
106
 
107
@item On filesystems supporting hard links, a link count is maintained.
108
Prior to node removal, the node's link count is decremented by one.  The
109
link count must be less than one to allow for removal of the node.
110
 
111
@end itemize
112
 
113
@c
114
@c
115
@c
116
@section API Layering
117
 
118
@subsection Mapping of Generic System Calls to Filesystem Specific Functions
119
 
120
The list of generic system calls includes the routines open(), read(),
121
write(), close(), etc..
122
 
123
The Files and Directories section of the POSIX Application Programs
124
Interface specifies a set of functions with calling arguments that are
125
used to gain access to the information in a filesystem. To the
126
application program, these functions allow access to information in any
127
mounted filesystem without explicit knowledge of the filesystem type or
128
the filesystem mount configuration. The following are functions that are
129
provided to the application:
130
 
131
@enumerate
132
@item access()
133
@item chdir()
134
@item chmod()
135
@item chown()
136
@item close()
137
@item closedir()
138
@item fchmod()
139
@item fcntl()
140
@item fdatasync()
141
@item fpathconf()
142
@item fstat()
143
@item fsync()
144
@item ftruncate()
145
@item link()
146
@item lseek()
147
@item mkdir()
148
@item mknod()
149
@item mount()
150
@item open()
151
@item opendir()
152
@item pathconf()
153
@item read()
154
@item readdir()
155
@item rewinddir()
156
@item rmdir()
157
@item rmnod()
158
@item scandir()
159
@item seekdir()
160
@item stat()
161
@item telldir()
162
@item umask()
163
@item unlink()
164
@item unmount()
165
@item utime()
166
@item write()
167
@end enumerate
168
 
169
The filesystem's type as well as the node type within the filesystem
170
determine the nature of the processing that must be performed for each of
171
the functions above. The RTEMS filesystem provides a framework that
172
allows new filesystem to be developed and integrated without alteration
173
to the basic framework.
174
 
175
To provide the functional switching that is required, each of the POSIX
176
file and directory functions have been implemented as a shell function.
177
The shell function adheres to the POSIX interface standard. Within this
178
functional shell, filesystem and node type information is accessed which
179
is then used to invoke the appropriate filesystem and node type specific
180
routine to process the POSIX function call.
181
 
182
@subsection File/Device/Directory function access via file control block - rtems_libio_t structure
183
 
184
The POSIX open() function returns an integer file descriptor that is used
185
as a reference to file control block information for a specific file. The
186
file control block contains information that is used to locate node, file
187
system, mount table and functional handler information. The diagram in
188
Figure 8 depicts the relationship between and among the following
189
components.
190
 
191
@enumerate
192
 
193
@item File Descriptor Table
194
 
195
This is an internal RTEMS structure that tracks all currently defined file
196
descriptors in the system. The index that is returned by the file open()
197
operation references a slot in this table. The slot contains a pointer to
198
the file descriptor table entry for this file. The rtems_libio_t structure
199
represents the file control block.
200
 
201
@item Allocation of entry in the File Descriptor Table
202
 
203
Access to the file descriptor table is controlled through a semaphore that
204
is implemented using the rtems_libio_allocate() function. This routine
205
will grab a semaphore and then scan the file control blocks to determine
206
which slot is free for use. The first free slot is marked as used and the
207
index to this slot is returned as the file descriptor for the open()
208
request. After the alterations have been made to the file control block
209
table, the semaphore is released to allow further operations on the table.
210
 
211
@item Maximum number of entries in the file descriptor table is
212
configurable through the src/exec/sapi/headers/confdefs.h file. If the
213
CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS constant is defined its value
214
will represent the maximum number of file descriptors that are allowed.
215
If CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS is not specified a default
216
value of 20 will be used as the maximum number of file descriptors
217
allowed.
218
 
219
@item File control block - rtems_libio_t structure
220
 
221
@example
222
struct rtems_libio_tt @{
223
  rtems_driver_name_t              *driver;
224
  off_t                             size;
225
  off_t                             offset;
226
  unsigned32                        flags;
227
  rtems_filesystem_location_info_t  pathinfo;
228
  Objects_Id                        sem;
229
  unsigned32                        data0;
230
  void                              data1;
231
  void                              file_info;
232
  rtems_filesystem_file_handlers_r  handlers;
233
@};
234
@end example
235
 
236
A file control block can exist for regular files, devices and directories.
237
The following fields are important for regular file and directory access:
238
 
239
@itemize @bullet
240
 
241
@item Size - For a file this represents the number of bytes currently
242
stored in a file. For a directory this field is not filled in.
243
 
244
@item Offset - For a file this is the byte file position index relative to
245
the start of the file. For a directory this is the byte offset into a
246
sequence of dirent structures.
247
 
248
@item Pathinfo - This is a structure that provides a pointer to node
249
information, OPS table functions, Handler functions and the mount table
250
entry associated with this node.
251
 
252
@item file_info - A pointer to node information that is used by Handler
253
functions
254
 
255
@item handlers - A pointer to a table of handler functions that operate on
256
a file, device or directory through a file descriptor index
257
 
258
@end itemize
259
 
260
@end enumerate
261
 
262
@subsection File/Directory function access via rtems_filesystem_location_info_t structure
263
 
264
The rtems_filesystem_location_info_tt structure below provides sufficient
265
information to process nodes under a mounted filesystem.
266
 
267
@example
268
struct rtems_filesystem_location_info_tt @{
269
    void                                     *node_access;
270
    rtems_filesystem_file_handlers_r         *handlers;
271
    rtems_filesystem_operations_table        *ops;
272
    rtems_filesystem_mount_table_entry_t     *mt_entry;
273
@};
274
@end example
275
 
276
It contains a void pointer to filesystem specific nodal structure,
277
pointers to the OPS table for the filesystem that contains the node, the
278
node type specific handlers for the node and a reference pointer to the
279
mount table entry associated with the filesystem containing the node
280
 
281
@section Operation Tables
282
 
283
Filesystem specific operations are invoked indirectly.  The set of
284
routines that implement the filesystem are configured into two tables.
285
The Filesystem Handler Table has routines that are specific to a
286
filesystem but remain constant regardless of the actual file type.
287
The File Handler Table has routines that are both filesystem and file type
288
specific.
289
 
290
@subsection Filesystem Handler Table Functions
291
 
292
OPS table functions are defined in a @code{rtems_filesystem_operations_table}
293
structure.  It defines functions that are specific to a given filesystem.
294
One table exists for each filesystem that is supported in the RTEMS
295
configuration. The structure definition appears below and is followed by
296
general developmental information on each of the functions contained in this
297
function management structure.
298
 
299
@example
300
typedef struct @{
301
  rtems_filesystem_evalpath_t        evalpath;
302
  rtems_filesystem_evalmake_t        evalformake;
303
  rtems_filesystem_link_t            link;
304
  rtems_filesystem_unlink_t          unlink;
305
  rtems_filesystem_node_type_t       node_type;
306
  rtems_filesystem_mknod_t           mknod;
307
  rtems_filesystem_rmnod_t           rmnod;
308
  rtems_filesystem_chown_t           chown;
309
  rtems_filesystem_freenode_t        freenod;
310
  rtems_filesystem_mount_t           mount;
311
  rtems_filesystem_fsmount_me_t      fsmount_me;
312
  rtems_filesystem_unmount_t         unmount;
313
  rtems_filesystem_fsunmount_me_t    fsunmount_me;
314
  rtems_filesystem_utime_t           utime;
315
  rtems_filesystem_evaluate_link_t   eval_link;
316
  rtems_filesystem_symlink_t         symlink;
317
@} rtems_filesystem_operations_table;
318
@end example
319
 
320
@c
321
@c
322
@c
323
@c @page
324
 
325
@subsubsection evalpath Handler
326
 
327
@subheading Corresponding Structure Element:
328
 
329
evalpath
330
 
331
@subheading Arguments:
332
 
333
@example
334
  const char                        *pathname,      /* IN     */
335
  int                                flags,         /* IN     */
336
  rtems_filesystem_location_info_t  *pathloc        /* IN/OUT */
337
@end example
338
 
339
@subheading Description:
340
 
341
This routine is responsible for evaluating the pathname passed in
342
based upon the flags and the valid @code{rthems_filesystem_location_info_t}.
343
Additionally, it must make any changes to pathloc necessary to identify
344
the pathname node.  This should include calling the evalpath for a mounted
345
filesystem, if the given filesystem supports the mount command.
346
 
347
This routine returns a 0 if the evaluation was successful.
348
Otherwise, it returns a -1 and sets errno to the correct error.
349
 
350
This routine is required and should NOT be set to NULL.
351
 
352
@c
353
@c
354
@c
355
@c @page
356
 
357
@subsubsection evalformake Handler
358
 
359
@subheading Corresponding Structure Element:
360
 
361
evalformake
362
 
363
@subheading Arguments:
364
 
365
@example
366
   const char                       *path,       /* IN */
367
   rtems_filesystem_location_info_t *pathloc,    /* IN/OUT */
368
   const char                      **name        /* OUT    */
369
@end example
370
 
371
@subheading Description:
372
 
373
This method is given a path to evaluate and a valid start location.  It
374
is responsible for finding the parent node for a requested make command,
375
setting pathloc information to identify the parent node, and setting
376
the name pointer to the first character of the name of the new node.
377
Additionally, if the filesystem supports the mount command, this method
378
should call the evalformake routine for the mounted filesystem.
379
 
380
This routine returns a 0 if the evaluation was successful.  Otherwise, it
381
returns a -1 and sets errno to the correct error.
382
 
383
This routine is required and should NOT be set to NULL.  However, if
384
the filesystem does not support user creation of a new node, it may
385
set errno to ENOSYS and return -1.
386
 
387
@c
388
@c
389
@c
390
@c @page
391
 
392
@subsubsection link Handler
393
 
394
@subheading Corresponding Structure Element:
395
 
396
link
397
 
398
@subheading Arguments:
399
 
400
 
401
@example
402
rtems_filesystem_location_info_t    *to_loc,      /* IN */
403
rtems_filesystem_location_info_t    *parent_loc,  /* IN */
404
const char                          *token        /* IN */
405
@end example
406
 
407
@subheading Description:
408
 
409
 
410
This routine is used to create a hard-link.
411
 
412
It will first examine the st_nlink count of the node that we are trying to.
413
If the link count exceeds LINK_MAX an error will be returned.
414
 
415
The name of the link will be normalized to remove extraneous separators from
416
the end of the name.
417
 
418
This routine is not required and may be set to NULL.
419
 
420
@c
421
@c
422
@c
423
@c @page
424
 
425
@subsubsection unlink Handler
426
 
427
@subheading Corresponding Structure Element:
428
 
429
XXX
430
 
431
@subheading Arguments:
432
 
433
XXX
434
 
435
@subheading Description:
436
 
437
XXX
438
 
439
 
440
@c
441
@c
442
@c
443
@c @page
444
 
445
@subsubsection node_type Handler
446
 
447
@subheading Corresponding Structure Element:
448
 
449
node_type()
450
 
451
@subheading Arguments:
452
 
453
@example
454
rtems_filesystem_location_info_t    *pathloc        /* IN */
455
@end example
456
 
457
@subheading Description:
458
 
459
XXX
460
 
461
@c
462
@c
463
@c
464
@c @page
465
 
466
@subsubsection mknod Handler
467
 
468
@subheading Corresponding Structure Element:
469
 
470
mknod()
471
 
472
@subheading Arguments:
473
 
474
@example
475
const char                          *token,        /* IN */
476
mode_t                               mode,         /* IN */
477
dev_t                                dev,          /* IN */
478
rtems_filesystem_location_info_t    *pathloc       /* IN/OUT */
479
@end example
480
 
481
@subheading Description:
482
 
483
XXX
484
 
485
@c
486
@c
487
@c
488
@c @page
489
 
490
@subsubsection rmnod Handler
491
 
492
@subheading Corresponding Structure Element:
493
 
494
XXX
495
 
496
@subheading Arguments:
497
 
498
XXX
499
 
500
@subheading Description:
501
 
502
XXX
503
 
504
 
505
@c
506
@c
507
@c
508
@c @page
509
 
510
@subsubsection chown Handler
511
 
512
@subheading Corresponding Structure Element:
513
 
514
chown()
515
 
516
@subheading Arguments:
517
 
518
@example
519
rtems_filesystem_location_info_t    *pathloc        /* IN */
520
uid_t                                owner          /* IN */
521
gid_t                                group          /* IN */
522
@end example
523
 
524
@subheading Description:
525
 
526
XXX
527
 
528
@c
529
@c
530
@c
531
@c @page
532
 
533
@subsubsection freenod Handler
534
 
535
@subheading Corresponding Structure Element:
536
 
537
freenod()
538
 
539
@subheading Arguments:
540
 
541
@example
542
rtems_filesystem_location_info_t      *pathloc       /* IN */
543
@end example
544
 
545
@subheading Description:
546
 
547
This routine is used by the generic code to allow memory to be allocated
548
during the evaluate routines, and set free when the generic code is finished
549
accessing a node.  If the evaluate routines allocate memory to identify
550
a node this routine should be utilized to free that memory.
551
 
552
This routine is not required and may be set to NULL.
553
 
554
@c
555
@c
556
@c
557
@c @page
558
 
559
@subsubsection mount Handler
560
 
561
@subheading Corresponding Structure Element:
562
 
563
mount()
564
 
565
@subheading Arguments:
566
 
567
@example
568
rtems_filesystem_mount_table_entry_t   *mt_entry
569
@end example
570
 
571
@subheading Description:
572
 
573
XXX
574
 
575
@c
576
@c
577
@c
578
@c @page
579
 
580
@subsubsection fsmount_me Handler
581
 
582
@subheading Corresponding Structure Element:
583
 
584
XXX
585
 
586
@subheading Arguments:
587
 
588
@example
589
rtems_filesystem_mount_table_entry_t   *mt_entry
590
@end example
591
 
592
@subheading Description:
593
 
594
This function is provided with a filesystem to take care of the internal
595
filesystem management details associated with mounting that filesystem
596
under the RTEMS environment.
597
 
598
It is not responsible for the mounting details associated the filesystem
599
containing the mount point.
600
 
601
The rtems_filesystem_mount_table_entry_t structure contains the key elements
602
below:
603
 
604
rtems_filesystem_location_info_t         *mt_point_node,
605
 
606
This structure contains information about the mount point. This
607
allows us to find the ops-table and the handling functions
608
associated with the filesystem containing the mount point.
609
 
610
rtems_filesystem_location_info_t         *fs_root_node,
611
 
612
This structure contains information about the root node in the file
613
system to be mounted. It allows us to find the ops-table and the
614
handling functions associated with the filesystem to be mounted.
615
 
616
rtems_filesystem_options_t                 options,
617
 
618
Read only or read/write access
619
 
620
void                                         *fs_info,
621
 
622
This points to an allocated block of memory the will be used to
623
hold any filesystem specific information of a global nature. This
624
allocated region if important because it allows us to mount the
625
same filesystem type more than once under the RTEMS system.
626
Each instance of the mounted filesystem has its own set of global
627
management information that is separate from the global
628
management information associated with the other instances of the
629
mounted filesystem type.
630
 
631
rtems_filesystem_limits_and_options_t    pathconf_info,
632
 
633
The table contains the following set of values associated with the
634
mounted filesystem:
635
 
636
@itemize @bullet
637
 
638
@item link_max
639
 
640
@item max_canon
641
 
642
@item max_input
643
 
644
@item name_max
645
 
646
@item path_max
647
 
648
@item pipe_buf
649
 
650
@item posix_async_io
651
 
652
@item posix_chown_restrictions
653
 
654
@item posix_no_trunc
655
 
656
@item posix_prio_io
657
 
658
@item posix_sync_io
659
 
660
@item posix_vdisable
661
 
662
@end itemize
663
 
664
These values are accessed with the pathconf() and the fpathconf ()
665
functions.
666
 
667
const char                                   *dev
668
 
669
The is intended to contain a string that identifies the device that contains
670
the filesystem information. The filesystems that are currently implemented
671
are memory based and don't require a device specification.
672
 
673
If the mt_point_node.node_access is NULL then we are mounting the base file
674
system.
675
 
676
The routine will create a directory node for the root of the IMFS file
677
system.
678
 
679
The node will have read, write and execute permissions for owner, group and
680
others.
681
 
682
The node's name will be a null string.
683
 
684
A filesystem information structure(fs_info) will be allocated and
685
initialized for the IMFS filesystem. The fs_info pointer in the mount table
686
entry will be set to point the filesystem information structure.
687
 
688
The pathconf_info element of the mount table will be set to the appropriate
689
table of path configuration constants (LIMITS_AND_OPTIONS).
690
 
691
The fs_root_node structure will be filled in with the following:
692
 
693
@itemize @bullet
694
 
695
@item pointer to the allocated root node of the filesystem
696
 
697
@item directory handlers for a directory node under the IMFS filesystem
698
 
699
@item OPS table functions for the IMFS
700
 
701
@end itemize
702
 
703
A 0 will be returned to the calling routine if the process succeeded,
704
otherwise a 1 will be returned.
705
 
706
 
707
@c
708
@c
709
@c
710
@c @page
711
 
712
@subsubsection unmount Handler
713
 
714
@subheading Corresponding Structure Element:
715
 
716
XXX
717
 
718
@subheading Arguments:
719
 
720
XXX
721
 
722
@subheading Description:
723
 
724
XXX
725
 
726
 
727
@c
728
@c
729
@c
730
@c @page
731
 
732
@subsubsection fsunmount_me Handler
733
 
734
@subheading Corresponding Structure Element:
735
 
736
imfs_fsunmount_me()
737
 
738
@subheading Arguments:
739
 
740
@example
741
rtems_filesystem_mount_table_entry_t   *mt_entry
742
@end example
743
 
744
@subheading Description:
745
 
746
XXX
747
 
748
 
749
@c
750
@c
751
@c
752
@c @page
753
 
754
@subsubsection utime Handler
755
 
756
@subheading Corresponding Structure Element:
757
 
758
XXX
759
 
760
@subheading Arguments:
761
 
762
XXX
763
 
764
@subheading Description:
765
 
766
XXX
767
 
768
@c
769
@c
770
@c
771
@c @page
772
 
773
@subsubsection eval_link Handler
774
 
775
@subheading Corresponding Structure Element:
776
 
777
XXX
778
 
779
@subheading Arguments:
780
 
781
XXX
782
 
783
@subheading Description:
784
 
785
XXX
786
 
787
@c
788
@c
789
@c
790
@c @page
791
 
792
@subsubsection symlink Handler
793
 
794
@subheading Corresponding Structure Element:
795
 
796
XXX
797
 
798
@subheading Arguments:
799
 
800
XXX
801
 
802
@subheading Description:
803
 
804
XXX
805
 
806
@c
807
@c
808
@c
809
@c @page
810
@subsection File Handler Table Functions
811
 
812
Handler table functions are defined in a @code{rtems_filesystem_file_handlers_r}
813
structure. It defines functions that are specific to a node type in a given
814
filesystem. One table exists for each of the filesystem's node types. The
815
structure definition appears below. It is followed by general developmental
816
information on each of the functions associated with regular files contained
817
in this function management structure.
818
 
819
@example
820
typedef struct @{
821
  rtems_filesystem_open_t           open;
822
  rtems_filesystem_close_t          close;
823
  rtems_filesystem_read_t           read;
824
  rtems_filesystem_write_t          write;
825
  rtems_filesystem_ioctl_t          ioctl;
826
  rtems_filesystem_lseek_t          lseek;
827
  rtems_filesystem_fstat_t          fstat;
828
  rtems_filesystem_fchmod_t         fchmod;
829
  rtems_filesystem_ftruncate_t      ftruncate;
830
  rtems_filesystem_fpathconf_t      fpathconf;
831
  rtems_filesystem_fsync_t          fsync;
832
  rtems_filesystem_fdatasync_t      fdatasync;
833
  rtems_filesystem_fcntl_t          fcntl;
834
@} rtems_filesystem_file_handlers_r;
835
@end example
836
 
837
@c
838
@c
839
@c
840
@c @page
841
 
842
@subsubsection open Handler
843
 
844
@subheading Corresponding Structure Element:
845
 
846
open()
847
 
848
@subheading Arguments:
849
 
850
@example
851
rtems_libio_t   *iop,
852
const char      *pathname,
853
unsigned32       flag,
854
unsigned32       mode
855
@end example
856
 
857
@subheading Description:
858
 
859
XXX
860
 
861
@c
862
@c
863
@c
864
@c @page
865
 
866
@subsubsection close Handler
867
 
868
@subheading Corresponding Structure Element:
869
 
870
close()
871
 
872
@subheading Arguments:
873
 
874
@example
875
rtems_libio_t     *iop
876
@end example
877
 
878
@subheading Description:
879
 
880
XXX
881
 
882
@subheading NOTES:
883
 
884
XXX
885
 
886
 
887
 
888
@c
889
@c
890
@c
891
@c @page
892
 
893
@subsubsection read Handler
894
 
895
@subheading Corresponding Structure Element:
896
 
897
read()
898
 
899
@subheading Arguments:
900
 
901
@example
902
rtems_libio_t     *iop,
903
void              *buffer,
904
unsigned32         count
905
@end example
906
 
907
@subheading Description:
908
 
909
XXX
910
 
911
@subheading NOTES:
912
 
913
XXX
914
 
915
 
916
@c
917
@c
918
@c
919
@c @page
920
 
921
@subsubsection write Handler
922
 
923
@subheading Corresponding Structure Element:
924
 
925
XXX
926
 
927
@subheading Arguments:
928
 
929
XXX
930
@subheading Description:
931
 
932
XXX
933
 
934
@subheading NOTES:
935
 
936
XXX
937
 
938
 
939
@c
940
@c
941
@c
942
@c @page
943
 
944
@subsubsection ioctl Handler
945
 
946
@subheading Corresponding Structure Element:
947
 
948
XXX
949
 
950
@subheading Arguments:
951
 
952
@example
953
rtems_libio_t     *iop,
954
unsigned32       command,
955
void              *buffer
956
@end example
957
 
958
@subheading Description:
959
 
960
XXX
961
 
962
@subheading NOTES:
963
 
964
XXX
965
 
966
 
967
@c
968
@c
969
@c
970
@c @page
971
 
972
@subsubsection lseek Handler
973
 
974
@subheading Corresponding Structure Element:
975
 
976
lseek()
977
 
978
@subheading Arguments:
979
 
980
@example
981
rtems_libio_t     *iop,
982
off_t              offset,
983
int                whence
984
@end example
985
 
986
@subheading Description:
987
 
988
XXX
989
 
990
@subheading NOTES:
991
 
992
XXX
993
 
994
 
995
@c
996
@c
997
@c
998
@c @page
999
 
1000
@subsubsection fstat Handler
1001
 
1002
@subheading Corresponding Structure Element:
1003
 
1004
fstat()
1005
 
1006
@subheading Arguments:
1007
 
1008
@example
1009
rtems_filesystem_location_info_t   *loc,
1010
struct stat                        *buf
1011
@end example
1012
 
1013
@subheading Description:
1014
 
1015
The following information is extracted from the filesystem
1016
specific node and placed in the @code{stat} structure:
1017
 
1018
@itemize @bullet
1019
 
1020
@item st_mode
1021
 
1022
@item st_nlink
1023
 
1024
@item st_ino
1025
 
1026
@item st_uid
1027
 
1028
@item st_gid
1029
 
1030
@item st_atime
1031
 
1032
@item st_mtime
1033
 
1034
@item st_ctime
1035
 
1036
@end itemize
1037
 
1038
 
1039
@subheading NOTES:
1040
 
1041
Both the @code{stat()} and @code{lstat()} services are
1042
implemented directly using the @code{fstat()} handler.  The
1043
difference in behavior is determined by how the path is evaluated
1044
prior to this handler being called on a particular
1045
file entity.
1046
 
1047
The @code{fstat()} system call is implemented directly
1048
on top of this filesystem handler.
1049
 
1050
@c
1051
@c
1052
@c
1053
@c @page
1054
 
1055
@subsubsection fchmod Handler
1056
 
1057
@subheading Corresponding Structure Element:
1058
 
1059
fchmod()
1060
 
1061
@subheading Arguments:
1062
 
1063
@example
1064
rtems_libio_t     *iop
1065
mode_t              mode
1066
@end example
1067
 
1068
@subheading Description:
1069
 
1070
XXX
1071
 
1072
 
1073
@subheading NOTES:
1074
 
1075
XXX
1076
 
1077
@c
1078
@c
1079
@c
1080
@c @page
1081
 
1082
@subsubsection ftruncate Handler
1083
 
1084
@subheading Corresponding Structure Element:
1085
 
1086
XXX
1087
 
1088
@subheading Arguments:
1089
 
1090
XXX
1091
@subheading Description:
1092
 
1093
XXX
1094
 
1095
@subheading NOTES:
1096
 
1097
XXX
1098
 
1099
@subsubsection fpathconf Handler
1100
 
1101
@subheading Corresponding Structure Element:
1102
 
1103
XXX
1104
 
1105
@subheading Arguments:
1106
 
1107
XXX
1108
 
1109
@subheading Description:
1110
 
1111
XXX
1112
 
1113
@subheading NOTES:
1114
 
1115
XXX
1116
 
1117
@c
1118
@c
1119
@c
1120
@c @page
1121
 
1122
@subsubsection fsync Handler
1123
 
1124
@subheading Corresponding Structure Element:
1125
 
1126
XXX
1127
 
1128
@subheading Arguments:
1129
 
1130
XXX
1131
@subheading Description:
1132
 
1133
XXX
1134
 
1135
@subheading NOTES:
1136
 
1137
XXX
1138
 
1139
@c
1140
@c
1141
@c
1142
@c @page
1143
 
1144
@subsubsection fdatasync Handler
1145
 
1146
@subheading Corresponding Structure Element:
1147
 
1148
XXX
1149
 
1150
@subheading Arguments:
1151
 
1152
XXX
1153
 
1154
@subheading Description:
1155
 
1156
XXX
1157
 
1158
@subheading NOTES:
1159
 
1160
XXX
1161
 
1162
@c
1163
@c
1164
@c
1165
@c @page
1166
 
1167
@subsubsection fcntl Handler
1168
 
1169
@subheading Corresponding Structure Element:
1170
 
1171
XXX
1172
 
1173
@subheading Arguments:
1174
 
1175
XXX
1176
 
1177
@subheading Description:
1178
 
1179
XXX
1180
 
1181
@subheading NOTES:
1182
 
1183
XXX

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.