File: disk.h

package info (click to toggle)
diskscan 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,656 kB
  • sloc: ansic: 11,136; python: 338; xml: 138; sh: 41; makefile: 34
file content (18 lines) | stat: -rw-r--r-- 519 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef DISKSCAN_DISK_H
#define DISKSCAN_DISK_H

#include "arch.h"
#include "libscsicmd/include/ata.h"

/** Check if the disk had a smart trip, only relevant for ATA disks.
 *
 * Returns -1 on error, 0 if there is no smart trip and 1 if there is a smart trip.
 */
int disk_smart_trip(disk_dev_t *dev);

/** Read the disk SMART attributes into the pre-defined array.
 * Returns -1 on error, number of attributes on success.
 */
int disk_smart_attributes(disk_dev_t *dev, ata_smart_attr_t *attrs, int max_attrs);

#endif