2022-06-03 19:15:11 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2022-11-01 20:26:26 +00:00
|
|
|
* Copyright (C) 2015 Intel Corporation.
|
2015-10-19 22:47:56 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2016-04-29 18:04:33 +00:00
|
|
|
/** \file
|
|
|
|
* OS filesystem utility functions
|
|
|
|
*/
|
|
|
|
|
2016-09-14 15:47:21 +00:00
|
|
|
#ifndef SPDK_FD_H
|
|
|
|
#define SPDK_FD_H
|
2015-10-19 22:47:56 +00:00
|
|
|
|
2017-05-01 20:22:48 +00:00
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
|
2016-02-12 14:52:35 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-12-25 06:55:53 +00:00
|
|
|
/**
|
|
|
|
* Get the file size.
|
|
|
|
*
|
|
|
|
* \param fd File descriptor.
|
|
|
|
*
|
|
|
|
* \return File size.
|
|
|
|
*/
|
2016-09-14 15:47:21 +00:00
|
|
|
uint64_t spdk_fd_get_size(int fd);
|
2017-12-25 06:55:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the block size of the file.
|
|
|
|
*
|
|
|
|
* \param fd File descriptor.
|
|
|
|
*
|
|
|
|
* \return Block size.
|
|
|
|
*/
|
2016-09-14 15:47:21 +00:00
|
|
|
uint32_t spdk_fd_get_blocklen(int fd);
|
2015-10-19 22:47:56 +00:00
|
|
|
|
2016-02-12 14:52:35 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-10-19 22:47:56 +00:00
|
|
|
#endif
|