Learning D-Bus

https://www.freedesktop.org/wiki/Software/dbus/ https://www.freedesktop.org/wiki/IntroductionToDBus/ https://www.packtpub.com/mapt/book/application_development/9781849519427/10/ch10lvl1sec126/time-for-action–listening-to-d-bus https://dbus.freedesktop.org/doc/dbus-specification.html https://stackoverflow.com/questions/2830858/controlling-gnome-volume-using-dbus https://dbus.freedesktop.org/doc/dbus-tutorial.html#concepts https://dbus.freedesktop.org/doc/diagram.svg https://developer.gnome.org/NetworkManager/stable/spec.html https://developer.gnome.org/NetworkManager/stable/gdbus-org.freedesktop.NetworkManager.html http://www.beautifulwork.org/wp-content/uploads/2018/11/dbus.pdf http://www.beautifulwork.org/wp-content/uploads/2018/11/dbus.docx

Hacking with Makefile for machine architecture detection

# SPDX-License-Identifier: GPL-2.0 INCLUDEDIR := -I. CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g TEST_GEN_FILES := adi-test UNAME := $(shell uname -m) all: $(TEST_GEN_FILES) $(TEST_GEN_FILES): adi-test.c ifeq ($(UNAME), sparc64) $(info Machine architecture does match) else $(info exit) $(error Machine architecture does not match) endif TEST_PROGS := drivers_test.sh include ../../lib.mk $(OUTPUT)/adi-test: adi-test.c

Look into bash builtin command named typeset

$typeset -n gree=55 bash: typeset: 55′: invalid variable name for name reference $typeset -n 55=gree bash: typeset:55=gree’: not a valid identifier$typeset -n gree=pwd$echo $gree $echo $pwd $typeset -n vary=$?bash: typeset: `0′: invalid variable name for name reference$typeset vary=$?$echo $vary1$echo $vary1$echo $?0$echo $vary1$echo varyvary$echo $vary1$echo $vary1$echo $?0$typeset vary=$?$echo $vary0$ $typeset hello $echo $hello $echo $? 0

How to use dirs, pushd and popd commands ?

$pushd upstream-kernel/ ~/upstream-kernel ~ $pwd /home/jeffrin/upstream-kernel $cd .. $pushd temp/ ~/temp ~ ~ $dirs ~/temp ~ ~ $dirs -l /home/jeffrin/temp /home/jeffrin /home/jeffrin $pwd /home/jeffrin/temp $pushd ../upstream-kernel/ ~/upstream-kernel ~/temp ~ ~ $dirs -l /home/jeffrin/upstream-kernel /home/jeffrin/temp /home/jeffrin /home/jeffrin $pushd ../testing/ ~/testing ~/upstream-kernel ~/temp ~ ~ $dirs -l /home/jeffrin/testing /home/jeffrin/upstream-kernel /home/jeffrin/temp /home/jeffrin /home/jeffrin $popd ~/upstream-kernel ~/temp ~ ~

finding source code or source file of a typical bash function

$type -a signals bash: type: signals: not found $type -a _signals _signals is a function _signals () { local -a sigs=($( compgen -P “$1” -A signal “SIG${cur#$1}” )); COMPREPLY+=(“${sigs[@]/#${1}SIG/${1}}”) } $declare -F _signals _signals $shopt -s extdebug $declare -F _signals _signals 862 /usr/share/bash-completion/bash_completion $declare -F _command _command 1732 /usr/share/bash-completion/bash_completion $declare -F compgen $declare -F _grub_dirs