File: scsiprint.h

package info (click to toggle)
smartmontools 7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,764 kB
  • sloc: cpp: 47,218; ansic: 9,922; sh: 5,826; makefile: 939
file content (79 lines) | stat: -rw-r--r-- 2,440 bytes parent folder | download
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * scsiprint.h
 *
 * Home page of code is: http://www.smartmontools.org
 *
 * Copyright (C) 2002-9 Bruce Allen
 * Copyright (C) 2000 Michael Cornwell <cornwell@acm.org>
 *
 * Additional SCSI work:
 * Copyright (C) 2003-18 Douglas Gilbert <dgilbert@interlog.com>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */


#ifndef SCSI_PRINT_H_
#define SCSI_PRINT_H_

#define SCSIPRINT_H_CVSID "$Id: scsiprint.h 5131 2020-12-15 21:30:33Z dpgilbert $\n"

// Options for scsiPrintMain
struct scsi_print_options
{
  bool drive_info;
  bool smart_check_status;
  bool smart_vendor_attrib;
  bool smart_error_log;
  bool smart_selftest_log;
  bool smart_background_log;
  bool smart_ss_media_log;

  bool smart_disable, smart_enable;
  bool smart_auto_save_disable, smart_auto_save_enable;

  bool smart_default_selftest;
  bool smart_short_selftest, smart_short_cap_selftest;
  bool smart_extend_selftest, smart_extend_cap_selftest;
  bool smart_selftest_abort;
  bool smart_selftest_force; // Ignore already running test

  bool sasphy, sasphy_reset;
  
  bool get_wce, get_rcd;
  short int set_wce, set_rcd;  // disable(-1), enable(1) cache

  unsigned char powermode; // Enhancement Skip check, if disk in idle or standby mode
  unsigned char powerexit; // exit() code for low power mode

  int set_standby;         // set(1..255->0..254) standby timer
  bool set_standby_now;    // set drive to standby
  bool set_active;         // set drive to active

  scsi_print_options()
    : drive_info(false),
      smart_check_status(false),
      smart_vendor_attrib(false),
      smart_error_log(false),
      smart_selftest_log(false),
      smart_background_log(false),
      smart_ss_media_log(false),
      smart_disable(false), smart_enable(false),
      smart_auto_save_disable(false), smart_auto_save_enable(false),
      smart_default_selftest(false),
      smart_short_selftest(false), smart_short_cap_selftest(false),
      smart_extend_selftest(false), smart_extend_cap_selftest(false),
      smart_selftest_abort(false),
      smart_selftest_force(false),
      sasphy(false), sasphy_reset(false),
      get_wce(false), get_rcd(false),
      set_wce(0), set_rcd(0),
      powermode(0), powerexit(0), // Power Check -n enhancement option
      set_standby(0), set_standby_now(false), // enable Standby options for -s
      set_active(false)
    { }
};

int scsiPrintMain(scsi_device * device, const scsi_print_options & options);

#endif