Skip to content

(FACT-1144) Add memory resolver for OpenBSD#1074

Merged
peterhuene merged 1 commit intopuppetlabs:masterfrom
jasperla:openbsd/memory
Aug 3, 2015
Merged

(FACT-1144) Add memory resolver for OpenBSD#1074
peterhuene merged 1 commit intopuppetlabs:masterfrom
jasperla:openbsd/memory

Conversation

@jasperla
Copy link

Currently without swap facts while those are being sorted out.

@MikaelSmith
Copy link

Mind commenting with the output from the resolver?

@jasperla
Copy link
Author

{
  system => {
    available => "1.47 GiB",
    available_bytes => 1578127360,
    capacity => "59.23%",
    total => "3.61 GiB",
    total_bytes => 3870953472,
    used => "2.14 GiB",
    used_bytes => 2292826112
  }
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally prefer c++-style casts over c-style casts (for various reasons). result.mem_total = static_cast<uint64_t>(uvmexp.npages << uvmexp.pageshift); should do it. Same comment for the line below.

@peterhuene
Copy link

Other than above minor comments, this looks good 👍

@peterhuene peterhuene added PR Triage triaged Jira issue has been created for this labels Jul 27, 2015
@jasperla
Copy link
Author

I've fixed up the casts and declaration.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this block is unintentionally indented more than needed.

@jasperla
Copy link
Author

That's also fixed now.

@HAIL9000
Copy link

HAIL9000 commented Aug 3, 2015

@peterhuene, could you take another look now that it's been updated?

peterhuene added a commit that referenced this pull request Aug 3, 2015
@peterhuene peterhuene merged commit d66b482 into puppetlabs:master Aug 3, 2015
@peterhuene
Copy link

@jasperla Thanks again for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triaged Jira issue has been created for this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants