Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/root/sys/src/cmd/disk/smart/smart.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


enum {
	Tscsi	= 1,
	Tata	= 2,

	Sok	= 0,
	Ssoon	= 1,
	Sfail	= 2,

	Nrb	= 32,
	Pathlen	= 256,
};

typedef struct Dtype Dtype;
typedef struct Sdisk Sdisk;

struct Dtype {
	int	type;
	char	*tname;
	int	(*probe)(Sdisk*);
	int	(*enable)(Sdisk*);
	int	(*status)(Sdisk*, char*, int);
};

struct Sdisk {
	Sdisk	*next;
	Dtype	*t;
	int	fd;
	Sfis;
	char	path[Pathlen];
	char	name[28];
	char	status;
	uchar	silent;
	uvlong	lastcheck;
	uvlong	lastlog;
};

int	scsiprobe(Sdisk*);
int	scsienable(Sdisk*);
int	scsistatus(Sdisk*, char*, int);
int	ataprobe(Sdisk*);
int	ataenable(Sdisk*);
int	atastatus(Sdisk*, char*, int);

void	eprint(Sdisk*, char *, ...);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.