#include <stdio.h>
#include <mntent.h>
#include <errno.h>
#include <string.h>
#include <sys/statfs.h>
#include <ctype.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <getopt.h>
#include <asm/types.h>
#include <mtd/mtd-abi.h>
#include <dirent.h>
#include "tq_common.h"
结构体 | |
struct | tagDevParam_T |
外部设备的子结构 更多... | |
struct | tagDevinfo_T |
设备消息标志 更多... | |
宏定义 | |
#define | DEVTYPE_DISK 2 |
硬盘 | |
#define | DEVTYPE_U 3 |
U盘 | |
类型定义 | |
typedef struct tagDevParam_T | tagDevParam_t |
外部设备的子结构 | |
typedef struct tagDevParam_T * | ptagDevParam_t |
typedef struct tagDevinfo_T | tagDevinfo_t |
设备消息标志 | |
typedef struct tagDevinfo_T * | ptagDevinfo_t |
函数 | |
int | get_udisk_count (void) |
获取u盘个数 更多... | |
int | get_udisk_path (int index, int part, char *buff, int size) |
获取u盘挂载路径 更多... | |
int | get_sdisk_path (int part, char *buff, int size) |
获取sd卡挂载路径 更多... | |
int | CheckIsDiskOrUsbDisk (char *devname) |
判读是u盘还是sata硬盘 更多... | |
int | get_udisk_devname (int index, char *buff, int length) |
获取U盘设备节点 更多... | |
int | get_flash_dev (char *ndev) |
获取闪存对象 更多... | |
Date | Version | Author | Description |
---|---|---|---|
2021-09-07 | 1.0 | zhengchuangyong | 第一次发布,对磁盘一些基本操作的封装,如获取磁盘信息个数等. |
int CheckIsDiskOrUsbDisk | ( | char * | devname | ) |
判读是u盘还是sata硬盘
devname | devname 为设备节点 |
int get_flash_dev | ( | char * | ndev | ) |
获取闪存对象
ndev | 设备节点名 |
int get_sdisk_path | ( | int | part, |
char * | buff, | ||
int | size | ||
) |
获取sd卡挂载路径
part | 为分区号 |
buff | 存放获取后挂载路径 |
size | buff的空间大小 |
int get_udisk_count | ( | void | ) |
获取u盘个数
int get_udisk_devname | ( | int | index, |
char * | buff, | ||
int | length | ||
) |
获取U盘设备节点
index | u盘号 |
buff | 获取后挂载路径 |
length | buff的空间大小 |
int get_udisk_path | ( | int | index, |
int | part, | ||
char * | buff, | ||
int | size | ||
) |
获取u盘挂载路径
index | u盘号 |
part | 为分区号 |
buff | 存放获取后挂载路径 |
size | buff的空间大小 |