libio_

   1# This file was automatically generated by SWIG (https://www.swig.org).
   2# Version 4.2.1
   3#
   4# Do not make changes to this file unless you know what you are doing - modify
   5# the SWIG interface file instead.
   6
   7from sys import version_info as _swig_python_version_info
   8from mock_rtems import _libio_ as _libio_
   9
  10try:
  11    import builtins as __builtin__
  12except ImportError:
  13    import __builtin__
  14
  15def _swig_repr(self):
  16    try:
  17        strthis = "proxy of " + self.this.__repr__()
  18    except __builtin__.Exception:
  19        strthis = ""
  20    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  21
  22
  23def _swig_setattr_nondynamic_instance_variable(set):
  24    def set_instance_attr(self, name, value):
  25        if name == "this":
  26            set(self, name, value)
  27        elif name == "thisown":
  28            self.this.own(value)
  29        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
  30            set(self, name, value)
  31        else:
  32            raise AttributeError("You cannot add instance attributes to %s" % self)
  33    return set_instance_attr
  34
  35
  36def _swig_setattr_nondynamic_class_variable(set):
  37    def set_class_attr(cls, name, value):
  38        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
  39            set(cls, name, value)
  40        else:
  41            raise AttributeError("You cannot add class attributes to %s" % cls)
  42    return set_class_attr
  43
  44
  45def _swig_add_metaclass(metaclass):
  46    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
  47    def wrapper(cls):
  48        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
  49    return wrapper
  50
  51
  52class _SwigNonDynamicMeta(type):
  53    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
  54    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
  55
  56
  57RTEMS_FILESYSTEM_SYMLOOP_MAX = _libio_.RTEMS_FILESYSTEM_SYMLOOP_MAX
  58r"""*"""
  59F_DUP2FD = _libio_.F_DUP2FD
  60
  61
  62def rtems_libio_iop_flags_set(iop, set):
  63    r"""
  64    Sets the specified flags in the iop.
  65
  66    :type iop: rtems_libio_t, in
  67    :param iop: The iop.
  68    :type set: int, in
  69    :param set: The flags to set.
  70
  71    :rtype: int
  72    :return: The previous flags.
  73    """
  74    return _libio_.rtems_libio_iop_flags_set(iop, set)
  75
  76def rtems_libio_iop_flags_clear(iop, clear):
  77    r"""
  78    Clears the specified flags in the iop.
  79
  80    :type iop: rtems_libio_t, in
  81    :param iop: The iop.
  82    :type clear: int, in
  83    :param clear: The flags to clear.
  84
  85    :rtype: int
  86    :return: The previous flags.
  87    """
  88    return _libio_.rtems_libio_iop_flags_clear(iop, clear)
  89
  90def rtems_libio_iop(fd):
  91    r"""
  92    Maps a file descriptor to the iop.
  93
  94    The file descriptor must be a valid index into the iop table.
  95
  96    :type fd: int, in
  97    :param fd: The file descriptor.
  98
  99    :rtype: rtems_libio_t
 100    :return: The iop corresponding to the specified file descriptor.
 101    """
 102    return _libio_.rtems_libio_iop(fd)
 103
 104def rtems_libio_iop_hold(iop):
 105    r"""
 106    Holds a refernece to the iop.
 107
 108    :type iop: rtems_libio_t, in
 109    :param iop: The iop.
 110
 111    :rtype: int
 112    :return: The flags corresponding to the specified iop.
 113    """
 114    return _libio_.rtems_libio_iop_hold(iop)
 115
 116def rtems_libio_iop_drop(iop):
 117    r"""
 118    Drops a refernece to the iop.
 119
 120    :type iop: rtems_libio_t, in
 121    :param iop: The iop.
 122    """
 123    return _libio_.rtems_libio_iop_drop(iop)
 124
 125def rtems_filesystem_location_clone(clone, master):
 126    r"""
 127    Macro to get the iop for the specified file descriptor.
 128
 129    Checks that the file descriptor is in the valid range and open.
 130
 131    Macro to get the iop for the specified file descriptor with access
 132    flags and error.
 133
 134    Checks that the file descriptor is in the valid range and open.
 135
 136    Clones a node.
 137
 138    The caller must hold the file system instance lock.
 139
 140    :type clone: rtems_filesystem_location_info_t, out
 141    :param clone: The cloned location.
 142    :type master: rtems_filesystem_location_info_t, in
 143    :param master: The master location.
 144
 145    See also: rtems_filesystem_instance_lock().
 146    """
 147    return _libio_.rtems_filesystem_location_clone(clone, master)
 148
 149def rtems_filesystem_location_free(loc):
 150    r"""
 151    Releases all resources of a location.
 152
 153    This function may block on a mutex and may complete an unmount process.
 154
 155    :type loc: rtems_filesystem_location_info_t, in
 156    :param loc: The location to free.
 157
 158    Notes: The file system root location is released by the file system
 159    instance destruction handler (see 'rtems_filesystem_fsunmount_me_t)'.
 160
 161    See also: rtems_filesystem_freenode_t.
 162    """
 163    return _libio_.rtems_filesystem_location_free(loc)
 164
 165def rtems_libio_lock():
 166    r"""rtems_libio_lock()"""
 167    return _libio_.rtems_libio_lock()
 168
 169def rtems_libio_unlock():
 170    r"""rtems_libio_unlock()"""
 171    return _libio_.rtems_libio_unlock()
 172
 173def rtems_filesystem_mt_lock():
 174    r"""rtems_filesystem_mt_lock()"""
 175    return _libio_.rtems_filesystem_mt_lock()
 176
 177def rtems_filesystem_mt_unlock():
 178    r"""rtems_filesystem_mt_unlock()"""
 179    return _libio_.rtems_filesystem_mt_unlock()
 180
 181def rtems_filesystem_instance_lock(loc):
 182    r"""
 183    rtems_filesystem_instance_lock(rtems_filesystem_location_info_t const * loc)
 184
 185    Parameters
 186    ----------
 187    loc: rtems_filesystem_location_info_t const *
 188
 189    """
 190    return _libio_.rtems_filesystem_instance_lock(loc)
 191
 192def rtems_filesystem_instance_unlock(loc):
 193    r"""
 194    rtems_filesystem_instance_unlock(rtems_filesystem_location_info_t const * loc)
 195
 196    Parameters
 197    ----------
 198    loc: rtems_filesystem_location_info_t const *
 199
 200    """
 201    return _libio_.rtems_filesystem_instance_unlock(loc)
 202
 203def rtems_filesystem_utime_tv_nsec_valid(time):
 204    r"""
 205    Checks the tv_nsec member of a timespec struct
 206
 207    This function is used with utimensat() and futimens() only. This ensures
 208    that the value in the tv_nsec member is equal to either UTIME_NOW,
 209    UTIME_OMIT, or a value greater-than or equal to zero and less than a
 210    billion.
 211
 212    :type time: struct timespec, in
 213    :param time: The timespec struct to be validated
 214    """
 215    return _libio_.rtems_filesystem_utime_tv_nsec_valid(time)
 216
 217def rtems_filesystem_utime_check_permissions(currentloc, times):
 218    r"""
 219    Checks for errors and if the process has write permissions to the file.
 220
 221    This function is only used with utimensat() and futimens().It checks for
 222    EACCES and EPERM errors depending on what values are in *times* and if the
 223    process has write permissions to the file.
 224
 225    :type currentloc: rtems_filesystem_location_info_t, in
 226    :param currentloc: The current location to a file
 227    :type times: struct timespec, in
 228    :param times: The timespecs used to check for errors. The timespec at
 229                         index 0 is the access time, and the timespec at index 1 is
 230                         the modification time.
 231    """
 232    return _libio_.rtems_filesystem_utime_check_permissions(currentloc, times)
 233
 234def rtems_filesystem_utime_update(times, new_times):
 235    r"""
 236    Checks *times* and fills *new_times* with the time to be written
 237
 238    This function is only used with utimensat() and futimens(). *times* contains
 239    the constant values passed into utimensat/futimens. *new_times* contains the
 240    values that will be written to the file. These values depend on *times*. If
 241    *times* is NULL, or either of its elements' tv_nsec members are UTIME_NOW,
 242    the current elapsed time in nanoseconds will be saved in the corresponding
 243    location in *new_times*.
 244
 245    For each of the arguments, the timespec at index 0 is the access time, and
 246    the timespec at index 1 is the modification time.
 247
 248    :type times: struct timespec, in
 249    :param times: The timespecs to be checked
 250    :type new_times: struct timespec, out
 251    :param new_times: The timespecs containing the time to be written
 252    """
 253    return _libio_.rtems_filesystem_utime_update(times, new_times)
 254
 255def rtems_libio_allocate():
 256    r"""
 257    This routine searches the IOP Table for an unused entry.  If it
 258    finds one, it returns it.  Otherwise, it returns NULL.
 259    """
 260    return _libio_.rtems_libio_allocate()
 261
 262def rtems_libio_fcntl_flags(fcntl_flags):
 263    r"""Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand"""
 264    return _libio_.rtems_libio_fcntl_flags(fcntl_flags)
 265
 266def rtems_libio_to_fcntl_flags(flags):
 267    r"""Convert RTEMS internal flags to UNIX fnctl(2) flags"""
 268    return _libio_.rtems_libio_to_fcntl_flags(flags)
 269
 270def rtems_libio_free(iop):
 271    r"""
 272    This routine frees the resources associated with an IOP (file descriptor)
 273    and clears the slot in the IOP Table.
 274    """
 275    return _libio_.rtems_libio_free(iop)
 276
 277def rtems_libio_count_open_iops():
 278    r"""Return the number of open iop descriptors"""
 279    return _libio_.rtems_libio_count_open_iops()
 280
 281def rtems_filesystem_eval_path_start(ctx, path, eval_flags):
 282    r"""
 283    rtems_filesystem_eval_path_start(rtems_filesystem_eval_path_context_t * ctx, char const * path, int eval_flags) -> rtems_filesystem_location_info_t *
 284
 285    Parameters
 286    ----------
 287    ctx: rtems_filesystem_eval_path_context_t *
 288    path: char const *
 289    eval_flags: int
 290
 291    """
 292    return _libio_.rtems_filesystem_eval_path_start(ctx, path, eval_flags)
 293
 294def rtems_filesystem_eval_path_start_with_parent(ctx, path, eval_flags, parentloc, parent_eval_flags):
 295    r"""
 296    rtems_filesystem_eval_path_start_with_parent(rtems_filesystem_eval_path_context_t * ctx, char const * path, int eval_flags, rtems_filesystem_location_info_t * parentloc, int parent_eval_flags) -> rtems_filesystem_location_info_t *
 297
 298    Parameters
 299    ----------
 300    ctx: rtems_filesystem_eval_path_context_t *
 301    path: char const *
 302    eval_flags: int
 303    parentloc: rtems_filesystem_location_info_t *
 304    parent_eval_flags: int
 305
 306    """
 307    return _libio_.rtems_filesystem_eval_path_start_with_parent(ctx, path, eval_flags, parentloc, parent_eval_flags)
 308
 309def rtems_filesystem_eval_path_start_with_root_and_current(ctx, path, pathlen, eval_flags, global_root_ptr, global_current_ptr):
 310    r"""
 311    rtems_filesystem_eval_path_start_with_root_and_current(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const * global_root_ptr, rtems_filesystem_global_location_t *const * global_current_ptr) -> rtems_filesystem_location_info_t *
 312
 313    Parameters
 314    ----------
 315    ctx: rtems_filesystem_eval_path_context_t *
 316    path: char const *
 317    pathlen: size_t
 318    eval_flags: int
 319    global_root_ptr: rtems_filesystem_global_location_t *const *
 320    global_current_ptr: rtems_filesystem_global_location_t *const *
 321
 322    """
 323    return _libio_.rtems_filesystem_eval_path_start_with_root_and_current(ctx, path, pathlen, eval_flags, global_root_ptr, global_current_ptr)
 324
 325def rtems_filesystem_eval_path_continue(ctx):
 326    r"""
 327    rtems_filesystem_eval_path_continue(rtems_filesystem_eval_path_context_t * ctx)
 328
 329    Parameters
 330    ----------
 331    ctx: rtems_filesystem_eval_path_context_t *
 332
 333    """
 334    return _libio_.rtems_filesystem_eval_path_continue(ctx)
 335
 336def rtems_filesystem_eval_path_cleanup(ctx):
 337    r"""
 338    rtems_filesystem_eval_path_cleanup(rtems_filesystem_eval_path_context_t * ctx)
 339
 340    Parameters
 341    ----------
 342    ctx: rtems_filesystem_eval_path_context_t *
 343
 344    """
 345    return _libio_.rtems_filesystem_eval_path_cleanup(ctx)
 346
 347def rtems_filesystem_eval_path_recursive(ctx, path, pathlen):
 348    r"""
 349    rtems_filesystem_eval_path_recursive(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen)
 350
 351    Parameters
 352    ----------
 353    ctx: rtems_filesystem_eval_path_context_t *
 354    path: char const *
 355    pathlen: size_t
 356
 357    """
 358    return _libio_.rtems_filesystem_eval_path_recursive(ctx, path, pathlen)
 359
 360def rtems_filesystem_eval_path_cleanup_with_parent(ctx, parentloc):
 361    r"""
 362    rtems_filesystem_eval_path_cleanup_with_parent(rtems_filesystem_eval_path_context_t * ctx, rtems_filesystem_location_info_t * parentloc)
 363
 364    Parameters
 365    ----------
 366    ctx: rtems_filesystem_eval_path_context_t *
 367    parentloc: rtems_filesystem_location_info_t *
 368
 369    """
 370    return _libio_.rtems_filesystem_eval_path_cleanup_with_parent(ctx, parentloc)
 371
 372def rtems_filesystem_eval_path_restart(ctx, newstartloc_ptr):
 373    r"""
 374    Requests a path evaluation restart.
 375
 376    Sets the start and current location to the new start location.  The caller
 377    must terminate its current evaluation process.  The path evaluation
 378    continues in the next loop iteration within
 379    rtems_filesystem_eval_path_continue().  This avoids recursive invocations.
 380    The function obtains the new start location and clones it to set the new
 381    current location.  The previous start and current locations are released.
 382
 383    :param out]: ctx The path evaluation context.
 384    :param out]: newstartloc_ptr Pointer to the new start location.
 385    """
 386    return _libio_.rtems_filesystem_eval_path_restart(ctx, newstartloc_ptr)
 387RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE = _libio_.RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE
 388
 389RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE = _libio_.RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE
 390
 391RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY = _libio_.RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY
 392
 393class rtems_filesystem_eval_path_generic_config(object):
 394    r"""Proxy of C rtems_filesystem_eval_path_generic_config struct."""
 395
 396    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 397    __repr__ = _swig_repr
 398    is_directory = property(_libio_.rtems_filesystem_eval_path_generic_config_is_directory_get, _libio_.rtems_filesystem_eval_path_generic_config_is_directory_set, doc=r"""is_directory : rtems_filesystem_eval_path_is_directory""")
 399    eval_token = property(_libio_.rtems_filesystem_eval_path_generic_config_eval_token_get, _libio_.rtems_filesystem_eval_path_generic_config_eval_token_set, doc=r"""eval_token : rtems_filesystem_eval_path_eval_token""")
 400
 401    def __init__(self):
 402        r"""__init__(rtems_filesystem_eval_path_generic_config self) -> rtems_filesystem_eval_path_generic_config"""
 403        _libio_.rtems_filesystem_eval_path_generic_config_swiginit(self, _libio_.new_rtems_filesystem_eval_path_generic_config())
 404    __swig_destroy__ = _libio_.delete_rtems_filesystem_eval_path_generic_config
 405
 406# Register rtems_filesystem_eval_path_generic_config in _libio_:
 407_libio_.rtems_filesystem_eval_path_generic_config_swigregister(rtems_filesystem_eval_path_generic_config)
 408cvar = _libio_.cvar
 409rtems_libio_number_iops = cvar.rtems_libio_number_iops
 410rtems_filesystem_null_handlers = cvar.rtems_filesystem_null_handlers
 411
 412
 413def rtems_filesystem_eval_path_generic(ctx, arg, config):
 414    r"""
 415    rtems_filesystem_eval_path_generic(rtems_filesystem_eval_path_context_t * ctx, void * arg, rtems_filesystem_eval_path_generic_config config)
 416
 417    Parameters
 418    ----------
 419    ctx: rtems_filesystem_eval_path_context_t *
 420    arg: void *
 421    config: rtems_filesystem_eval_path_generic_config const *
 422
 423    """
 424    return _libio_.rtems_filesystem_eval_path_generic(ctx, arg, config)
 425
 426def rtems_filesystem_initialize():
 427    r"""rtems_filesystem_initialize()"""
 428    return _libio_.rtems_filesystem_initialize()
 429
 430def rtems_filesystem_location_copy(dst, src):
 431    r"""
 432    Copies a location.
 433
 434    A bitwise copy is performed.  The destination location will be added to the
 435    corresponding mount entry.
 436
 437    :type dst: rtems_filesystem_location_info_t, out
 438    :param dst: The destination location.
 439    :type src: rtems_filesystem_location_info_t, in
 440    :param src: The  source location.
 441
 442    See also: rtems_filesystem_location_clone().
 443    """
 444    return _libio_.rtems_filesystem_location_copy(dst, src)
 445
 446def rtems_filesystem_location_initialize_to_null(loc):
 447    r"""
 448    rtems_filesystem_location_initialize_to_null(rtems_filesystem_location_info_t * loc) -> rtems_filesystem_location_info_t *
 449
 450    Parameters
 451    ----------
 452    loc: rtems_filesystem_location_info_t *
 453
 454    """
 455    return _libio_.rtems_filesystem_location_initialize_to_null(loc)
 456
 457def rtems_filesystem_location_transform_to_global(loc):
 458    r"""
 459    rtems_filesystem_location_transform_to_global(rtems_filesystem_location_info_t * loc) -> rtems_filesystem_global_location_t *
 460
 461    Parameters
 462    ----------
 463    loc: rtems_filesystem_location_info_t *
 464
 465    """
 466    return _libio_.rtems_filesystem_location_transform_to_global(loc)
 467
 468def rtems_filesystem_global_location_assign(lhs_global_loc_ptr, rhs_global_loc):
 469    r"""
 470    Assigns a global file system location.
 471
 472    :param out]: lhs_global_loc_ptr Pointer to the global left hand side file
 473        system location.  The current left hand side location will be released.
 474    :type rhs_global_loc: rtems_filesystem_global_location_t, in
 475    :param rhs_global_loc: The global right hand side file system location.
 476    """
 477    return _libio_.rtems_filesystem_global_location_assign(lhs_global_loc_ptr, rhs_global_loc)
 478
 479def rtems_filesystem_global_location_obtain(global_loc_ptr):
 480    r"""
 481    Obtains a global file system location.
 482
 483    Deferred releases will be processed in this function.
 484
 485    This function must be called from normal thread context and may block on a
 486    mutex.  Thread dispatching is disabled to protect some critical sections.
 487
 488    :type global_loc_ptr: rtems_filesystem_global_location_t, in
 489    :param global_loc_ptr: Pointer to the global file system location.
 490
 491    :rtype: rtems_filesystem_global_location_t
 492    :return: A global file system location.  It returns always a valid object.
 493        In case of an error, the global null location will be returned.  Each
 494        operation or handler of the null location returns an error status.  The
 495        errno indicates the error.  The NULL pointer is never returned.
 496
 497    See also: rtems_filesystem_location_transform_to_global(),
 498    rtems_filesystem_global_location_obtain_null(), and
 499    rtems_filesystem_global_location_release().
 500    """
 501    return _libio_.rtems_filesystem_global_location_obtain(global_loc_ptr)
 502
 503def rtems_filesystem_global_location_release(global_loc, deferred):
 504    r"""
 505    Releases a global file system location.
 506
 507    In case the reference count reaches zero, all associated resources will be
 508    released.  This may include the complete unmount of the corresponding file
 509    system instance.
 510
 511    This function may block on a mutex.  It may be called within critical
 512    sections of the operating system.  In this case the release will be
 513    deferred.  The next obtain call will do the actual release.
 514
 515    :type global_loc: rtems_filesystem_global_location_t, in
 516    :param global_loc: The global file system location.  It must not be NULL.
 517    :type deferred: boolean, in
 518    :param deferred: If true, then do a deferred release, otherwise release
 519          it immediately.
 520
 521    See also: rtems_filesystem_global_location_obtain().
 522    """
 523    return _libio_.rtems_filesystem_global_location_release(global_loc, deferred)
 524
 525def rtems_filesystem_location_detach(detach):
 526    r"""
 527    rtems_filesystem_location_detach(rtems_filesystem_location_info_t * detach)
 528
 529    Parameters
 530    ----------
 531    detach: rtems_filesystem_location_info_t *
 532
 533    """
 534    return _libio_.rtems_filesystem_location_detach(detach)
 535
 536def rtems_filesystem_location_copy_and_detach(copy, detach):
 537    r"""
 538    rtems_filesystem_location_copy_and_detach(rtems_filesystem_location_info_t * copy, rtems_filesystem_location_info_t * detach)
 539
 540    Parameters
 541    ----------
 542    copy: rtems_filesystem_location_info_t *
 543    detach: rtems_filesystem_location_info_t *
 544
 545    """
 546    return _libio_.rtems_filesystem_location_copy_and_detach(copy, detach)
 547
 548def rtems_filesystem_global_location_obtain_null():
 549    r"""rtems_filesystem_global_location_obtain_null() -> rtems_filesystem_global_location_t *"""
 550    return _libio_.rtems_filesystem_global_location_obtain_null()
 551
 552def rtems_filesystem_location_is_null(loc):
 553    r"""
 554    rtems_filesystem_location_is_null(rtems_filesystem_location_info_t const * loc) -> bool
 555
 556    Parameters
 557    ----------
 558    loc: rtems_filesystem_location_info_t const *
 559
 560    """
 561    return _libio_.rtems_filesystem_location_is_null(loc)
 562
 563def rtems_filesystem_global_location_is_null(global_loc):
 564    r"""
 565    rtems_filesystem_global_location_is_null(rtems_filesystem_global_location_t const * global_loc) -> bool
 566
 567    Parameters
 568    ----------
 569    global_loc: rtems_filesystem_global_location_t const *
 570
 571    """
 572    return _libio_.rtems_filesystem_global_location_is_null(global_loc)
 573
 574def rtems_filesystem_location_error(loc, eno):
 575    r"""
 576    rtems_filesystem_location_error(rtems_filesystem_location_info_t const * loc, int eno)
 577
 578    Parameters
 579    ----------
 580    loc: rtems_filesystem_location_info_t const *
 581    eno: int
 582
 583    """
 584    return _libio_.rtems_filesystem_location_error(loc, eno)
 585
 586def rtems_filesystem_mknod(parentloc, name, namelen, mode, dev):
 587    r"""
 588    rtems_filesystem_mknod(rtems_filesystem_location_info_t const * parentloc, char const * name, size_t namelen, mode_t mode, dev_t dev) -> int
 589
 590    Parameters
 591    ----------
 592    parentloc: rtems_filesystem_location_info_t const *
 593    name: char const *
 594    namelen: size_t
 595    mode: mode_t
 596    dev: dev_t
 597
 598    """
 599    return _libio_.rtems_filesystem_mknod(parentloc, name, namelen, mode, dev)
 600
 601def rtems_filesystem_chdir(loc):
 602    r"""
 603    rtems_filesystem_chdir(rtems_filesystem_location_info_t * loc) -> int
 604
 605    Parameters
 606    ----------
 607    loc: rtems_filesystem_location_info_t *
 608
 609    """
 610    return _libio_.rtems_filesystem_chdir(loc)
 611
 612def rtems_filesystem_chmod(loc, mode):
 613    r"""
 614    rtems_filesystem_chmod(rtems_filesystem_location_info_t const * loc, mode_t mode) -> int
 615
 616    Parameters
 617    ----------
 618    loc: rtems_filesystem_location_info_t const *
 619    mode: mode_t
 620
 621    """
 622    return _libio_.rtems_filesystem_chmod(loc, mode)
 623
 624def rtems_filesystem_chown(loc, owner, group):
 625    r"""
 626    rtems_filesystem_chown(rtems_filesystem_location_info_t const * loc, uid_t owner, gid_t group) -> int
 627
 628    Parameters
 629    ----------
 630    loc: rtems_filesystem_location_info_t const *
 631    owner: uid_t
 632    group: gid_t
 633
 634    """
 635    return _libio_.rtems_filesystem_chown(loc, owner, group)
 636
 637def rtems_filesystem_is_ready_for_unmount(mt_entry):
 638    r"""
 639    rtems_filesystem_is_ready_for_unmount(rtems_filesystem_mount_table_entry_t * mt_entry) -> bool
 640
 641    Parameters
 642    ----------
 643    mt_entry: rtems_filesystem_mount_table_entry_t *
 644
 645    """
 646    return _libio_.rtems_filesystem_is_ready_for_unmount(mt_entry)
 647
 648def rtems_filesystem_location_add_to_mt_entry(loc):
 649    r"""
 650    rtems_filesystem_location_add_to_mt_entry(rtems_filesystem_location_info_t * loc)
 651
 652    Parameters
 653    ----------
 654    loc: rtems_filesystem_location_info_t *
 655
 656    """
 657    return _libio_.rtems_filesystem_location_add_to_mt_entry(loc)
 658
 659def rtems_filesystem_location_remove_from_mt_entry(loc):
 660    r"""
 661    rtems_filesystem_location_remove_from_mt_entry(rtems_filesystem_location_info_t * loc)
 662
 663    Parameters
 664    ----------
 665    loc: rtems_filesystem_location_info_t *
 666
 667    """
 668    return _libio_.rtems_filesystem_location_remove_from_mt_entry(loc)
 669
 670def rtems_filesystem_do_unmount(mt_entry):
 671    r"""
 672    rtems_filesystem_do_unmount(rtems_filesystem_mount_table_entry_t * mt_entry)
 673
 674    Parameters
 675    ----------
 676    mt_entry: rtems_filesystem_mount_table_entry_t *
 677
 678    """
 679    return _libio_.rtems_filesystem_do_unmount(mt_entry)
 680
 681def rtems_filesystem_location_is_instance_root(loc):
 682    r"""
 683    rtems_filesystem_location_is_instance_root(rtems_filesystem_location_info_t const * loc) -> bool
 684
 685    Parameters
 686    ----------
 687    loc: rtems_filesystem_location_info_t const *
 688
 689    """
 690    return _libio_.rtems_filesystem_location_is_instance_root(loc)
 691
 692def rtems_filesystem_eval_path_get_path(ctx):
 693    r"""
 694    rtems_filesystem_eval_path_get_path(rtems_filesystem_eval_path_context_t const * ctx) -> char const *
 695
 696    Parameters
 697    ----------
 698    ctx: rtems_filesystem_eval_path_context_t const *
 699
 700    """
 701    return _libio_.rtems_filesystem_eval_path_get_path(ctx)
 702
 703def rtems_filesystem_eval_path_get_pathlen(ctx):
 704    r"""
 705    rtems_filesystem_eval_path_get_pathlen(rtems_filesystem_eval_path_context_t const * ctx) -> size_t
 706
 707    Parameters
 708    ----------
 709    ctx: rtems_filesystem_eval_path_context_t const *
 710
 711    """
 712    return _libio_.rtems_filesystem_eval_path_get_pathlen(ctx)
 713
 714def rtems_filesystem_eval_path_set_path(ctx, path, pathlen):
 715    r"""
 716    rtems_filesystem_eval_path_set_path(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen)
 717
 718    Parameters
 719    ----------
 720    ctx: rtems_filesystem_eval_path_context_t *
 721    path: char const *
 722    pathlen: size_t
 723
 724    """
 725    return _libio_.rtems_filesystem_eval_path_set_path(ctx, path, pathlen)
 726
 727def rtems_filesystem_eval_path_clear_path(ctx):
 728    r"""
 729    rtems_filesystem_eval_path_clear_path(rtems_filesystem_eval_path_context_t * ctx)
 730
 731    Parameters
 732    ----------
 733    ctx: rtems_filesystem_eval_path_context_t *
 734
 735    """
 736    return _libio_.rtems_filesystem_eval_path_clear_path(ctx)
 737
 738def rtems_filesystem_eval_path_get_token(ctx):
 739    r"""
 740    rtems_filesystem_eval_path_get_token(rtems_filesystem_eval_path_context_t const * ctx) -> char const *
 741
 742    Parameters
 743    ----------
 744    ctx: rtems_filesystem_eval_path_context_t const *
 745
 746    """
 747    return _libio_.rtems_filesystem_eval_path_get_token(ctx)
 748
 749def rtems_filesystem_eval_path_get_tokenlen(ctx):
 750    r"""
 751    rtems_filesystem_eval_path_get_tokenlen(rtems_filesystem_eval_path_context_t const * ctx) -> size_t
 752
 753    Parameters
 754    ----------
 755    ctx: rtems_filesystem_eval_path_context_t const *
 756
 757    """
 758    return _libio_.rtems_filesystem_eval_path_get_tokenlen(ctx)
 759
 760def rtems_filesystem_eval_path_set_token(ctx, token, tokenlen):
 761    r"""
 762    rtems_filesystem_eval_path_set_token(rtems_filesystem_eval_path_context_t * ctx, char const * token, size_t tokenlen)
 763
 764    Parameters
 765    ----------
 766    ctx: rtems_filesystem_eval_path_context_t *
 767    token: char const *
 768    tokenlen: size_t
 769
 770    """
 771    return _libio_.rtems_filesystem_eval_path_set_token(ctx, token, tokenlen)
 772
 773def rtems_filesystem_eval_path_clear_token(ctx):
 774    r"""
 775    rtems_filesystem_eval_path_clear_token(rtems_filesystem_eval_path_context_t * ctx)
 776
 777    Parameters
 778    ----------
 779    ctx: rtems_filesystem_eval_path_context_t *
 780
 781    """
 782    return _libio_.rtems_filesystem_eval_path_clear_token(ctx)
 783
 784def rtems_filesystem_eval_path_put_back_token(ctx):
 785    r"""
 786    rtems_filesystem_eval_path_put_back_token(rtems_filesystem_eval_path_context_t * ctx)
 787
 788    Parameters
 789    ----------
 790    ctx: rtems_filesystem_eval_path_context_t *
 791
 792    """
 793    return _libio_.rtems_filesystem_eval_path_put_back_token(ctx)
 794
 795def rtems_filesystem_eval_path_eat_delimiter(ctx):
 796    r"""
 797    rtems_filesystem_eval_path_eat_delimiter(rtems_filesystem_eval_path_context_t * ctx)
 798
 799    Parameters
 800    ----------
 801    ctx: rtems_filesystem_eval_path_context_t *
 802
 803    """
 804    return _libio_.rtems_filesystem_eval_path_eat_delimiter(ctx)
 805
 806def rtems_filesystem_eval_path_next_token(ctx):
 807    r"""
 808    rtems_filesystem_eval_path_next_token(rtems_filesystem_eval_path_context_t * ctx)
 809
 810    Parameters
 811    ----------
 812    ctx: rtems_filesystem_eval_path_context_t *
 813
 814    """
 815    return _libio_.rtems_filesystem_eval_path_next_token(ctx)
 816
 817def rtems_filesystem_eval_path_get_next_token(ctx, token, tokenlen):
 818    r"""
 819    rtems_filesystem_eval_path_get_next_token(rtems_filesystem_eval_path_context_t * ctx, char const ** token, size_t * tokenlen)
 820
 821    Parameters
 822    ----------
 823    ctx: rtems_filesystem_eval_path_context_t *
 824    token: char const **
 825    tokenlen: size_t *
 826
 827    """
 828    return _libio_.rtems_filesystem_eval_path_get_next_token(ctx, token, tokenlen)
 829
 830def rtems_filesystem_eval_path_get_currentloc(ctx):
 831    r"""
 832    rtems_filesystem_eval_path_get_currentloc(rtems_filesystem_eval_path_context_t * ctx) -> rtems_filesystem_location_info_t *
 833
 834    Parameters
 835    ----------
 836    ctx: rtems_filesystem_eval_path_context_t *
 837
 838    """
 839    return _libio_.rtems_filesystem_eval_path_get_currentloc(ctx)
 840
 841def rtems_filesystem_eval_path_has_path(ctx):
 842    r"""
 843    rtems_filesystem_eval_path_has_path(rtems_filesystem_eval_path_context_t const * ctx) -> bool
 844
 845    Parameters
 846    ----------
 847    ctx: rtems_filesystem_eval_path_context_t const *
 848
 849    """
 850    return _libio_.rtems_filesystem_eval_path_has_path(ctx)
 851
 852def rtems_filesystem_eval_path_has_token(ctx):
 853    r"""
 854    rtems_filesystem_eval_path_has_token(rtems_filesystem_eval_path_context_t const * ctx) -> bool
 855
 856    Parameters
 857    ----------
 858    ctx: rtems_filesystem_eval_path_context_t const *
 859
 860    """
 861    return _libio_.rtems_filesystem_eval_path_has_token(ctx)
 862
 863def rtems_filesystem_eval_path_get_flags(ctx):
 864    r"""
 865    rtems_filesystem_eval_path_get_flags(rtems_filesystem_eval_path_context_t const * ctx) -> int
 866
 867    Parameters
 868    ----------
 869    ctx: rtems_filesystem_eval_path_context_t const *
 870
 871    """
 872    return _libio_.rtems_filesystem_eval_path_get_flags(ctx)
 873
 874def rtems_filesystem_eval_path_set_flags(ctx, flags):
 875    r"""
 876    rtems_filesystem_eval_path_set_flags(rtems_filesystem_eval_path_context_t * ctx, int flags)
 877
 878    Parameters
 879    ----------
 880    ctx: rtems_filesystem_eval_path_context_t *
 881    flags: int
 882
 883    """
 884    return _libio_.rtems_filesystem_eval_path_set_flags(ctx, flags)
 885
 886def rtems_filesystem_eval_path_clear_and_set_flags(ctx, clear, set):
 887    r"""
 888    rtems_filesystem_eval_path_clear_and_set_flags(rtems_filesystem_eval_path_context_t * ctx, int clear, int set)
 889
 890    Parameters
 891    ----------
 892    ctx: rtems_filesystem_eval_path_context_t *
 893    clear: int
 894    set: int
 895
 896    """
 897    return _libio_.rtems_filesystem_eval_path_clear_and_set_flags(ctx, clear, set)
 898
 899def rtems_filesystem_eval_path_extract_currentloc(ctx, get):
 900    r"""
 901    rtems_filesystem_eval_path_extract_currentloc(rtems_filesystem_eval_path_context_t * ctx, rtems_filesystem_location_info_t * get)
 902
 903    Parameters
 904    ----------
 905    ctx: rtems_filesystem_eval_path_context_t *
 906    get: rtems_filesystem_location_info_t *
 907
 908    """
 909    return _libio_.rtems_filesystem_eval_path_extract_currentloc(ctx, get)
 910
 911def rtems_filesystem_eval_path_error(ctx, eno):
 912    r"""
 913    rtems_filesystem_eval_path_error(rtems_filesystem_eval_path_context_t * ctx, int eno)
 914
 915    Parameters
 916    ----------
 917    ctx: rtems_filesystem_eval_path_context_t *
 918    eno: int
 919
 920    """
 921    return _libio_.rtems_filesystem_eval_path_error(ctx, eno)
 922
 923def rtems_filesystem_location_exists_in_same_instance_as(a, b):
 924    r"""Checks that the locations exist in the same file system instance."""
 925    return _libio_.rtems_filesystem_location_exists_in_same_instance_as(a, b)
 926
 927def rtems_filesystem_check_access(flags, object_mode, object_uid, object_gid):
 928    r"""
 929    Checks if access to an object is allowed for the current user.
 930
 931    If the effective UID is zero or equals the UID of the object, then the user
 932    permission flags of the object will be used.  Otherwise if the effective GID
 933    is zero or equals the GID of the object or one of the supplementary group
 934    IDs is equal to the GID of the object, then the group permission flags of
 935    the object will be used.  Otherwise the other permission flags of the object
 936    will be used.
 937
 938    :type flags: int, in
 939    :param flags: The flags determining the access type.  It can be
 940          RTEMS_FS_PERMS_READ, RTEMS_FS_PERMS_WRITE or RTEMS_FS_PERMS_EXEC.
 941    :type object_mode: mode_t, in
 942    :param object_mode: The mode of the object specifying the permission flags.
 943    :type object_uid: uid_t, in
 944    :param object_uid: The UID of the object.
 945    :type object_gid: gid_t, in
 946    :param object_gid: The GID of the object.
 947    """
 948    return _libio_.rtems_filesystem_check_access(flags, object_mode, object_uid, object_gid)
 949
 950def rtems_filesystem_eval_path_check_access(ctx, eval_flags, node_mode, node_uid, node_gid):
 951    r"""
 952    rtems_filesystem_eval_path_check_access(rtems_filesystem_eval_path_context_t * ctx, int eval_flags, mode_t node_mode, uid_t node_uid, gid_t node_gid) -> bool
 953
 954    Parameters
 955    ----------
 956    ctx: rtems_filesystem_eval_path_context_t *
 957    eval_flags: int
 958    node_mode: mode_t
 959    node_uid: uid_t
 960    node_gid: gid_t
 961
 962    """
 963    return _libio_.rtems_filesystem_eval_path_check_access(ctx, eval_flags, node_mode, node_uid, node_gid)
 964
 965def rtems_filesystem_is_delimiter(c):
 966    r"""
 967    rtems_filesystem_is_delimiter(char c) -> bool
 968
 969    Parameters
 970    ----------
 971    c: char
 972
 973    """
 974    return _libio_.rtems_filesystem_is_delimiter(c)
 975
 976def rtems_filesystem_is_current_directory(token, tokenlen):
 977    r"""
 978    rtems_filesystem_is_current_directory(char const * token, size_t tokenlen) -> bool
 979
 980    Parameters
 981    ----------
 982    token: char const *
 983    tokenlen: size_t
 984
 985    """
 986    return _libio_.rtems_filesystem_is_current_directory(token, tokenlen)
 987
 988def rtems_filesystem_is_parent_directory(token, tokenlen):
 989    r"""
 990    rtems_filesystem_is_parent_directory(char const * token, size_t tokenlen) -> bool
 991
 992    Parameters
 993    ----------
 994    token: char const *
 995    tokenlen: size_t
 996
 997    """
 998    return _libio_.rtems_filesystem_is_parent_directory(token, tokenlen)
 999
