-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
52 lines (41 loc) · 1.06 KB
/
Copy pathcommon.h
File metadata and controls
52 lines (41 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef DEVLIST_COMMON_H
#define DEVLIST_COMMON_H
#ifdef USE_LIBUSEFUL_BUNDLED
#include "libUseful-bundled/libUseful.h"
#else
#include "libUseful-5/libUseful.h"
#endif
#include <glob.h>
#define FLAG_REMOVABLE 1
#define FLAG_READONLY 2
#define VERSION "1.3"
extern char *PciIDsFile;
extern char *PciIDsDirs;
typedef struct
{
unsigned long BusNum;
unsigned long DevNum;
unsigned long PowerMax;
unsigned long PowerNow;
uint64_t Speed;
uint64_t Size;
int Flags;
char *BusType;
char *Address;
char *DevNode;
char *Serial;
char *idClass;
char *Class;
char *idVendor;
char *Vendor;
char *idProduct;
char *Description;
char *Status;
} TDevice;
char *ReadFile(char *RetStr, const char *Dir, const char *File);
int ReadIntegerFile(const char *Dir, const char *File);
uint64_t ReadUint64File(const char *Dir, const char *File);
char *LookupDevNode(char *RetStr, const char *Path, const char *SubDir, const char *PostFix);
void LookupAnyDevNode(TDevice *dev, const char *Path);
void TDeviceDestroy(void *p_Dev);
#endif