Skip to content

Instantly share code, notes, and snippets.

View williamspatrick's full-sized avatar

Patrick Williams williamspatrick

View GitHub Profile
/usr/local/include/boost/asio/detail/impl/reactive_descriptor_service.ipp:115:17: error: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage,-warnings-as-errors]
if (int err = reactor_.register_descriptor(
^
../src/main.cpp:92:9: note: Calling 'make_shared<sdbusplus::asio::connection, boost::asio::io_context &>'
std::make_shared<sdbusplus::asio::connection>(io);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr.h:1009:14: note: Calling constructor for 'shared_ptr<sdbusplus::asio::connection>'
return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a},
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr.h:464:4: note: Calling constructor for '__shared_ptr<sdbusplus::asio::connection, __gnu_cxx::_S_atomic>'
{
"type": "phosphor-image-manifest",
"version": 1,
"info": {
"purpose": "xyz.openbmc_project.Software.Version.VersionPurpose.BMC",
"machine": "bletchley",
"version": "2.14.0-dev-685-g917fab29b",
"build-id": "20230311020631",
"extended-version": "2.14.0-dev-685-g917fab29b",
"compatible-names": [
@williamspatrick
williamspatrick / gist:03d72260982332c786770d0678644f94
Created August 26, 2020 15:09
sdbusplus - readonly properties?
$ find -name "*.yaml" | xargs grep -i -- "read-only"
./xyz/openbmc_project/Chassis/Control/Power.interface.yaml: It is a read-only property.
./xyz/openbmc_project/Network/EthernetInterface.interface.yaml: This property reports the link status for the NIC. The read-only
./xyz/openbmc_project/Sensor/Value.interface.yaml: All Sensor.Value properties are read-only.
./xyz/openbmc_project/State/BMC.interface.yaml: The current state of the BMC and is a read-only property.
./xyz/openbmc_project/State/Chassis.interface.yaml: A read-only property describing the current chassis power state.
./xyz/openbmc_project/State/Host.interface.yaml: A read-only property describing the current state of the host
./xyz/openbmc_project/VirtualMedia/Legacy.interface.yaml: description: False if the image should be read-only.
$ find -name "*.yaml" | xargs grep -i -- "read only"
./xyz/openbmc_project/Control/ThermalMode.interface.yaml: Control.ThermalMode.Supported is read only.
$ find -name "*.yaml" | xargs grep -- " - const"
./xyz/openbmc_project/Control/FanRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/FanRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/FanRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/PowerSupplyAttributes.interface.yaml: - const
./xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml: - const
./xyz/openbmc_project/Control/ThermalMode.interface.yaml: - const
./xyz/openbmc_project/Network/EthernetInterface.interface.yaml: - const
./xyz/openbmc_project/User/Manager.interface.yaml: - const
./xyz/openbmc_project/User/Manager.interface.yaml: - const
#include <sdbusplus/server.hpp>
#include <net/poettering/Calculator/server.hpp>
namespace sdbusplus
{
namespace server
{
namespace net
{
namespace poettering
#!/bin/bash
GERRIT_COMMAND="curl -s --anyauth -n https://gerrit.openbmc-project.xyz"
GITHUB_COMMAND="curl -s -n https://api.github.com"
GITHUB_TEAM=1777905
echo "Checking ${GERRIT_PROJECT}:${GERRIT_BRANCH}:${GERRIT_CHANGE_ID}:${GERRIT_PATCHSET_REVISION}"
COMMITTER_EMAIL=`${GERRIT_COMMAND}/a/changes/${GERRIT_PROJECT/\//%2F}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/${GERRIT_PATCHSET_REVISION}/commit | grep -Pzo "committer[^}]*" | grep -a '"email":' | sed 's/",$//' | sed 's/.*"//'`
@williamspatrick
williamspatrick / autobump
Last active January 27, 2017 02:36
openbmc-autobump tool
#!/usr/bin/env perl
use strict;
use File::Basename qw/basename/;
my $metas_to_search = "meta-phosphor meta-openbmc-machines meta-openbmc-bsp";
my $master_project = "openbmc";
my $server = "https://gerrit.openbmc-project.xyz";
system("cd $master_project && git fetch origin && git checkout origin/master");
@williamspatrick
williamspatrick / keybase.md
Created September 22, 2015 20:12
keybase.md

Keybase proof

I hereby claim:

  • I am williamspatrick on github.
  • I am williamspatrick (https://keybase.io/williamspatrick) on keybase.
  • I have a public key whose fingerprint is 0460 FD8A 2E0B 13D7 0D6E A241 AB03 47CC 2D00 C119

To claim this, I am signing this object:

@williamspatrick
williamspatrick / foo.C
Last active September 22, 2015 17:39
designated initializers?
using namespace std;
#include <iostream>
#include <stdint.h>
struct foo
{
int x;
int y;
};