1000def rtems_libio_iovec_eval(fd, iov, iovcnt, flags, adapter):
1001    r"""
1002    rtems_libio_iovec_eval(int fd, struct iovec const * iov, int iovcnt, unsigned int flags, rtems_libio_iovec_adapter adapter) -> ssize_t
1003
1004    Parameters
1005    ----------
1006    fd: int
1007    iov: struct iovec const *
1008    iovcnt: int
1009    flags: unsigned int
1010    adapter: rtems_libio_iovec_adapter
1011
1012    """
1013    return _libio_.rtems_libio_iovec_eval(fd, iov, iovcnt, flags, adapter)
1014
1015def rtems_filesystem_location_type(loc):
1016    r"""
1017    Returns the file type of the file referenced by the filesystem
1018    location.
1019
1020    loc The filesystem location.
1021
1022    :rtype: mode_t
1023    :return: The type of the file or an invalid file type in case of an error.
1024    """
1025    return _libio_.rtems_filesystem_location_type(loc)
RTEMS_FILESYSTEM_SYMLOOP_MAX = See C documentation

*

F_DUP2FD = See C documentation
def rtems_libio_iop_flags_set(iop, set):
63def rtems_libio_iop_flags_set(iop, set):
64    r"""
65    Sets the specified flags in the iop.
66
67    :type iop: rtems_libio_t, in
68    :param iop: The iop.
69    :type set: int, in
70    :param set: The flags to set.
71
72    :rtype: int
73    :return: The previous flags.
74    """
75    return _libio_.rtems_libio_iop_flags_set(iop, set)

