]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/disk/smart/smart.h
Add Erik Quanstrom's smart tool for ATA SMART.
[plan9front.git] / sys / src / cmd / disk / smart / smart.h
1 enum {
2         Tscsi   = 1,
3         Tata    = 2,
4
5         Sok     = 0,
6         Ssoon   = 1,
7         Sfail   = 2,
8
9         Nrb     = 32,
10         Pathlen = 256,
11 };
12
13 typedef struct Dtype Dtype;
14 typedef struct Sdisk Sdisk;
15
16 struct Dtype {
17         int     type;
18         char    *tname;
19         int     (*probe)(Sdisk*);
20         int     (*enable)(Sdisk*);
21         int     (*status)(Sdisk*, char*, int);
22 };
23
24 struct Sdisk {
25         Sdisk   *next;
26         Dtype   *t;
27         int     fd;
28         Sfis;
29         char    path[Pathlen];
30         char    name[28];
31         char    status;
32         uchar   silent;
33         uvlong  lastcheck;
34         uvlong  lastlog;
35 };
36
37 int     scsiprobe(Sdisk*);
38 int     scsienable(Sdisk*);
39 int     scsistatus(Sdisk*, char*, int);
40 int     ataprobe(Sdisk*);
41 int     ataenable(Sdisk*);
42 int     atastatus(Sdisk*, char*, int);
43
44 void    eprint(Sdisk*, char *, ...);