Usage is simple:
./gen.sh 192.168.10.0/24 192.168.10.1
Results:
192.168.10.0/24 via 192.168.10.1 = 18:c0:a8:0a:00:c0:a8:0a:01
| diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c | |
| index 6c91bd44a0..f3c7b9d328 100644 | |
| --- a/hw/pci/pcie.c | |
| +++ b/hw/pci/pcie.c | |
| @@ -39,6 +39,166 @@ | |
| #define PCIE_DEV_PRINTF(dev, fmt, ...) \ | |
| PCIE_DPRINTF("%s:%x "fmt, (dev)->name, (dev)->devfn, ## __VA_ARGS__) | |
| +static uint16_t pcie_link_max_width(PCIDevice *dev) | |
| +{ |
| function bytesToHR() | |
| { | |
| local SIZE=$1 | |
| local UNITS="B KiB MiB GiB TiB PiB" | |
| for F in $UNITS; do | |
| local UNIT=$F | |
| test ${SIZE%.*} -lt 1024 && break; | |
| SIZE=$(echo "$SIZE / 1024" | bc -l) | |
| done |
| static int reset_amdgpu_vega(struct pci_dev *dev, int probe) { | |
| #define AMDGPU_MAX_USEC_TIMEOUT 100000 | |
| #define MP0_BASE 0x16000 | |
| #define mmMP0_SMN_C2PMSG_33 ((MP0_BASE + 0x0061) * 4) | |
| #define mmMP0_SMN_C2PMSG_64 ((MP0_BASE + 0x0080) * 4) | |
| #define mmMP0_SMN_C2PMSG_81 ((MP0_BASE + 0x0091) * 4) | |
| resource_size_t rmmio_base, rmmio_size; | |
| void __iomem *rmmio; | |
| int ret; |
| #!/usr/bin/python3 | |
| # spool.py - HPGL Spooler for Serial attached Roland DXY-1100 | |
| # Copyright (C) 2019 Geoffrey McRae <geoff@hostfission.com> | |
| # https://hostfission.com | |
| # | |
| # This program is free software; you can redistribute it and/or modify it under | |
| # the terms of the GNU General Public License as published by the Free Software | |
| # Foundation; either version 2 of the License, or (at your option) any later | |
| # version. |
| #!/bin/bash | |
| source vm-helpers.sh | |
| NODE=1 | |
| RAM=16 | |
| allocateRAM $NODE $RAM | |
| unbindConsole | |
| takeDevByName "\[AMD/ATI\] Navi 10 (rev c1)" 1 |
| #include <stdio.h> | |
| #include <sys/socket.h> | |
| #include <sys/un.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #include <sys/mman.h> | |
| #include <sys/stat.h> | |
| typedef struct { |
| #!/bin/bash | |
| # | |
| # Script to make a proxy (ie HAProxy) capable of monitoring Galera Cluster nodes properly | |
| # Updated by Geoffrey McRae to check for MySQL command failure, and renamed to 'Galera Cluster' | |
| # | |
| # Author: Olaf van Zandwijk <olaf.vanzandwijk@nedap.com> | |
| # Author: Raghavendra Prabhu <raghavendra.prabhu@percona.com> | |
| # Author: Geoffrey McRae <geoff@hostfission.com> | |
| # | |
| # Documentation and download: https://github.com/olafz/percona-clustercheck |
| /* | |
| Example X11 application that uses XGetFrame to capture an application window. | |
| Copyright 2020 Geoffrey McRae <geoff@hostfission.com> | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| all: | |
| gcc -D_GNU_SOURCE main.c -Wall -Werror -g -Og -o test -lX11-xcb -lX11 -lxcb -lxcb-dri3 -lxcb-present |
Usage is simple:
./gen.sh 192.168.10.0/24 192.168.10.1
Results:
192.168.10.0/24 via 192.168.10.1 = 18:c0:a8:0a:00:c0:a8:0a:01