Sets the specified flags in the iop.

Parameters
  • iop: The iop.
  • set: The flags to set.
Returns

The previous flags.

def rtems_libio_iop_flags_clear(iop, clear):
77def rtems_libio_iop_flags_clear(iop, clear):
78    r"""
79    Clears the specified flags in the iop.
80
81    :type iop: rtems_libio_t, in
82    :param iop: The iop.
83    :type clear: int, in
84    :param clear: The flags to clear.
85
86    :rtype: int
87    :return: The previous flags.
88    """
89    return _libio_.rtems_libio_iop_flags_clear(iop, clear)

Clears the specified flags in the iop.

Parameters
  • iop: The iop.
  • clear: The flags to clear.
Returns

The previous flags.

def rtems_libio_iop(fd):
 91def rtems_libio_iop(fd):
 92    r"""
 93    Maps a file descriptor to the iop.
 94
 95    The file descriptor must be a valid index into the iop table.
 96
 97    :type fd: int, in
 98    :param fd: The file descriptor.
 99
100    :rtype: rtems_libio_t
101    :return: The iop corresponding to the specified file descriptor.
102    """
103    return _libio_.rtems_libio_iop(fd)

Maps a file descriptor to the iop.

The file descriptor must be a valid index into the iop table.

Parameters
  • fd: The file descriptor.
