Skip to content

Commit b40e606

Browse files
committed
Rename SetInProgress type to SetInProgressState
1 parent ef3e2ca commit b40e606

11 files changed

+27
-27
lines changed

cmd/goipmi/commands/x.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func NewCmdXGetSDRs() *cobra.Command {
6262
fmt.Printf("\n\nGet SDRs at %s\n", time.Now().Format(timeFormat))
6363
res, err := client.GetSDRs(ctx)
6464
if err != nil {
65-
fmt.Printf("GetSDRs failed, err: %w", err)
65+
fmt.Printf("GetSDRs failed, err: %s", err)
6666
if loop {
6767
goto WAIT
6868
} else {
@@ -107,7 +107,7 @@ func NewCmdXGetSensors() *cobra.Command {
107107
fmt.Printf("\n\nGet Sensors at %s\n", time.Now().Format(timeFormat))
108108
res, err := client.GetSensors(ctx)
109109
if err != nil {
110-
fmt.Printf("GetSensors failed, err: %w", err)
110+
fmt.Printf("GetSensors failed, err: %s", err)
111111
if loop {
112112
goto WAIT
113113
} else {
@@ -149,7 +149,7 @@ func NewCmdXGetDeviceSDRs() *cobra.Command {
149149
fmt.Printf("\n\nGet Device SDR at %s\n", time.Now().Format(timeFormat))
150150
res, err := client.GetDeviceSDRs(ctx)
151151
if err != nil {
152-
fmt.Printf("GetDeviceSDRs failed, err: %w", err)
152+
fmt.Printf("GetDeviceSDRs failed, err: %s", err)
153153
return
154154
}
155155

cmd_set_system_boot_options_others.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
)
77

8-
func (c *Client) SetBootParamSetInProgress(ctx context.Context, setInProgress SetInProgress) error {
8+
func (c *Client) SetBootParamSetInProgress(ctx context.Context, setInProgress SetInProgressState) error {
99
param := &BootOptionParam_SetInProgress{
1010
Value: setInProgress,
1111
}

helpers_hmac_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func Test_encryptAES(t *testing.T) {
4848
for _, v := range cases {
4949
got, err := encryptAES(v.ipmiRequestBody, v.key, v.iv)
5050
if err != nil {
51-
t.Errorf("encryptAES failed, err: %w", err)
51+
t.Errorf("encryptAES failed, err: %s", err)
5252
}
5353
if !isByteSliceEqual(got, v.expected) {
5454
t.Errorf("got does not match expected, got: %v, want: %v", got, v.expected)

interface_system.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (c *Client) exchangeOpen(ctx context.Context, request Request, response Res
110110
if err := response.Unpack(unpackData); err != nil {
111111
return &ResponseError{
112112
completionCode: CompletionCode(recv[0]),
113-
description: fmt.Sprintf("unpack response failed, err: %w", err),
113+
description: fmt.Sprintf("unpack response failed, err: %s", err),
114114
}
115115
}
116116

types_boot_option_params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func (bootOptionsParams *BootOptionsParams) Format() string {
120120
}
121121

122122
type BootOptionParam_SetInProgress struct {
123-
Value SetInProgress
123+
Value SetInProgressState
124124
}
125125

126126
func (p *BootOptionParam_SetInProgress) BootOptionParameter() (paramSelector BootOptionParamSelector, setSelector uint8, blockSelector uint8) {
@@ -132,7 +132,7 @@ func (p *BootOptionParam_SetInProgress) Unpack(paramData []byte) error {
132132
return fmt.Errorf("the parameter data length must be 1 byte")
133133
}
134134

135-
p.Value = SetInProgress(paramData[0])
135+
p.Value = SetInProgressState(paramData[0])
136136
return nil
137137
}
138138

types_lan_config.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import (
55
"net"
66
)
77

8-
type SetInProgress uint8
8+
type SetInProgressState uint8
99

1010
const (
11-
SetInProgress_SetComplete SetInProgress = 0x00
12-
SetInProgress_SetInProgress SetInProgress = 0x01
13-
SetInProgress_CommitWrite SetInProgress = 0x02
14-
SetInProgress_Reserved SetInProgress = 0x03
11+
SetInProgress_SetComplete SetInProgressState = 0x00
12+
SetInProgress_SetInProgress SetInProgressState = 0x01
13+
SetInProgress_CommitWrite SetInProgressState = 0x02
14+
SetInProgress_Reserved SetInProgressState = 0x03
1515
)
1616

17-
func (p SetInProgress) String() string {
18-
m := map[SetInProgress]string{
17+
func (p SetInProgressState) String() string {
18+
m := map[SetInProgressState]string{
1919
0x00: "set complete",
2020
0x01: "set in progress",
2121
0x02: "commit write",
@@ -331,7 +331,7 @@ type LanConfigParams struct {
331331
}
332332

333333
type LanConfig struct {
334-
SetInProgress SetInProgress // #0, Read Only
334+
SetInProgress SetInProgressState // #0, Read Only
335335
AuthTypeSupport LanConfigParam_AuthTypeSupport // #1
336336
AuthTypeEnables LanConfigParam_AuthTypeEnables // #2
337337
IP net.IP // #3

types_lan_config_params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ func isNilLanConfigParameter(param LanConfigParameter) bool {
336336
}
337337

338338
type LanConfigParam_SetInProgress struct {
339-
Value SetInProgress
339+
Value SetInProgressState
340340
}
341341

342342
func (param *LanConfigParam_SetInProgress) LanConfigParameter() (paramSelector LanConfigParamSelector, setSelector uint8, blockSelector uint8) {
@@ -352,7 +352,7 @@ func (param *LanConfigParam_SetInProgress) Unpack(data []byte) error {
352352
return ErrUnpackedDataTooShortWith(len(data), 1)
353353
}
354354

355-
param.Value = SetInProgress(data[0])
355+
param.Value = SetInProgressState(data[0])
356356
return nil
357357
}
358358

types_pef_params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (pefConfigParams *PEFConfigParams) Format() string {
214214
}
215215

216216
type PEFConfigParam_SetInProgress struct {
217-
Value SetInProgress
217+
Value SetInProgressState
218218
}
219219

220220
func (param *PEFConfigParam_SetInProgress) PEFConfigParameter() (paramSelector PEFConfigParamSelector, setSelector uint8, blockSelector uint8) {
@@ -226,7 +226,7 @@ func (param *PEFConfigParam_SetInProgress) Unpack(data []byte) error {
226226
return ErrUnpackedDataTooShortWith(len(data), 1)
227227
}
228228

229-
param.Value = SetInProgress(data[0])
229+
param.Value = SetInProgressState(data[0])
230230
return nil
231231
}
232232

types_rmcp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func (c *Client) ParseRmcpResponse(ctx context.Context, msg []byte, response Res
375375
if err := response.Unpack(ipmiRes.Data); err != nil {
376376
return &ResponseError{
377377
completionCode: 0x00,
378-
description: fmt.Sprintf("unpack response failed, err: %w", err),
378+
description: fmt.Sprintf("unpack response failed, err: %s", err),
379379
}
380380
}
381381
}
@@ -426,7 +426,7 @@ func (c *Client) ParseRmcpResponse(ctx context.Context, msg []byte, response Res
426426
if err := response.Unpack(ipmiRes.Data); err != nil {
427427
return &ResponseError{
428428
completionCode: 0x00,
429-
description: fmt.Sprintf("unpack response failed, err: %w", err),
429+
description: fmt.Sprintf("unpack response failed, err: %s", err),
430430
}
431431
}
432432
}

types_sol_config_params.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (p *SOLConfigParams) Format() string {
119119
}
120120

121121
type SOLConfigParam_SetInProgress struct {
122-
Value SetInProgress
122+
Value SetInProgressState
123123
}
124124

125125
func (p *SOLConfigParam_SetInProgress) SOLConfigParameter() (paramSelector SOLConfigParamSelector, setSelector uint8, blockSelector uint8) {
@@ -130,7 +130,7 @@ func (p *SOLConfigParam_SetInProgress) Unpack(paramData []byte) error {
130130
if len(paramData) != 1 {
131131
return fmt.Errorf("the parameter data length must be 1 byte")
132132
}
133-
p.Value = SetInProgress(paramData[0])
133+
p.Value = SetInProgressState(paramData[0])
134134
return nil
135135
}
136136

0 commit comments

Comments
 (0)