Adaptec 2410SA User Guide - Page 74

Afu Error Handling, Version, Errorlevel, If Errorlevel 1

Page 74 highlights

DOS Utilities After using the VERSION command, you must restart the computer upon completion of this command. Default Switch Values If you do not include the /C switch, the AFU returns a fatal error message. Examples The following example displays version information about all supported controllers. A:\> AFU VERSION /C 0 Adaptec Flash Utility V4.0-0 B5749 (c)Adaptec Inc. 1999-2002. All Rights Reserved. Version Information for Controller #0 (Adaptec 2410) ROM: Build 5748 [VALID] Fri Sep 27 13:28:40 EDT 2002 A:\> AFU VERSION /C ALL AFU Error Handling Because the AFU can run without user interaction, it exits immediately whenever an error is detected. For example, if the AFU is unable to locate UFI files, it displays an error message and exits. On exit, the AFU returns its exit status-zero for success or a non-zero code for an error-in the DOS environment variable ERRORLEVEL. If you run the AFU from within a DOS batch file, the batch file can examine the AFU's exit status using the DOS command IF ERRORLEVEL 1 to take action if the AFU exited with an error. B-10

  • 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
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153

B-10
DOS Utilities
After using the
VERSION
command, you must restart the
computer upon completion of this command.
Default Switch Values
If you do not include the
/C
switch, the AFU returns a fatal error
message.
Examples
The following example displays version information about all
supported controllers.
A:\> AFU VERSION /C 0
Adaptec Flash Utility V4.0-0 B5749
(c)Adaptec Inc. 1999–2002. All Rights Reserved.
Version Information for Controller #0 (Adaptec 2410)
ROM: Build 5748 [VALID] Fri Sep 27 13:28:40 EDT 2002
A:\> AFU VERSION /C ALL
AFU Error Handling
Because the AFU can run without user interaction, it exits
immediately whenever an error is detected. For example, if the
AFU is unable to locate UFI files, it displays an error message and
exits. On exit, the AFU returns its exit status
zero for success or a
non-zero code for an error
in the DOS environment variable
ERRORLEVEL
. If you run the AFU from within a DOS batch file, the
batch file can examine the AFU
s exit status using the DOS
command
IF ERRORLEVEL 1
to take action if the AFU exited with
an error.