Changeset 0f58ab42 in rtems


Ignore:
Timestamp:
Sep 28, 1998, 10:09:12 PM (21 years ago)
Author:
Wade A Smith <warm38@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
68e8f63
Parents:
487c5d58
Message:

Documented the mount and umount routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/new_chapters/io.t

    r487c5d58 r0f58ab42  
    2323@item @code{write} - Writes to a file
    2424@item @code{fcntl} - Manipulates an open file descriptor
    25 @item @code{lseek} - XXX
     25@item @code{lseek} - Reposition read/write file offset
    2626@item @code{fsynch} - XXX
    2727@item @code{fdatasynch} - XXX
     28@item @code{mount} - Mount a file system
     29@item @code{umount} - Unmount file systems
    2830@item @code{aio_read} - YYY
    2931@item @code{aio_write} - YYY
     
    7375
    7476@subheading NOTES:
     77
     78This routine is not currently supported by RTEMS but could be
     79in a future version.
    7580
    7681@page
     
    355360
    356361@page
    357 @subsection lseek -
     362@subsection lseek - Reposition read/write file offset
    358363
    359364@subheading CALLING SEQUENCE:
     
    362367@example
    363368int lseek(
    364 );
    365 @end example
    366 @end ifset
    367 
    368 @ifset is-Ada
    369 @end ifset
    370 
    371 @subheading STATUS CODES:
    372 
    373 @table @b
    374 @item E
    375 The
    376 
    377 @end table
    378 
    379 @subheading DESCRIPTION:
    380 
    381 @subheading NOTES:
     369  int   fildes,
     370  off_t offset,
     371  int whence
     372);
     373@end example
     374@end ifset
     375
     376@ifset is-Ada
     377@end ifset
     378
     379@subheading STATUS CODES:
     380
     381@table @b
     382@item EBADF
     383@code{Fildes} is not an open file descriptor.
     384
     385@item ESPIPE
     386@code{Fildes} is associated with a pipe, socket or FIFO.
     387
     388@item EINVAL
     389@code{Whence} is not a proper value.
     390
     391@end table
     392
     393@subheading DESCRIPTION:
     394
     395The @code{lseek} function repositions the offset of the file descriptor
     396@code{fildes} to the argument offset according to the directive whence.   
     397The argument @code{fildes} must be an open file descriptor. @code{Lseek}
     398repositions the file pointer fildes as follows:
     399
     400  If @code{whence} is SEEK_SET, the offset is set to @code{offset} bytes.
     401
     402  If @code{whence} is SEEK_CUR, the offset is set to its current location
     403  plus offset bytes.
     404
     405  If @cdoe{whence} is SEEK_END, the offset is set to the size of the
     406  file plus @cdoe{offset} bytes.
     407
     408The @cdoe{lseek} function allows the file offset to be set beyond the end
     409of the existing end-of-file of the file. If data is later written at this
     410point, subsequent reads of the data in the gap return bytes of zeros
     411(until data is actually written into the gap).
     412
     413Some devices are incapable of seeking.  The value of the pointer asso-
     414ciated with such a device is undefined.
     415
     416@subheading NOTES: None
    382417
    383418@page
     
    436471
    437472@page
     473@subsection mount - Mount a file system
     474
     475@subheading CALLING SEQUENCE:
     476
     477@ifset is-C
     478@example
     479#include <sys/mount.h>
     480#include <linux/fs.h>
     481
     482int mount(
     483  const char *specialfile,
     484  const char * dir,
     485  const char * filesystemtype,
     486  unsigned long rwflag,
     487  const void * data
     488);
     489@end example
     490@end ifset
     491
     492@ifset is-Ada
     493@end ifset
     494
     495@subheading STATUS CODES:
     496
     497@table @b
     498@item EPERM
     499The user is not the super-user.
     500
     501@item ENODEV
     502@code{Filesystemtype} not configured in the kernel.
     503
     504@item ENOTBLK
     505@code{Specialfile} is not a block device (if a device was required).
     506
     507@item EBUSY
     508@code{Specialfile} is already mounted.  Or, it cannot be remounted
     509read-only, because it still holds files open for writing.  Or, it
     510cannot be mounted on @code{dir} because @code{dir} is still busy
     511(it is the working directory of some task, the mount point of another
     512device, has open files, etc.).
     513
     514@item EINVAL
     515@code{Specialfile had an invalid superblock.  Or, a remount was
     516attempted, while @code{specialfile} was not already mounted on @code{dir}.
     517Or, an umount was attempted, while @code{dir} was not a mount point.
     518
     519@item EFAULT
     520One of the pointer arguments points outside the user address space.
     521
     522@item ENOMEM
     523The kernel could not allocate a free page to copy filenames or data into.
     524
     525@item ENAMETOOLONG
     526A pathname was longer than MAXPATHLEN.
     527
     528@item ENOTDIR
     529A pathname was empty or had a nonexistent component.
     530
     531@item EACCES
     532A component of a path was not searchable.  Or, mounting a read-only
     533filesystem was attempted without giving the MS_RDONLY flag.  Or, the
     534block device Specialfile is located on a filesystem mounted with
     535the MS_NODEV option.
     536
     537@item ENXIO
     538The major number of the block device @code{specialfile} is out of
     539range.
     540
     541@item EMFILE
     542(In case no block device is required:) Table of dummy devices is full.
     543             
     544@end table
     545
     546@subheading DESCRIPTION:
     547
     548@code{Mount} attaches the filesystem specified by @code{specialfile}
     549(which is often a device name) to the directory specified by @code{dir}.
     550
     551Only the super-user may mount filesystems.
     552
     553The @code{filesystemtype} argument may take one of the values listed in
     554/proc/filesystems (link "minix", "ext2", "msdos", "proc", "nfs",
     555"iso9660" etc.).
     556
     557The @code{rwflag} argument has the magic number 0xCOED in the top 16 bits,
     558and various mount flags in the low order 16 bits.  If the magic number is
     559absent, then the last two arguments are not used.
     560
     561The @code{data} argument is interpreted by the different file systems.
     562
     563@subheading NOTES: None
     564
     565@page
     566@subsection umount - Umount file systems
     567
     568@subheading CALLING SEQUENCE:
     569
     570@ifset is-C
     571@example
     572#include <sys/mount.h>
     573#include <linux/fs.h>
     574
     575int umount(
     576  const char *specialfile
     577);
     578@end example
     579@end ifset
     580
     581@ifset is-Ada
     582@end ifset
     583
     584@subheading STATUS CODES:
     585
     586@table @b
     587@item EPERM
     588The user is not the super-user.
     589
     590@item ENODEV
     591@code{Filesystemtype} not configured in the kernel.
     592
     593@item ENOTBLK
     594@code{Specialfile} is not a block device (if a device was required).
     595
     596@item EBUSY
     597@code{Specialfile} is already mounted.  Or, it cannot be remounted
     598read-only, because it still holds files open for writing.  Or, it
     599cannot be mounted on @code{dir} because @code{dir} is still busy
     600(it is the working directory of some task, the mount point of another
     601device, has open files, etc.).
     602
     603@item EINVAL
     604@code{Specialfile had an invalid superblock.  Or, a remount was
     605attempted, while @code{specialfile} was not already mounted on @code{dir}.
     606Or, an umount was attempted, while @code{dir} was not a mount point.
     607
     608@item EFAULT
     609One of the pointer arguments points outside the user address space.
     610
     611@item ENOMEM
     612The kernel could not allocate a free page to copy filenames or data into.
     613
     614@item ENAMETOOLONG
     615A pathname was longer than MAXPATHLEN.
     616
     617@item ENOTDIR
     618A pathname was empty or had a nonexistent component.
     619
     620@item EACCES
     621A component of a path was not searchable.  Or, mounting a read-only
     622filesystem was attempted without giving the MS_RDONLY flag.  Or, the
     623block device Specialfile is located on a filesystem mounted with
     624the MS_NODEV option.
     625
     626@item ENXIO
     627The major number of the block device @code{specialfile} is out of
     628range.
     629
     630@item EMFILE
     631(In case no block device is required:) Table of dummy devices is full.
     632
     633@end table
     634
     635@subheading DESCRIPTION:
     636
     637@code{Umount} removes the attachment of the filesystem specified
     638by @code{specialfile} or @code{dir}.
     639
     640Only the super-user may umount filesystems.
     641
     642@subheading NOTES: None
     643
     644@page
    438645@subsection aio_read -
    439646
     
    443650@example
    444651int aio_read(
    445 );
    446 @end example
    447 @end ifset
    448 
    449 @ifset is-Ada
    450 @end ifset
    451 
    452 @subheading STATUS CODES:
    453 
    454 @table @b
    455 @item E
    456 The
    457 
    458 @end table
    459 
    460 @subheading DESCRIPTION:
    461 
    462 @subheading NOTES:
    463 
    464 @page
    465 @subsection aio_write -
    466 
    467 @subheading CALLING SEQUENCE:
    468 
    469 @ifset is-C
    470 @example
    471 int aio_write(
    472 );
    473 @end example
    474 @end ifset
    475 
    476 @ifset is-Ada
    477 @end ifset
    478 
    479 @subheading STATUS CODES:
    480 
    481 @table @b
    482 @item E
    483 The
    484 
    485 @end table
    486 
    487 @subheading DESCRIPTION:
    488 
    489 @subheading NOTES:
    490 
    491 @page
    492 @subsection lio_listio -
    493 
    494 @subheading CALLING SEQUENCE:
    495 
    496 @ifset is-C
    497 @example
    498 int lio_listio(
    499 );
    500 @end example
    501 @end ifset
    502 
    503 @ifset is-Ada
    504 @end ifset
    505 
    506 @subheading STATUS CODES:
    507 
    508 @table @b
    509 @item E
    510 The
    511 
    512 @end table
    513 
    514 @subheading DESCRIPTION:
    515 
    516 @subheading NOTES:
    517 
    518 @page
    519 @subsection aio_error -
    520 
    521 @subheading CALLING SEQUENCE:
    522 
    523 @ifset is-C
    524 @example
    525 int aio_error(
    526 );
    527 @end example
    528 @end ifset
    529 
    530 @ifset is-Ada
    531 @end ifset
    532 
    533 @subheading STATUS CODES:
    534 
    535 @table @b
    536 @item E
    537 The
    538 
    539 @end table
    540 
    541 @subheading DESCRIPTION:
    542 
    543 @subheading NOTES:
    544 
    545 @page
    546 @subsection aio_return -
    547 
    548 @subheading CALLING SEQUENCE:
    549 
    550 @ifset is-C
    551 @example
    552 int aio_return(
    553 );
    554 @end example
    555 @end ifset
    556 
    557 @ifset is-Ada
    558 @end ifset
    559 
    560 @subheading STATUS CODES:
    561 
    562 @table @b
    563 @item E
    564 The
    565 
    566 @end table
    567 
    568 @subheading DESCRIPTION:
    569 
    570 @subheading NOTES:
    571 
    572 @page
    573 @subsection aio_cancel -
    574 
    575 @subheading CALLING SEQUENCE:
    576 
    577 @ifset is-C
    578 @example
    579 int aio_cancel(
    580 );
    581 @end example
    582 @end ifset
    583 
    584 @ifset is-Ada
    585 @end ifset
    586 
    587 @subheading STATUS CODES:
    588 
    589 @table @b
    590 @item E
    591 The
    592 
    593 @end table
    594 
    595 @subheading DESCRIPTION:
    596 
    597 @subheading NOTES:
    598 
    599 @page
    600 @subsection aio_suspend -
    601 
    602 @subheading CALLING SEQUENCE:
    603 
    604 @ifset is-C
    605 @example
    606 int aio_suspend(
    607 );
    608 @end example
    609 @end ifset
    610 
    611 @ifset is-Ada
    612 @end ifset
    613 
    614 @subheading STATUS CODES:
    615 
    616 @table @b
    617 @item E
    618 The
    619 
    620 @end table
    621 
    622 @subheading DESCRIPTION:
    623 
    624 @subheading NOTES:
    625 
    626 @page
    627 @subsection aio_fsync -
    628 
    629 @subheading CALLING SEQUENCE:
    630 
    631 @ifset is-C
    632 @example
    633 int aio_fsync(
    634652);
    635653@end example
     
    653671This routine is not currently supported by RTEMS but could be
    654672in a future version.
     673
     674@page
     675@subsection aio_write -
     676
     677@subheading CALLING SEQUENCE:
     678
     679@ifset is-C
     680@example
     681int aio_write(
     682);
     683@end example
     684@end ifset
     685
     686@ifset is-Ada
     687@end ifset
     688
     689@subheading STATUS CODES:
     690
     691@table @b
     692@item E
     693The
     694
     695@end table
     696
     697@subheading DESCRIPTION:
     698
     699@subheading NOTES:
     700
     701This routine is not currently supported by RTEMS but could be
     702in a future version.
     703
     704@page
     705@subsection lio_listio -
     706
     707@subheading CALLING SEQUENCE:
     708
     709@ifset is-C
     710@example
     711int lio_listio(
     712);
     713@end example
     714@end ifset
     715
     716@ifset is-Ada
     717@end ifset
     718
     719@subheading STATUS CODES:
     720
     721@table @b
     722@item E
     723The
     724
     725@end table
     726
     727@subheading DESCRIPTION:
     728
     729@subheading NOTES:
     730
     731This routine is not currently supported by RTEMS but could be
     732in a future version.
     733
     734@page
     735@subsection aio_error -
     736
     737@subheading CALLING SEQUENCE:
     738
     739@ifset is-C
     740@example
     741int aio_error(
     742);
     743@end example
     744@end ifset
     745
     746@ifset is-Ada
     747@end ifset
     748
     749@subheading STATUS CODES:
     750
     751@table @b
     752@item E
     753The
     754
     755@end table
     756
     757@subheading DESCRIPTION:
     758
     759@subheading NOTES:
     760
     761This routine is not currently supported by RTEMS but could be
     762in a future version.
     763
     764@page
     765@subsection aio_return -
     766
     767@subheading CALLING SEQUENCE:
     768
     769@ifset is-C
     770@example
     771int aio_return(
     772);
     773@end example
     774@end ifset
     775
     776@ifset is-Ada
     777@end ifset
     778
     779@subheading STATUS CODES:
     780
     781@table @b
     782@item E
     783The
     784
     785@end table
     786
     787@subheading DESCRIPTION:
     788
     789@subheading NOTES:
     790
     791This routine is not currently supported by RTEMS but could be
     792in a future version.
     793
     794@page
     795@subsection aio_cancel -
     796
     797@subheading CALLING SEQUENCE:
     798
     799@ifset is-C
     800@example
     801int aio_cancel(
     802);
     803@end example
     804@end ifset
     805
     806@ifset is-Ada
     807@end ifset
     808
     809@subheading STATUS CODES:
     810
     811@table @b
     812@item E
     813The
     814
     815@end table
     816
     817@subheading DESCRIPTION:
     818
     819@subheading NOTES:
     820
     821This routine is not currently supported by RTEMS but could be
     822in a future version.
     823
     824@page
     825@subsection aio_suspend -
     826
     827@subheading CALLING SEQUENCE:
     828
     829@ifset is-C
     830@example
     831int aio_suspend(
     832);
     833@end example
     834@end ifset
     835
     836@ifset is-Ada
     837@end ifset
     838
     839@subheading STATUS CODES:
     840
     841@table @b
     842@item E
     843The
     844
     845@end table
     846
     847@subheading DESCRIPTION:
     848
     849@subheading NOTES:
     850
     851This routine is not currently supported by RTEMS but could be
     852in a future version.
     853
     854@page
     855@subsection aio_fsync -
     856
     857@subheading CALLING SEQUENCE:
     858
     859@ifset is-C
     860@example
     861int aio_fsync(
     862);
     863@end example
     864@end ifset
     865
     866@ifset is-Ada
     867@end ifset
     868
     869@subheading STATUS CODES:
     870
     871@table @b
     872@item E
     873The
     874
     875@end table
     876
     877@subheading DESCRIPTION:
     878
     879@subheading NOTES:
     880
     881This routine is not currently supported by RTEMS but could be
     882in a future version.
Note: See TracChangeset for help on using the changeset viewer.