Changeset 0b038bd4 in rtems for cpukit/include/rtems/diskdevs.h


Ignore:
Timestamp:
Aug 4, 2018, 8:38:48 AM (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
97417bb
Parents:
b152d33
git-author:
Sebastian Huber <sebastian.huber@…> (08/04/18 08:38:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/07/18 05:17:19)
Message:

libblock: Add RTEMS_DEPRECATED

Close #3358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/diskdevs.h

    rb152d33 r0b038bd4  
    278278/**@{**/
    279279
    280 static inline dev_t rtems_disk_get_device_identifier(
     280/* Use fstat() instead */
     281RTEMS_DEPRECATED static inline dev_t rtems_disk_get_device_identifier(
    281282  const rtems_disk_device *dd
    282283)
     
    285286}
    286287
    287 static inline rtems_device_major_number rtems_disk_get_major_number(
     288/* Use fstat() instead */
     289RTEMS_DEPRECATED static inline rtems_device_major_number rtems_disk_get_major_number(
    288290  const rtems_disk_device *dd
    289291)
     
    292294}
    293295
    294 static inline rtems_device_minor_number rtems_disk_get_minor_number(
     296/* Use fstat() instead */
     297RTEMS_DEPRECATED static inline rtems_device_minor_number rtems_disk_get_minor_number(
    295298  const rtems_disk_device *dd
    296299)
     
    341344/**@{**/
    342345
    343 /**
    344  * @brief Creates a physical disk with device identifier @a dev.
    345  *
    346  * The block size @a block_size must be positive.  The disk will have
    347  * @a block_count blocks.  The block index starts with zero.  The associated disk
    348  * device driver will be invoked via the IO control handler @a handler.  A
    349  * device node will be registered in the file system with absolute path @a
    350  * name, if @a name is not @c NULL.  This function is usually invoked from a
    351  * block device driver during initialization when a physical device is detected
    352  * in the system.  The device driver provides an IO control handler to allow
    353  * block device operations.
    354  *
    355  * @retval RTEMS_SUCCESSFUL Successful operation.
    356  * @retval RTEMS_NOT_CONFIGURED Cannot lock disk device operation mutex.
    357  * @retval RTEMS_INVALID_ADDRESS IO control handler is @c NULL.
    358  * @retval RTEMS_INVALID_NUMBER Block size is invalid.
    359  * @retval RTEMS_NO_MEMORY Not enough memory.
    360  * @retval RTEMS_RESOURCE_IN_USE Disk device descriptor is already in use.
    361  * @retval RTEMS_UNSATISFIED Cannot create device node.
    362  */
    363 rtems_status_code rtems_disk_create_phys(
     346/* Use rtems_blkdev_create() instead */
     347RTEMS_DEPRECATED rtems_status_code rtems_disk_create_phys(
    364348  dev_t dev,
    365349  uint32_t block_size,
     
    370354);
    371355
    372 /**
    373  * @brief Creates a logical disk with device identifier @a dev.
    374  *
    375  * A logical disk manages a subset of consecutive blocks contained in the
    376  * physical disk with identifier @a phys.  The start block index of the logical
    377  * disk device is @a block_begin.  The block count of the logcal disk will be
    378  * @a block_count.  The blocks must be within the range of blocks managed by
    379  * the associated physical disk device.  A device node will be registered in
    380  * the file system with absolute path @a name, if @a name is not @c NULL.  The
    381  * block size and IO control handler are inherited by the physical disk.
    382  *
    383  * @retval RTEMS_SUCCESSFUL Successful operation.
    384  * @retval RTEMS_NOT_CONFIGURED Cannot lock disk device operation mutex.
    385  * @retval RTEMS_INVALID_ID Specified physical disk identifier does not
    386  * correspond to a physical disk.
    387  * @retval RTEMS_INVALID_NUMBER Begin block or block count are out of range.
    388  * @retval RTEMS_NO_MEMORY Not enough memory.
    389  * @retval RTEMS_RESOURCE_IN_USE Disk device descriptor for logical disk
    390  * identifier is already in use.
    391  * @retval RTEMS_UNSATISFIED Cannot create device node.
    392  */
    393 rtems_status_code rtems_disk_create_log(
     356/* Use rtems_blkdev_create_partition() instead */
     357RTEMS_DEPRECATED rtems_status_code rtems_disk_create_log(
    394358  dev_t dev,
    395359  dev_t phys,
     
    399363);
    400364
    401 /**
    402  * @brief Deletes a physical or logical disk device with identifier @a dev.
    403  *
    404  * Marks the disk device as deleted.  When a physical disk device is deleted,
    405  * all corresponding logical disk devices will marked as deleted too.  Disks
    406  * that are marked as deleted and have a usage counter of zero will be deleted.
    407  * The corresponding device nodes will be removed from the file system.  In
    408  * case of a physical disk deletion the IO control handler will be invoked with
    409  * a RTEMS_BLKIO_DELETED request.  Disks that are still in use will be deleted
    410  * upon release.
    411  *
    412  * @retval RTEMS_SUCCESSFUL Successful operation.
    413  * @retval RTEMS_NOT_CONFIGURED Cannot lock disk device operation mutex.
    414  * @retval RTEMS_INVALID_ID No disk for specified device identifier.
    415  */
    416 rtems_status_code rtems_disk_delete(dev_t dev);
    417 
    418 /**
    419  * @brief Returns the disk device descriptor for the device identifier @a dev.
    420  *
    421  * Increments usage counter by one.  You should release the disk device
    422  * descriptor with rtems_disk_release().
    423  *
    424  * @return Pointer to the disk device descriptor or @c NULL if no corresponding
    425  * disk exists.
    426  */
    427 rtems_disk_device *rtems_disk_obtain(dev_t dev);
    428 
    429 /**
    430  * @brief Releases the disk device descriptor @a dd.
    431  *
    432  * Decrements usage counter by one.
    433  *
    434  * @retval RTEMS_SUCCESSFUL Successful operation.
    435  */
    436 rtems_status_code rtems_disk_release(rtems_disk_device *dd);
     365/*
     366 * Use rtems_blkdev_create() or rtems_blkdev_create_partition and unlink()
     367 * instead.
     368 */
     369RTEMS_DEPRECATED rtems_status_code rtems_disk_delete(dev_t dev);
     370
     371/*
     372 * Use rtems_blkdev_create() or rtems_blkdev_create_partition and open()
     373 * instead.
     374 */
     375RTEMS_DEPRECATED rtems_disk_device *rtems_disk_obtain(dev_t dev);
     376
     377/*
     378 * Use rtems_blkdev_create() or rtems_blkdev_create_partition and close()
     379 * instead.
     380 */
     381RTEMS_DEPRECATED rtems_status_code rtems_disk_release(rtems_disk_device *dd);
    437382
    438383/** @} */
     
    443388/**@{**/
    444389
    445 /**
    446  * @brief Initializes the disk device management.
    447  *
    448  * This functions returns successful if the disk device management is already
    449  * initialized.  There is no protection against concurrent access.
    450  *
    451  * @retval RTEMS_SUCCESSFUL Successful initialization.
    452  * @retval RTEMS_NO_MEMORY Not enough memory or no semaphore available.
    453  * @retval RTEMS_UNSATISFIED Block device buffer initialization failed.
    454  */
    455 rtems_status_code rtems_disk_io_initialize(void);
    456 
    457 /**
    458  * @brief Releases all resources allocated for disk device management.
    459  *
    460  * There is no protection against concurrent access.  If parts of the system
    461  * are still in use the behaviour is undefined.
    462  *
    463  * @retval RTEMS_SUCCESSFUL Successful operation.
    464  */
    465 rtems_status_code rtems_disk_io_done(void);
     390/* Just remove calls to this function */
     391RTEMS_DEPRECATED rtems_status_code rtems_disk_io_initialize(void);
     392
     393/* Just remove calls to this function */
     394RTEMS_DEPRECATED rtems_status_code rtems_disk_io_done(void);
    466395
    467396/** @} */
     
    469398/** @} */
    470399
    471 /**
    472  * @brief Disk device iterator.
    473  *
    474  * Returns the next disk device descriptor with a device identifier larger than
    475  * @a dev.  If there is no such device, @c NULL will be returned.  Use minus
    476  * one to start the search.
    477  *
    478  * @code
    479  * rtems_status_code sc = RTEMS_SUCCESSFUL;
    480  * rtems_disk_device *dd = (dev_t) -1;
    481  *
    482  * while (sc == RTEMS_SUCCESSFUL && (dd = rtems_disk_next(dev)) != NULL) {
    483  *   dev = rtems_disk_get_device_identifier(dd);
    484  *   sc = rtems_disk_release(dd);
    485  * }
    486  * @endcode
    487  */
    488 rtems_disk_device *rtems_disk_next(dev_t dev);
     400/*
     401 * This functionality no longer available.  There is no global registration for
     402 * disk devices.
     403 */
     404RTEMS_DEPRECATED rtems_disk_device *rtems_disk_next(dev_t dev);
    489405
    490406/* Internal function, do not use */
Note: See TracChangeset for help on using the changeset viewer.