Returns

The iop corresponding to the specified file descriptor.

def rtems_libio_iop_hold(iop):
105def rtems_libio_iop_hold(iop):
106    r"""
107    Holds a refernece to the iop.
108
109    :type iop: rtems_libio_t, in
110    :param iop: The iop.
111
112    :rtype: int
113    :return: The flags corresponding to the specified iop.
114    """
115    return _libio_.rtems_libio_iop_hold(iop)

Holds a refernece to the iop.

Parameters
  • iop: The iop.
Returns

The flags corresponding to the specified iop.

def rtems_libio_iop_drop(iop):
117def rtems_libio_iop_drop(iop):
118    r"""
119    Drops a refernece to the iop.
120
121    :type iop: rtems_libio_t, in
122    :param iop: The iop.
123    """
124    return _libio_.rtems_libio_iop_drop(iop)

Drops a refernece to the iop.

Parameters
  • iop: The iop.
def rtems_filesystem_location_clone(clone, master):
126def rtems_filesystem_location_clone(clone, master):
127    r"""
128    Macro to get the iop for the specified file descriptor.
129
130    Checks that the file descriptor is in the valid range and open.
131
132    Macro to get the iop for the specified file descriptor with access
133    flags and error.
134
135    Checks that the file descriptor is in the valid range and open.
136
137    Clones a node.
138
139    The caller must hold the file system instance lock.
140
141    :type clone: rtems_filesystem_location_info_t, out
142    :param clone: The cloned location.
143    :type master: rtems_filesystem_location_info_t, in
144    :param master: The master location.
145
146    See also: rtems_filesystem_instance_lock().
147    """
148    return _libio_.rtems_filesystem_location_clone(clone, master)

Macro to get the iop for the specified file descriptor.

Checks that the file descriptor is in the valid range and open.

Macro to get the iop for the specified file descriptor with access flags and error.

Checks that the file descriptor is in the valid range and open.

Clones a node.

The caller must hold the file system instance lock.

Parameters
  • clone: The cloned location.
  • master: The master location.

See also: rtems_filesystem_instance_lock().

def rtems_filesystem_location_free(loc):
150def rtems_filesystem_location_free(loc):
151    r"""
152    Releases all resources of a location.
153
154    This function may block on a mutex and may complete an unmount process.
155
156    :type loc: rtems_filesystem_location_info_t, in
157    :param loc: The location to free.
158
159    Notes: The file system root location is released by the file system
160    instance destruction handler (see 'rtems_filesystem_fsunmount_me_t)'.
161
162    See also: rtems_filesystem_freenode_t.
163    """
164    return _libio_.rtems_filesystem_location_free(loc)

Releases all resources of a location.

This function may block on a mutex and may complete an unmount process.

Parameters
  • loc: The location to free.

