mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
Merge pull request #1659 from aidangill-projects/issue-1658
Issue 1658: Fix for parsing error where 'day,' is ignored on AIX uptime check
This commit is contained in:
commit
ac15d68545
@ -65,7 +65,7 @@ func UptimeWithContext(ctx context.Context) (uint64, error) {
|
||||
var days uint64 = 0
|
||||
var hours uint64 = 0
|
||||
var minutes uint64 = 0
|
||||
if ut[3] == "days," {
|
||||
if ut[3] == "day," || ut[3] == "days," {
|
||||
days, err = strconv.ParseUint(ut[2], 10, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user