5 #define IS_PARTITION(DL) ((DL)->part_id!=0)
7 typedef struct DiskList
{
10 int hd_id
, part_id
; /* part_id = 0 for disks */
12 long nr
, nw
, touched_r
, touched_w
;
13 struct DiskList
*next
;
16 int is_displayed(int hd_id
, int part_id
); /* wmhdplop.c function */
17 int short_name_for_device(unsigned major
, unsigned minor
, char *name
);
19 const char *stripdev(const char *s
);
20 DiskList
*find_dev(unsigned major
, unsigned minor
);
21 DiskList
*find_dev_by_name(const char *name
);
22 DiskList
*find_id(int hd_id
, int part_id
);
23 DiskList
*next_hd_in_list(DiskList
*current
);
24 DiskList
*first_hd_in_list();
25 DiskList
*first_dev_in_list();
28 int is_partition(unsigned major
, unsigned minor
);
29 int add_device_by_name(const char *devname
, const char *mtab_name
);
30 int add_device_by_id(unsigned major
, unsigned minor
, const char *mtab_name
);
31 void add_swap(const char *swapdev
);
32 int device_info(unsigned major
, unsigned minor
, char *name
, int *hd_id
, int *part_id
);