Notes: The file system root location is released by the file system instance destruction handler (see 'rtems_filesystem_fsunmount_me_t)'.

See also: rtems_filesystem_freenode_t.

def rtems_libio_lock():
166def rtems_libio_lock():
167    r"""rtems_libio_lock()"""
168    return _libio_.rtems_libio_lock()

rtems_libio_lock()

def rtems_libio_unlock():
170def rtems_libio_unlock():
171    r"""rtems_libio_unlock()"""
172    return _libio_.rtems_libio_unlock()

rtems_libio_unlock()

def rtems_filesystem_mt_lock():
174def rtems_filesystem_mt_lock():
175    r"""rtems_filesystem_mt_lock()"""
176    return _libio_.rtems_filesystem_mt_lock()

rtems_filesystem_mt_lock()

def rtems_filesystem_mt_unlock():
178def rtems_filesystem_mt_unlock():
179    r"""rtems_filesystem_mt_unlock()"""
180    return _libio_.rtems_filesystem_mt_unlock()

rtems_filesystem_mt_unlock()

def rtems_filesystem_instance_lock(loc):
182def rtems_filesystem_instance_lock(loc):
183    r"""
184    rtems_filesystem_instance_lock(rtems_filesystem_location_info_t const * loc)
185
186    Parameters
187    ----------
188    loc: rtems_filesystem_location_info_t const *
189
190    """
191    return _libio_.rtems_filesystem_instance_lock(loc)

rtems_filesystem_instance_lock(rtems_filesystem_location_info_t const * loc)

Parameters

loc: rtems_filesystem_location_info_t const *

def rtems_filesystem_instance_unlock(loc):
193def rtems_filesystem_instance_unlock(loc):
194    r"""
195    rtems_filesystem_instance_unlock(rtems_filesystem_location_info_t const * loc)
196
197    Parameters
198    ----------
199    loc: rtems_filesystem_location_info_t const *
200
201    """
202    return _libio_.rtems_filesystem_instance_unlock(loc)

rtems_filesystem_instance_unlock(rtems_filesystem_location_info_t const * loc)

Parameters

loc: rtems_filesystem_location_info_t const *

def rtems_filesystem_utime_tv_nsec_valid(time):
204def rtems_filesystem_utime_tv_nsec_valid(time):
205    r"""
206    Checks the tv_nsec member of a timespec struct
207
208    This function is used with utimensat() and futimens() only. This ensures
209    that the value in the tv_nsec member is equal to either UTIME_NOW,
210    UTIME_OMIT, or a value greater-than or equal to zero and less than a
211    billion.
212
213    :type time: struct timespec, in
214    :param time: The timespec struct to be validated
215    """
216    return _libio_.rtems_filesystem_utime_tv_nsec_valid(time)

Checks the tv_nsec member of a timespec struct

This function is used with utimensat() and futimens() only. This ensures that the value in the tv_nsec member is equal to either UTIME_NOW, UTIME_OMIT, or a value greater-than or equal to zero and less than a billion.

Parameters
  • time: The timespec struct to be validated
def rtems_filesystem_utime_check_permissions(currentloc, times):
218def rtems_filesystem_utime_check_permissions(currentloc, times):
219    r"""
220    Checks for errors and if the process has write permissions to the file.
221
222    This function is only used with utimensat() and futimens().It checks for
223    EACCES and EPERM errors depending on what values are in *times* and if the
224    process has write permissions to the file.
225
226    :type currentloc: rtems_filesystem_location_info_t, in
227    :param currentloc: The current location to a file
228    :type times: struct timespec, in
229    :param times: The timespecs used to check for errors. The timespec at
230                         index 0 is the access time, and the timespec at index 1 is
231                         the modification time.
232    """
233    return _libio_.rtems_filesystem_utime_check_permissions(currentloc, times)

Checks for errors and if the process has write permissions to the file.

This function is only used with utimensat() and futimens().It checks for EACCES and EPERM errors depending on what values are in times and if the process has write permissions to the file.

Parameters
  • currentloc: The current location to a file
  • times: The timespecs used to check for errors. The timespec at index 0 is the access time, and the timespec at index 1 is the modification time.
def rtems_filesystem_utime_update(times, new_times):
235def rtems_filesystem_utime_update(times, new_times):
236    r"""
237    Checks *times* and fills *new_times* with the time to be written
238
239    This function is only used with utimensat() and futimens(). *times* contains
240    the constant values passed into utimensat/futimens. *new_times* contains the
241    values that will be written to the file. These values depend on *times*. If
242    *times* is NULL, or either of its elements' tv_nsec members are UTIME_NOW,
243    the current elapsed time in nanoseconds will be saved in the corresponding
244    location in *new_times*.
245
246    For each of the arguments, the timespec at index 0 is the access time, and
247    the timespec at index 1 is the modification time.
248
249    :type times: struct timespec, in
250    :param times: The timespecs to be checked
251    :type new_times: struct timespec, out
252    :param new_times: The timespecs containing the time to be written
253    """
254    return _libio_.rtems_filesystem_utime_update(times, new_times)

Checks times and fills new_times with the time to be written

This function is only used with utimensat() and futimens(). times contains the constant values passed into utimensat/futimens. new_times contains the values that will be written to the file. These values depend on times. If times is NULL, or either of its elements' tv_nsec members are UTIME_NOW, the current elapsed time in nanoseconds will be saved in the corresponding location in new_times.

For each of the arguments, the timespec at index 0 is the access time, and the timespec at index 1 is the modification time.

Parameters
  • times: The timespecs to be checked
  • new_times: The timespecs containing the time to be written
def rtems_libio_allocate():
256def rtems_libio_allocate():
257    r"""
258    This routine searches the IOP Table for an unused entry.  If it
259    finds one, it returns it.  Otherwise, it returns NULL.
260    """
261    return _libio_.rtems_libio_allocate()

This routine searches the IOP Table for an unused entry. If it finds one, it returns it. Otherwise, it returns NULL.

def rtems_libio_fcntl_flags(fcntl_flags):
263def rtems_libio_fcntl_flags(fcntl_flags):
264    r"""Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand"""
265    return _libio_.rtems_libio_fcntl_flags(fcntl_flags)

Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand

def rtems_libio_to_fcntl_flags(flags):
267def rtems_libio_to_fcntl_flags(flags):
268    r"""Convert RTEMS internal flags to UNIX fnctl(2) flags"""
269    return _libio_.rtems_libio_to_fcntl_flags(flags)

Convert RTEMS internal flags to UNIX fnctl(2) flags

def rtems_libio_free(iop):
271def rtems_libio_free(iop):
272    r"""
273    This routine frees the resources associated with an IOP (file descriptor)
274    and clears the slot in the IOP Table.
275    """
276    return _libio_.rtems_libio_free(iop)

This routine frees the resources associated with an IOP (file descriptor) and clears the slot in the IOP Table.

def rtems_libio_count_open_iops():
278def rtems_libio_count_open_iops():
279    r"""Return the number of open iop descriptors"""
280    return _libio_.rtems_libio_count_open_iops()

Return the number of open iop descriptors

def rtems_filesystem_eval_path_start(ctx, path, eval_flags):
282def rtems_filesystem_eval_path_start(ctx, path, eval_flags):
283    r"""
284    rtems_filesystem_eval_path_start(rtems_filesystem_eval_path_context_t * ctx, char const * path, int eval_flags) -> rtems_filesystem_location_info_t *
285
286    Parameters
287    ----------
288    ctx: rtems_filesystem_eval_path_context_t *
289    path: char const *
290    eval_flags: int
291
292    """
293    return _libio_.rtems_filesystem_eval_path_start(ctx, path, eval_flags)

rtems_filesystem_eval_path_start(rtems_filesystem_eval_path_context_t * ctx, char const * path, int eval_flags) -> rtems_filesystem_location_info_t *

Parameters

ctx: rtems_filesystem_eval_path_context_t * path: char const * eval_flags: int

def rtems_filesystem_eval_path_start_with_parent(ctx, path, eval_flags, parentloc, parent_eval_flags):
295def rtems_filesystem_eval_path_start_with_parent(ctx, path, eval_flags, parentloc, parent_eval_flags):
296    r"""
297    rtems_filesystem_eval_path_start_with_parent(rtems_filesystem_eval_path_context_t * ctx, char const * path, int eval_flags, rtems_filesystem_location_info_t * parentloc, int parent_eval_flags) -> rtems_filesystem_location_info_t *
298
299    Parameters
300    ----------
301    ctx: rtems_filesystem_eval_path_context_t *
302    path: char const *
303    eval_flags: int
304    parentloc: rtems_filesystem_location_info_t *
305    parent_eval_flags: int
306
307    """
308    return _libio_.rtems_filesystem_eval_path_start_with_parent(ctx, path, eval_flags, parentloc, parent_eval_flags)

rtems_filesystem_eval_path_start_with_parent(rtems_filesystem_eval_path_context_t * ctx, char const * path, int eval_flags, rtems_filesystem_location_info_t * parentloc, int parent_eval_flags) -> rtems_filesystem_location_info_t *

Parameters

ctx: rtems_filesystem_eval_path_context_t * path: char const * eval_flags: int parentloc: rtems_filesystem_location_info_t * parent_eval_flags: int

def rtems_filesystem_eval_path_start_with_root_and_current(ctx, path, pathlen, eval_flags, global_root_ptr, global_current_ptr):
310def rtems_filesystem_eval_path_start_with_root_and_current(ctx, path, pathlen, eval_flags, global_root_ptr, global_current_ptr):
311    r"""
312    rtems_filesystem_eval_path_start_with_root_and_current(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const * global_root_ptr, rtems_filesystem_global_location_t *const * global_current_ptr) -> rtems_filesystem_location_info_t *
313
314    Parameters
315    ----------
316    ctx: rtems_filesystem_eval_path_context_t *
317    path: char const *
318    pathlen: size_t
319    eval_flags: int
320    global_root_ptr: rtems_filesystem_global_location_t *const *
321    global_current_ptr: rtems_filesystem_global_location_t *const *
322
323    """
324    return _libio_.rtems_filesystem_eval_path_start_with_root_and_current(ctx, path, pathlen, eval_flags, global_root_ptr, global_current_ptr)

rtems_filesystem_eval_path_start_with_root_and_current(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const * global_root_ptr, rtems_filesystem_global_location_t *const * global_current_ptr) -> rtems_filesystem_location_info_t *

Parameters

ctx: rtems_filesystem_eval_path_context_t * path: char const * pathlen: size_t eval_flags: int global_root_ptr: rtems_filesystem_global_location_t *const * global_current_ptr: rtems_filesystem_global_location_t *const *

def rtems_filesystem_eval_path_continue(ctx):
326def rtems_filesystem_eval_path_continue(ctx):
327    r"""
328    rtems_filesystem_eval_path_continue(rtems_filesystem_eval_path_context_t * ctx)
329
330    Parameters
331    ----------
332    ctx: rtems_filesystem_eval_path_context_t *
333
334    """
335    return _libio_.rtems_filesystem_eval_path_continue(ctx)

rtems_filesystem_eval_path_continue(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_cleanup(ctx):
337def rtems_filesystem_eval_path_cleanup(ctx):
338    r"""
339    rtems_filesystem_eval_path_cleanup(rtems_filesystem_eval_path_context_t * ctx)
340
341    Parameters
342    ----------
343    ctx: rtems_filesystem_eval_path_context_t *
344
345    """
346    return _libio_.rtems_filesystem_eval_path_cleanup(ctx)

rtems_filesystem_eval_path_cleanup(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_recursive(ctx, path, pathlen):
348def rtems_filesystem_eval_path_recursive(ctx, path, pathlen):
349    r"""
350    rtems_filesystem_eval_path_recursive(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen)
351
352    Parameters
353    ----------
354    ctx: rtems_filesystem_eval_path_context_t *
355    path: char const *
356    pathlen: size_t
357
358    """
359    return _libio_.rtems_filesystem_eval_path_recursive(ctx, path, pathlen)

rtems_filesystem_eval_path_recursive(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen)

Parameters

ctx: rtems_filesystem_eval_path_context_t * path: char const * pathlen: size_t

def rtems_filesystem_eval_path_cleanup_with_parent(ctx, parentloc):
361def rtems_filesystem_eval_path_cleanup_with_parent(ctx, parentloc):
362    r"""
363    rtems_filesystem_eval_path_cleanup_with_parent(rtems_filesystem_eval_path_context_t * ctx, rtems_filesystem_location_info_t * parentloc)
364
365    Parameters
366    ----------
367    ctx: rtems_filesystem_eval_path_context_t *
368    parentloc: rtems_filesystem_location_info_t *
369
370    """
371    return _libio_.rtems_filesystem_eval_path_cleanup_with_parent(ctx, parentloc)

rtems_filesystem_eval_path_cleanup_with_parent(rtems_filesystem_eval_path_context_t * ctx, rtems_filesystem_location_info_t * parentloc)

Parameters

ctx: rtems_filesystem_eval_path_context_t * parentloc: rtems_filesystem_location_info_t *

def rtems_filesystem_eval_path_restart(ctx, newstartloc_ptr):
373def rtems_filesystem_eval_path_restart(ctx, newstartloc_ptr):
374    r"""
375    Requests a path evaluation restart.
376
377    Sets the start and current location to the new start location.  The caller
378    must terminate its current evaluation process.  The path evaluation
379    continues in the next loop iteration within
380    rtems_filesystem_eval_path_continue().  This avoids recursive invocations.
381    The function obtains the new start location and clones it to set the new
382    current location.  The previous start and current locations are released.
383
384    :param out]: ctx The path evaluation context.
385    :param out]: newstartloc_ptr Pointer to the new start location.
386    """
387    return _libio_.rtems_filesystem_eval_path_restart(ctx, newstartloc_ptr)

Requests a path evaluation restart.

Sets the start and current location to the new start location. The caller must terminate its current evaluation process. The path evaluation continues in the next loop iteration within rtems_filesystem_eval_path_continue(). This avoids recursive invocations. The function obtains the new start location and clones it to set the new current location. The previous start and current locations are released.

Parameters
  • out]: ctx The path evaluation context.
  • out]: newstartloc_ptr Pointer to the new start location.
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE = See C documentation
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE = See C documentation
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY = See C documentation
class rtems_filesystem_eval_path_generic_config:
394class rtems_filesystem_eval_path_generic_config(object):
395    r"""Proxy of C rtems_filesystem_eval_path_generic_config struct."""
396
397    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
398    __repr__ = _swig_repr
399    is_directory = property(_libio_.rtems_filesystem_eval_path_generic_config_is_directory_get, _libio_.rtems_filesystem_eval_path_generic_config_is_directory_set, doc=r"""is_directory : rtems_filesystem_eval_path_is_directory""")
400    eval_token = property(_libio_.rtems_filesystem_eval_path_generic_config_eval_token_get, _libio_.rtems_filesystem_eval_path_generic_config_eval_token_set, doc=r"""eval_token : rtems_filesystem_eval_path_eval_token""")
401
402    def __init__(self):
403        r"""__init__(rtems_filesystem_eval_path_generic_config self) -> rtems_filesystem_eval_path_generic_config"""
404        _libio_.rtems_filesystem_eval_path_generic_config_swiginit(self, _libio_.new_rtems_filesystem_eval_path_generic_config())
405    __swig_destroy__ = _libio_.delete_rtems_filesystem_eval_path_generic_config

Proxy of C rtems_filesystem_eval_path_generic_config struct.

rtems_filesystem_eval_path_generic_config()
402    def __init__(self):
403        r"""__init__(rtems_filesystem_eval_path_generic_config self) -> rtems_filesystem_eval_path_generic_config"""
404        _libio_.rtems_filesystem_eval_path_generic_config_swiginit(self, _libio_.new_rtems_filesystem_eval_path_generic_config())

__init__(rtems_filesystem_eval_path_generic_config self) -> rtems_filesystem_eval_path_generic_config

thisown
397    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

The membership flag

is_directory
eval_token
cvar = See C documentation
rtems_libio_number_iops = See C documentation
rtems_filesystem_null_handlers = See C documentation
def rtems_filesystem_eval_path_generic(ctx, arg, config):
414def rtems_filesystem_eval_path_generic(ctx, arg, config):
415    r"""
416    rtems_filesystem_eval_path_generic(rtems_filesystem_eval_path_context_t * ctx, void * arg, rtems_filesystem_eval_path_generic_config config)
417
418    Parameters
419    ----------
420    ctx: rtems_filesystem_eval_path_context_t *
421    arg: void *
422    config: rtems_filesystem_eval_path_generic_config const *
423
424    """
425    return _libio_.rtems_filesystem_eval_path_generic(ctx, arg, config)

rtems_filesystem_eval_path_generic(rtems_filesystem_eval_path_context_t * ctx, void * arg, rtems_filesystem_eval_path_generic_config config)

Parameters

ctx: rtems_filesystem_eval_path_context_t * arg: void * config: rtems_filesystem_eval_path_generic_config const *

def rtems_filesystem_initialize():
427def rtems_filesystem_initialize():
428    r"""rtems_filesystem_initialize()"""
429    return _libio_.rtems_filesystem_initialize()

rtems_filesystem_initialize()

def rtems_filesystem_location_copy(dst, src):
431def rtems_filesystem_location_copy(dst, src):
432    r"""
433    Copies a location.
434
435    A bitwise copy is performed.  The destination location will be added to the
436    corresponding mount entry.
437
438    :type dst: rtems_filesystem_location_info_t, out
439    :param dst: The destination location.
440    :type src: rtems_filesystem_location_info_t, in
441    :param src: The  source location.
442
443    See also: rtems_filesystem_location_clone().
444    """
445    return _libio_.rtems_filesystem_location_copy(dst, src)

Copies a location.

A bitwise copy is performed. The destination location will be added to the corresponding mount entry.

Parameters
  • dst: The destination location.
  • src: The source location.

See also: rtems_filesystem_location_clone().

def rtems_filesystem_location_initialize_to_null(loc):
447def rtems_filesystem_location_initialize_to_null(loc):
448    r"""
449    rtems_filesystem_location_initialize_to_null(rtems_filesystem_location_info_t * loc) -> rtems_filesystem_location_info_t *
450
451    Parameters
452    ----------
453    loc: rtems_filesystem_location_info_t *
454
455    """
456    return _libio_.rtems_filesystem_location_initialize_to_null(loc)

rtems_filesystem_location_initialize_to_null(rtems_filesystem_location_info_t * loc) -> rtems_filesystem_location_info_t *

Parameters

loc: rtems_filesystem_location_info_t *

def rtems_filesystem_location_transform_to_global(loc):
458def rtems_filesystem_location_transform_to_global(loc):
459    r"""
460    rtems_filesystem_location_transform_to_global(rtems_filesystem_location_info_t * loc) -> rtems_filesystem_global_location_t *
461
462    Parameters
463    ----------
464    loc: rtems_filesystem_location_info_t *
465
466    """
467    return _libio_.rtems_filesystem_location_transform_to_global(loc)

rtems_filesystem_location_transform_to_global(rtems_filesystem_location_info_t * loc) -> rtems_filesystem_global_location_t *

Parameters

loc: rtems_filesystem_location_info_t *

def rtems_filesystem_global_location_assign(lhs_global_loc_ptr, rhs_global_loc):
469def rtems_filesystem_global_location_assign(lhs_global_loc_ptr, rhs_global_loc):
470    r"""
471    Assigns a global file system location.
472
473    :param out]: lhs_global_loc_ptr Pointer to the global left hand side file
474        system location.  The current left hand side location will be released.
475    :type rhs_global_loc: rtems_filesystem_global_location_t, in
476    :param rhs_global_loc: The global right hand side file system location.
477    """
478    return _libio_.rtems_filesystem_global_location_assign(lhs_global_loc_ptr, rhs_global_loc)

Assigns a global file system location.

Parameters
  • out]: lhs_global_loc_ptr Pointer to the global left hand side file system location. The current left hand side location will be released.
  • rhs_global_loc: The global right hand side file system location.
