File: driveprm.h

package info (click to toggle)
fdutils 5.3-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,004 kB
  • ctags: 621
  • sloc: ansic: 6,098; sh: 2,236; makefile: 279; sed: 4
file content (51 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (12)
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
#ifndef DRIVEPRM_H
#define DRIVEPRM_H

#define DRIVEPRMFILE SYSCONFDIR "/driveprm"

#include <linux/fd.h>
#include <sys/stat.h>

/* different densities */
typedef enum
{
	DENS_UNKNOWN, DENS_SD, DENS_DD, DENS_QD, DENS_HD, DENS_ED
} density_t;


/* various drive form factors */
typedef enum
{
	FF_UNKNOWN, FF_35, FF_525, FF_8 
} ff_t;

typedef struct {
	int cmos;
	ff_t ff;
	density_t max_density; /* maximal supported density */
	int tpi;
	int rpm;
	int deviation;
} drivetypedesc_t;  

/* drive descriptor */
typedef struct {
	drivetypedesc_t type;
	int drivenum; /* the drive number [0-7] */
	struct stat buf;
	struct floppy_drive_params drvprm;
	int mask;
} drivedesc_t;

int parse_driveprm(int fd, drivedesc_t *drive);

typedef enum {
	FE__UNKNOWN,
	FE__CMOS,
	FE__TPI,
	FE__FF,
	FE__RPM,
	FE__DEVIATION,
	FE__DENSITY,
} drive_field_t;
#endif