]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - ataprint.h
Merge branch 'upstream'
[mirror_smartmontools-debian.git] / ataprint.h
1 /*
2 * ataprint.h
3 *
4 * Home page of code is: http://smartmontools.sourceforge.net
5 *
6 * Copyright (C) 2002-6 Bruce Allen <smartmontools-support@lists.sourceforge.net>
7 * Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
12 * any later version.
13 *
14 * You should have received a copy of the GNU General Public License
15 * (for example COPYING); if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 * This code was originally developed as a Senior Thesis by Michael Cornwell
19 * at the Concurrent Systems Laboratory (now part of the Storage Systems
20 * Research Center), Jack Baskin School of Engineering, University of
21 * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
22 *
23 */
24
25 #ifndef ATAPRINT_H_
26 #define ATAPRINT_H_
27
28 #define ATAPRINT_H_CVSID "$Id: ataprint.h,v 1.29 2006/09/17 10:12:51 shattered Exp $\n"
29
30 #include <stdio.h>
31 #include <stdlib.h>
32
33 /* Prints ATA Drive Information and S.M.A.R.T. Capability */
34 int ataPrintDriveInfo(struct ata_identify_device *);
35
36 void ataPrintGeneralSmartValues(struct ata_smart_values *, struct ata_identify_device *);
37
38 void ataPrintSmartThresholds(struct ata_smart_thresholds_pvt *);
39
40 // returns number of errors in Errorlog
41 int ataPrintSmartErrorlog(struct ata_smart_errorlog *);
42
43 int ataPrintLogDirectory(struct ata_smart_log_directory *);
44
45 void PrintSmartAttributes(struct ata_smart_values *);
46
47 void PrintSmartAttribWithThres(struct ata_smart_values *,
48 struct ata_smart_thresholds_pvt *,
49 int onlyfailed);
50
51 // returns number of entries that had logged errors
52 int ataPrintSmartSelfTestlog(struct ata_smart_selftestlog *, int allentries);
53
54 void ataPseudoCheckSmart(struct ata_smart_values *, struct ata_smart_thresholds_pvt *);
55
56 // Convenience function for formatting strings from ata_identify_device.
57 void formatdriveidstring(char *out, const char *in, int n);
58
59 int ataPrintMain(int fd);
60
61 #endif