def rtems_filesystem_global_location_obtain(global_loc_ptr):
480def rtems_filesystem_global_location_obtain(global_loc_ptr):
481    r"""
482    Obtains a global file system location.
483
484    Deferred releases will be processed in this function.
485
486    This function must be called from normal thread context and may block on a
487    mutex.  Thread dispatching is disabled to protect some critical sections.
488
489    :type global_loc_ptr: rtems_filesystem_global_location_t, in
490    :param global_loc_ptr: Pointer to the global file system location.
491
492    :rtype: rtems_filesystem_global_location_t
493    :return: A global file system location.  It returns always a valid object.
494        In case of an error, the global null location will be returned.  Each
495        operation or handler of the null location returns an error status.  The
496        errno indicates the error.  The NULL pointer is never returned.
497
498    See also: rtems_filesystem_location_transform_to_global(),
499    rtems_filesystem_global_location_obtain_null(), and
500    rtems_filesystem_global_location_release().
501    """
502    return _libio_.rtems_filesystem_global_location_obtain(global_loc_ptr)

Obtains a global file system location.

Deferred releases will be processed in this function.

This function must be called from normal thread context and may block on a mutex. Thread dispatching is disabled to protect some critical sections.

Parameters
  • global_loc_ptr: Pointer to the global file system location.
Returns

A global file system location. It returns always a valid object. In case of an error, the global null location will be returned. Each operation or handler of the null location returns an error status. The errno indicates the error. The NULL pointer is never returned.

See also: rtems_filesystem_location_transform_to_global(), rtems_filesystem_global_location_obtain_null(), and rtems_filesystem_global_location_release().

def rtems_filesystem_global_location_release(global_loc, deferred):
504def rtems_filesystem_global_location_release(global_loc, deferred):
505    r"""
506    Releases a global file system location.
507
508    In case the reference count reaches zero, all associated resources will be
509    released.  This may include the complete unmount of the corresponding file
510    system instance.
511
512    This function may block on a mutex.  It may be called within critical
513    sections of the operating system.  In this case the release will be
514    deferred.  The next obtain call will do the actual release.
515
516    :type global_loc: rtems_filesystem_global_location_t, in
517    :param global_loc: The global file system location.  It must not be NULL.
518    :type deferred: boolean, in
519    :param deferred: If true, then do a deferred release, otherwise release
520          it immediately.
521
522    See also: rtems_filesystem_global_location_obtain().
523    """
524    return _libio_.rtems_filesystem_global_location_release(global_loc, deferred)

Releases a global file system location.

In case the reference count reaches zero, all associated resources will be released. This may include the complete unmount of the corresponding file system instance.

This function may block on a mutex. It may be called within critical sections of the operating system. In this case the release will be deferred. The next obtain call will do the actual release.

Parameters
  • global_loc: The global file system location. It must not be NULL.
  • deferred: If true, then do a deferred release, otherwise release it immediately.

See also: rtems_filesystem_global_location_obtain().

def rtems_filesystem_location_detach(detach):
526def rtems_filesystem_location_detach(detach):
527    r"""
528    rtems_filesystem_location_detach(rtems_filesystem_location_info_t * detach)
529
530    Parameters
531    ----------
532    detach: rtems_filesystem_location_info_t *
533
534    """
535    return _libio_.rtems_filesystem_location_detach(detach)

rtems_filesystem_location_detach(rtems_filesystem_location_info_t * detach)

Parameters

detach: rtems_filesystem_location_info_t *

def rtems_filesystem_location_copy_and_detach(copy, detach):
537def rtems_filesystem_location_copy_and_detach(copy, detach):
538    r"""
539    rtems_filesystem_location_copy_and_detach(rtems_filesystem_location_info_t * copy, rtems_filesystem_location_info_t * detach)
540
541    Parameters
542    ----------
543    copy: rtems_filesystem_location_info_t *
544    detach: rtems_filesystem_location_info_t *
545
546    """
547    return _libio_.rtems_filesystem_location_copy_and_detach(copy, detach)

rtems_filesystem_location_copy_and_detach(rtems_filesystem_location_info_t * copy, rtems_filesystem_location_info_t * detach)

Parameters

copy: rtems_filesystem_location_info_t * detach: rtems_filesystem_location_info_t *

def rtems_filesystem_global_location_obtain_null():
549def rtems_filesystem_global_location_obtain_null():
550    r"""rtems_filesystem_global_location_obtain_null() -> rtems_filesystem_global_location_t *"""
551    return _libio_.rtems_filesystem_global_location_obtain_null()

rtems_filesystem_global_location_obtain_null() -> rtems_filesystem_global_location_t *

def rtems_filesystem_location_is_null(loc):
553def rtems_filesystem_location_is_null(loc):
554    r"""
555    rtems_filesystem_location_is_null(rtems_filesystem_location_info_t const * loc) -> bool
556
557    Parameters
558    ----------
559    loc: rtems_filesystem_location_info_t const *
560
561    """
562    return _libio_.rtems_filesystem_location_is_null(loc)

rtems_filesystem_location_is_null(rtems_filesystem_location_info_t const * loc) -> bool

Parameters

loc: rtems_filesystem_location_info_t const *

def rtems_filesystem_global_location_is_null(global_loc):
564def rtems_filesystem_global_location_is_null(global_loc):
565    r"""
566    rtems_filesystem_global_location_is_null(rtems_filesystem_global_location_t const * global_loc) -> bool
567
568    Parameters
569    ----------
570    global_loc: rtems_filesystem_global_location_t const *
571
572    """
573    return _libio_.rtems_filesystem_global_location_is_null(global_loc)

rtems_filesystem_global_location_is_null(rtems_filesystem_global_location_t const * global_loc) -> bool

Parameters

global_loc: rtems_filesystem_global_location_t const *

def rtems_filesystem_location_error(loc, eno):
575def rtems_filesystem_location_error(loc, eno):
576    r"""
577    rtems_filesystem_location_error(rtems_filesystem_location_info_t const * loc, int eno)
578
579    Parameters
580    ----------
581    loc: rtems_filesystem_location_info_t const *
582    eno: int
583
584    """
585    return _libio_.rtems_filesystem_location_error(loc, eno)

rtems_filesystem_location_error(rtems_filesystem_location_info_t const * loc, int eno)

Parameters

loc: rtems_filesystem_location_info_t const * eno: int

def rtems_filesystem_mknod(parentloc, name, namelen, mode, dev):
587def rtems_filesystem_mknod(parentloc, name, namelen, mode, dev):
588    r"""
589    rtems_filesystem_mknod(rtems_filesystem_location_info_t const * parentloc, char const * name, size_t namelen, mode_t mode, dev_t dev) -> int
590
591    Parameters
592    ----------
593    parentloc: rtems_filesystem_location_info_t const *
594    name: char const *
595    namelen: size_t
596    mode: mode_t
597    dev: dev_t
598
599    """
600    return _libio_.rtems_filesystem_mknod(parentloc, name, namelen, mode, dev)

rtems_filesystem_mknod(rtems_filesystem_location_info_t const * parentloc, char const * name, size_t namelen, mode_t mode, dev_t dev) -> int

Parameters

parentloc: rtems_filesystem_location_info_t const * name: char const * namelen: size_t mode: mode_t dev: dev_t

def rtems_filesystem_chdir(loc):
602def rtems_filesystem_chdir(loc):
603    r"""
604    rtems_filesystem_chdir(rtems_filesystem_location_info_t * loc) -> int
605
606    Parameters
607    ----------
608    loc: rtems_filesystem_location_info_t *
609
610    """
611    return _libio_.rtems_filesystem_chdir(loc)

rtems_filesystem_chdir(rtems_filesystem_location_info_t * loc) -> int

Parameters

loc: rtems_filesystem_location_info_t *

def rtems_filesystem_chmod(loc, mode):
613def rtems_filesystem_chmod(loc, mode):
614    r"""
615    rtems_filesystem_chmod(rtems_filesystem_location_info_t const * loc, mode_t mode) -> int
616
617    Parameters
618    ----------
619    loc: rtems_filesystem_location_info_t const *
620    mode: mode_t
621
622    """
623    return _libio_.rtems_filesystem_chmod(loc, mode)

rtems_filesystem_chmod(rtems_filesystem_location_info_t const * loc, mode_t mode) -> int

Parameters

loc: rtems_filesystem_location_info_t const * mode: mode_t

def rtems_filesystem_chown(loc, owner, group):
625def rtems_filesystem_chown(loc, owner, group):
626    r"""
627    rtems_filesystem_chown(rtems_filesystem_location_info_t const * loc, uid_t owner, gid_t group) -> int
628
629    Parameters
630    ----------
631    loc: rtems_filesystem_location_info_t const *
632    owner: uid_t
633    group: gid_t
634
635    """
636    return _libio_.rtems_filesystem_chown(loc, owner, group)

rtems_filesystem_chown(rtems_filesystem_location_info_t const * loc, uid_t owner, gid_t group) -> int

Parameters

loc: rtems_filesystem_location_info_t const * owner: uid_t group: gid_t

def rtems_filesystem_is_ready_for_unmount(mt_entry):
638def rtems_filesystem_is_ready_for_unmount(mt_entry):
639    r"""
640    rtems_filesystem_is_ready_for_unmount(rtems_filesystem_mount_table_entry_t * mt_entry) -> bool
641
642    Parameters
643    ----------
644    mt_entry: rtems_filesystem_mount_table_entry_t *
645
646    """
647    return _libio_.rtems_filesystem_is_ready_for_unmount(mt_entry)

rtems_filesystem_is_ready_for_unmount(rtems_filesystem_mount_table_entry_t * mt_entry) -> bool

Parameters

mt_entry: rtems_filesystem_mount_table_entry_t *

def rtems_filesystem_location_add_to_mt_entry(loc):
649def rtems_filesystem_location_add_to_mt_entry(loc):
650    r"""
651    rtems_filesystem_location_add_to_mt_entry(rtems_filesystem_location_info_t * loc)
652
653    Parameters
654    ----------
655    loc: rtems_filesystem_location_info_t *
656
657    """
658    return _libio_.rtems_filesystem_location_add_to_mt_entry(loc)

rtems_filesystem_location_add_to_mt_entry(rtems_filesystem_location_info_t * loc)

Parameters

loc: rtems_filesystem_location_info_t *

def rtems_filesystem_location_remove_from_mt_entry(loc):
660def rtems_filesystem_location_remove_from_mt_entry(loc):
661    r"""
662    rtems_filesystem_location_remove_from_mt_entry(rtems_filesystem_location_info_t * loc)
663
664    Parameters
665    ----------
666    loc: rtems_filesystem_location_info_t *
667
668    """
669    return _libio_.rtems_filesystem_location_remove_from_mt_entry(loc)

rtems_filesystem_location_remove_from_mt_entry(rtems_filesystem_location_info_t * loc)

Parameters

loc: rtems_filesystem_location_info_t *

def rtems_filesystem_do_unmount(mt_entry):
671def rtems_filesystem_do_unmount(mt_entry):
672    r"""
673    rtems_filesystem_do_unmount(rtems_filesystem_mount_table_entry_t * mt_entry)
674
675    Parameters
676    ----------
677    mt_entry: rtems_filesystem_mount_table_entry_t *
678
679    """
680    return _libio_.rtems_filesystem_do_unmount(mt_entry)

rtems_filesystem_do_unmount(rtems_filesystem_mount_table_entry_t * mt_entry)

Parameters

mt_entry: rtems_filesystem_mount_table_entry_t *

def rtems_filesystem_location_is_instance_root(loc):
682def rtems_filesystem_location_is_instance_root(loc):
683    r"""
684    rtems_filesystem_location_is_instance_root(rtems_filesystem_location_info_t const * loc) -> bool
685
686    Parameters
687    ----------
688    loc: rtems_filesystem_location_info_t const *
689
690    """
691    return _libio_.rtems_filesystem_location_is_instance_root(loc)

rtems_filesystem_location_is_instance_root(rtems_filesystem_location_info_t const * loc) -> bool

Parameters

loc: rtems_filesystem_location_info_t const *

def rtems_filesystem_eval_path_get_path(ctx):
693def rtems_filesystem_eval_path_get_path(ctx):
694    r"""
695    rtems_filesystem_eval_path_get_path(rtems_filesystem_eval_path_context_t const * ctx) -> char const *
696
697    Parameters
698    ----------
699    ctx: rtems_filesystem_eval_path_context_t const *
700
701    """
702    return _libio_.rtems_filesystem_eval_path_get_path(ctx)

rtems_filesystem_eval_path_get_path(rtems_filesystem_eval_path_context_t const * ctx) -> char const *

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_get_pathlen(ctx):
704def rtems_filesystem_eval_path_get_pathlen(ctx):
705    r"""
706    rtems_filesystem_eval_path_get_pathlen(rtems_filesystem_eval_path_context_t const * ctx) -> size_t
707
708    Parameters
709    ----------
710    ctx: rtems_filesystem_eval_path_context_t const *
711
712    """
713    return _libio_.rtems_filesystem_eval_path_get_pathlen(ctx)

rtems_filesystem_eval_path_get_pathlen(rtems_filesystem_eval_path_context_t const * ctx) -> size_t

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_set_path(ctx, path, pathlen):
715def rtems_filesystem_eval_path_set_path(ctx, path, pathlen):
716    r"""
717    rtems_filesystem_eval_path_set_path(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen)
718
719    Parameters
720    ----------
721    ctx: rtems_filesystem_eval_path_context_t *
722    path: char const *
723    pathlen: size_t
724
725    """
726    return _libio_.rtems_filesystem_eval_path_set_path(ctx, path, pathlen)

rtems_filesystem_eval_path_set_path(rtems_filesystem_eval_path_context_t * ctx, char const * path, size_t pathlen)

Parameters

ctx: rtems_filesystem_eval_path_context_t * path: char const * pathlen: size_t

def rtems_filesystem_eval_path_clear_path(ctx):
728def rtems_filesystem_eval_path_clear_path(ctx):
729    r"""
730    rtems_filesystem_eval_path_clear_path(rtems_filesystem_eval_path_context_t * ctx)
731
732    Parameters
733    ----------
734    ctx: rtems_filesystem_eval_path_context_t *
735
736    """
737    return _libio_.rtems_filesystem_eval_path_clear_path(ctx)

rtems_filesystem_eval_path_clear_path(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_get_token(ctx):
739def rtems_filesystem_eval_path_get_token(ctx):
740    r"""
741    rtems_filesystem_eval_path_get_token(rtems_filesystem_eval_path_context_t const * ctx) -> char const *
742
743    Parameters
744    ----------
745    ctx: rtems_filesystem_eval_path_context_t const *
746
747    """
748    return _libio_.rtems_filesystem_eval_path_get_token(ctx)

rtems_filesystem_eval_path_get_token(rtems_filesystem_eval_path_context_t const * ctx) -> char const *

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_get_tokenlen(ctx):
750def rtems_filesystem_eval_path_get_tokenlen(ctx):
751    r"""
752    rtems_filesystem_eval_path_get_tokenlen(rtems_filesystem_eval_path_context_t const * ctx) -> size_t
753
754    Parameters
755    ----------
756    ctx: rtems_filesystem_eval_path_context_t const *
757
758    """
759    return _libio_.rtems_filesystem_eval_path_get_tokenlen(ctx)

rtems_filesystem_eval_path_get_tokenlen(rtems_filesystem_eval_path_context_t const * ctx) -> size_t

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_set_token(ctx, token, tokenlen):
761def rtems_filesystem_eval_path_set_token(ctx, token, tokenlen):
762    r"""
763    rtems_filesystem_eval_path_set_token(rtems_filesystem_eval_path_context_t * ctx, char const * token, size_t tokenlen)
764
765    Parameters
766    ----------
767    ctx: rtems_filesystem_eval_path_context_t *
768    token: char const *
769    tokenlen: size_t
770
771    """
772    return _libio_.rtems_filesystem_eval_path_set_token(ctx, token, tokenlen)

rtems_filesystem_eval_path_set_token(rtems_filesystem_eval_path_context_t * ctx, char const * token, size_t tokenlen)

Parameters

ctx: rtems_filesystem_eval_path_context_t * token: char const * tokenlen: size_t

def rtems_filesystem_eval_path_clear_token(ctx):
774def rtems_filesystem_eval_path_clear_token(ctx):
775    r"""
776    rtems_filesystem_eval_path_clear_token(rtems_filesystem_eval_path_context_t * ctx)
777
778    Parameters
779    ----------
780    ctx: rtems_filesystem_eval_path_context_t *
781
782    """
783    return _libio_.rtems_filesystem_eval_path_clear_token(ctx)

rtems_filesystem_eval_path_clear_token(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_put_back_token(ctx):
785def rtems_filesystem_eval_path_put_back_token(ctx):
786    r"""
787    rtems_filesystem_eval_path_put_back_token(rtems_filesystem_eval_path_context_t * ctx)
788
789    Parameters
790    ----------
791    ctx: rtems_filesystem_eval_path_context_t *
792
793    """
794    return _libio_.rtems_filesystem_eval_path_put_back_token(ctx)

rtems_filesystem_eval_path_put_back_token(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_eat_delimiter(ctx):
796def rtems_filesystem_eval_path_eat_delimiter(ctx):
797    r"""
798    rtems_filesystem_eval_path_eat_delimiter(rtems_filesystem_eval_path_context_t * ctx)
799
800    Parameters
801    ----------
802    ctx: rtems_filesystem_eval_path_context_t *
803
804    """
805    return _libio_.rtems_filesystem_eval_path_eat_delimiter(ctx)

rtems_filesystem_eval_path_eat_delimiter(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_next_token(ctx):
807def rtems_filesystem_eval_path_next_token(ctx):
808    r"""
809    rtems_filesystem_eval_path_next_token(rtems_filesystem_eval_path_context_t * ctx)
810
811    Parameters
812    ----------
813    ctx: rtems_filesystem_eval_path_context_t *
814
815    """
816    return _libio_.rtems_filesystem_eval_path_next_token(ctx)

rtems_filesystem_eval_path_next_token(rtems_filesystem_eval_path_context_t * ctx)

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_get_next_token(ctx, token, tokenlen):
818def rtems_filesystem_eval_path_get_next_token(ctx, token, tokenlen):
819    r"""
820    rtems_filesystem_eval_path_get_next_token(rtems_filesystem_eval_path_context_t * ctx, char const ** token, size_t * tokenlen)
821
822    Parameters
823    ----------
824    ctx: rtems_filesystem_eval_path_context_t *
825    token: char const **
826    tokenlen: size_t *
827
828    """
829    return _libio_.rtems_filesystem_eval_path_get_next_token(ctx, token, tokenlen)

rtems_filesystem_eval_path_get_next_token(rtems_filesystem_eval_path_context_t * ctx, char const ** token, size_t * tokenlen)

Parameters

ctx: rtems_filesystem_eval_path_context_t * token: char const ** tokenlen: size_t *

def rtems_filesystem_eval_path_get_currentloc(ctx):
831def rtems_filesystem_eval_path_get_currentloc(ctx):
832    r"""
833    rtems_filesystem_eval_path_get_currentloc(rtems_filesystem_eval_path_context_t * ctx) -> rtems_filesystem_location_info_t *
834
835    Parameters
836    ----------
837    ctx: rtems_filesystem_eval_path_context_t *
838
839    """
840    return _libio_.rtems_filesystem_eval_path_get_currentloc(ctx)

rtems_filesystem_eval_path_get_currentloc(rtems_filesystem_eval_path_context_t * ctx) -> rtems_filesystem_location_info_t *

Parameters

ctx: rtems_filesystem_eval_path_context_t *

def rtems_filesystem_eval_path_has_path(ctx):
842def rtems_filesystem_eval_path_has_path(ctx):
843    r"""
844    rtems_filesystem_eval_path_has_path(rtems_filesystem_eval_path_context_t const * ctx) -> bool
845
846    Parameters
847    ----------
848    ctx: rtems_filesystem_eval_path_context_t const *
849
850    """
851    return _libio_.rtems_filesystem_eval_path_has_path(ctx)

rtems_filesystem_eval_path_has_path(rtems_filesystem_eval_path_context_t const * ctx) -> bool

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_has_token(ctx):
853def rtems_filesystem_eval_path_has_token(ctx):
854    r"""
855    rtems_filesystem_eval_path_has_token(rtems_filesystem_eval_path_context_t const * ctx) -> bool
856
857    Parameters
858    ----------
859    ctx: rtems_filesystem_eval_path_context_t const *
860
861    """
862    return _libio_.rtems_filesystem_eval_path_has_token(ctx)

rtems_filesystem_eval_path_has_token(rtems_filesystem_eval_path_context_t const * ctx) -> bool

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_get_flags(ctx):
864def rtems_filesystem_eval_path_get_flags(ctx):
865    r"""
866    rtems_filesystem_eval_path_get_flags(rtems_filesystem_eval_path_context_t const * ctx) -> int
867
868    Parameters
869    ----------
870    ctx: rtems_filesystem_eval_path_context_t const *
871
872    """
873    return _libio_.rtems_filesystem_eval_path_get_flags(ctx)

rtems_filesystem_eval_path_get_flags(rtems_filesystem_eval_path_context_t const * ctx) -> int

Parameters

ctx: rtems_filesystem_eval_path_context_t const *

def rtems_filesystem_eval_path_set_flags(ctx, flags):
875def rtems_filesystem_eval_path_set_flags(ctx, flags):
876    r"""
877    rtems_filesystem_eval_path_set_flags(rtems_filesystem_eval_path_context_t * ctx, int flags)
878
879    Parameters
880    ----------
881    ctx: rtems_filesystem_eval_path_context_t *
882    flags: int
883
884    """
885    return _libio_.rtems_filesystem_eval_path_set_flags(ctx, flags)

rtems_filesystem_eval_path_set_flags(rtems_filesystem_eval_path_context_t * ctx, int flags)

Parameters

ctx: rtems_filesystem_eval_path_context_t * flags: int

def rtems_filesystem_eval_path_clear_and_set_flags(ctx, clear, set):
887def rtems_filesystem_eval_path_clear_and_set_flags(ctx, clear, set):
888    r"""
889    rtems_filesystem_eval_path_clear_and_set_flags(rtems_filesystem_eval_path_context_t * ctx, int clear, int set)
890
891    Parameters
892    ----------
893    ctx: rtems_filesystem_eval_path_context_t *
894    clear: int
895    set: int
896
897    """
898    return _libio_.rtems_filesystem_eval_path_clear_and_set_flags(ctx, clear, set)

rtems_filesystem_eval_path_clear_and_set_flags(rtems_filesystem_eval_path_context_t * ctx, int clear, int set)

Parameters

ctx: rtems_filesystem_eval_path_context_t * clear: int set: int

def rtems_filesystem_eval_path_extract_currentloc(ctx, get):
900def rtems_filesystem_eval_path_extract_currentloc(ctx, get):
901    r"""
902    rtems_filesystem_eval_path_extract_currentloc(rtems_filesystem_eval_path_context_t * ctx, rtems_filesystem_location_info_t * get)
903
904    Parameters
905    ----------
906    ctx: rtems_filesystem_eval_path_context_t *
907    get: rtems_filesystem_location_info_t *
908
909    """
910    return _libio_.rtems_filesystem_eval_path_extract_currentloc(ctx, get)

rtems_filesystem_eval_path_extract_currentloc(rtems_filesystem_eval_path_context_t * ctx, rtems_filesystem_location_info_t * get)

Parameters

ctx: rtems_filesystem_eval_path_context_t * get: rtems_filesystem_location_info_t *

def rtems_filesystem_eval_path_error(ctx, eno):
912def rtems_filesystem_eval_path_error(ctx, eno):
913    r"""
914    rtems_filesystem_eval_path_error(rtems_filesystem_eval_path_context_t * ctx, int eno)
915
916    Parameters
917    ----------
918    ctx: rtems_filesystem_eval_path_context_t *
919    eno: int
920
921    """
922    return _libio_.rtems_filesystem_eval_path_error(ctx, eno)

rtems_filesystem_eval_path_error(rtems_filesystem_eval_path_context_t * ctx, int eno)

Parameters

ctx: rtems_filesystem_eval_path_context_t * eno: int

def rtems_filesystem_location_exists_in_same_instance_as(a, b):
924def rtems_filesystem_location_exists_in_same_instance_as(a, b):
925    r"""Checks that the locations exist in the same file system instance."""
926    return _libio_.rtems_filesystem_location_exists_in_same_instance_as(a, b)

Checks that the locations exist in the same file system instance.

def rtems_filesystem_check_access(flags, object_mode, object_uid, object_gid):
928def rtems_filesystem_check_access(flags, object_mode, object_uid, object_gid):
929    r"""
930    Checks if access to an object is allowed for the current user.
931
932    If the effective UID is zero or equals the UID of the object, then the user
933    permission flags of the object will be used.  Otherwise if the effective GID
934    is zero or equals the GID of the object or one of the supplementary group
935    IDs is equal to the GID of the object, then the group permission flags of
936    the object will be used.  Otherwise the other permission flags of the object
937    will be used.
938
939    :type flags: int, in
940    :param flags: The flags determining the access type.  It can be
941          RTEMS_FS_PERMS_READ, RTEMS_FS_PERMS_WRITE or RTEMS_FS_PERMS_EXEC.
942    :type object_mode: mode_t, in
943    :param object_mode: The mode of the object specifying the permission flags.
944    :type object_uid: uid_t, in
945    :param object_uid: The UID of the object.
946    :type object_gid: gid_t, in
947    :param object_gid: The GID of the object.
948    """
949    return _libio_.rtems_filesystem_check_access(flags, object_mode, object_uid, object_gid)

Checks if access to an object is allowed for the current user.

If the effective UID is zero or equals the UID of the object, then the user permission flags of the object will be used. Otherwise if the effective GID is zero or equals the GID of the object or one of the supplementary group IDs is equal to the GID of the object, then the group permission flags of the object will be used. Otherwise the other permission flags of the object will be used.

Parameters
  • flags: The flags determining the access type. It can be RTEMS_FS_PERMS_READ, RTEMS_FS_PERMS_WRITE or RTEMS_FS_PERMS_EXEC.
  • object_mode: The mode of the object specifying the permission flags.
  • object_uid: The UID of the object.
  • object_gid: The GID of the object.
def rtems_filesystem_eval_path_check_access(ctx, eval_flags, node_mode, node_uid, node_gid):
951def rtems_filesystem_eval_path_check_access(ctx, eval_flags, node_mode, node_uid, node_gid):
952    r"""
953    rtems_filesystem_eval_path_check_access(rtems_filesystem_eval_path_context_t * ctx, int eval_flags, mode_t node_mode, uid_t node_uid, gid_t node_gid) -> bool
954
955    Parameters
956    ----------
957    ctx: rtems_filesystem_eval_path_context_t *
958    eval_flags: int
959    node_mode: mode_t
960    node_uid: uid_t
961    node_gid: gid_t
962
963    """
964    return _libio_.rtems_filesystem_eval_path_check_access(ctx, eval_flags, node_mode, node_uid, node_gid)

rtems_filesystem_eval_path_check_access(rtems_filesystem_eval_path_context_t * ctx, int eval_flags, mode_t node_mode, uid_t node_uid, gid_t node_gid) -> bool

Parameters

ctx: rtems_filesystem_eval_path_context_t * eval_flags: int node_mode: mode_t node_uid: uid_t node_gid: gid_t

def rtems_filesystem_is_delimiter(c):
966def rtems_filesystem_is_delimiter(c):
967    r"""
968    rtems_filesystem_is_delimiter(char c) -> bool
969
970    Parameters
971    ----------
972    c: char
973
974    """
975    return _libio_.rtems_filesystem_is_delimiter(c)

rtems_filesystem_is_delimiter(char c) -> bool

Parameters

c: char

def rtems_filesystem_is_current_directory(token, tokenlen):
977def rtems_filesystem_is_current_directory(token, tokenlen):
978    r"""
979    rtems_filesystem_is_current_directory(char const * token, size_t tokenlen) -> bool
980
981    Parameters
982    ----------
983    token: char const *
984    tokenlen: size_t
985
986    """
987    return _libio_.rtems_filesystem_is_current_directory(token, tokenlen)

rtems_filesystem_is_current_directory(char const * token, size_t tokenlen) -> bool

Parameters

token: char const * tokenlen: size_t

def rtems_filesystem_is_parent_directory(token, tokenlen):
989def rtems_filesystem_is_parent_directory(token, tokenlen):
990    r"""
991    rtems_filesystem_is_parent_directory(char const * token, size_t tokenlen) -> bool
992
993    Parameters
994    ----------
995    token: char const *
996    tokenlen: size_t
997
998    """
999    return _libio_.rtems_filesystem_is_parent_directory(token, tokenlen)

rtems_filesystem_is_parent_directory(char const * token, size_t tokenlen) -> bool

Parameters

token: char const * tokenlen: size_t

def rtems_libio_iovec_eval(fd, iov, iovcnt, flags, adapter):
1001def rtems_libio_iovec_eval(fd, iov, iovcnt, flags, adapter):
1002    r"""
1003    rtems_libio_iovec_eval(int fd, struct iovec const * iov, int iovcnt, unsigned int flags, rtems_libio_iovec_adapter adapter) -> ssize_t
1004
1005    Parameters
1006    ----------
1007    fd: int
1008    iov: struct iovec const *
1009    iovcnt: int
1010    flags: unsigned int
1011    adapter: rtems_libio_iovec_adapter
1012
1013    """
1014    return _libio_.rtems_libio_iovec_eval(fd, iov, iovcnt, flags, adapter)

rtems_libio_iovec_eval(int fd, struct iovec const * iov, int iovcnt, unsigned int flags, rtems_libio_iovec_adapter adapter) -> ssize_t

Parameters

fd: int iov: struct iovec const * iovcnt: int flags: unsigned int adapter: rtems_libio_iovec_adapter

def rtems_filesystem_location_type(loc):
1016def rtems_filesystem_location_type(loc):
1017    r"""
1018    Returns the file type of the file referenced by the filesystem
1019    location.
1020
1021    loc The filesystem location.
1022
1023    :rtype: mode_t
1024    :return: The type of the file or an invalid file type in case of an error.
1025    """
1026    return _libio_.rtems_filesystem_location_type(loc)

Returns the file type of the file referenced by the filesystem location.

loc The filesystem location.

Returns

The type of the file or an invalid file type in case of an error.