Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mvp/uhubctl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.5.0
Choose a base ref
...
head repository: mvp/uhubctl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 371 additions and 192 deletions.
  1. +3 −0 .gitignore
  2. +0 −24 Formula/uhubctl.rb
  3. +1 −1 LICENSE
  4. +7 −2 Makefile
  5. +153 −94 README.md
  6. +1 −1 VERSION
  7. +5 −5 udev/rules.d/52-usb.rules
  8. +201 −45 uhubctl.c
  9. +0 −20 uhubctl_git.bb
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -10,3 +10,6 @@ uhubctl
# Patches
*.patch
*.diff

# IDE config dirs
.*/
24 changes: 0 additions & 24 deletions Formula/uhubctl.rb

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
uhubctl – USB hub per-port power control.

Copyright (c) 2009-2022, Vadim Mikhailov
Copyright (c) 2009-2025, Vadim Mikhailov

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
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ PKG_CONFIG ?= pkg-config

CC ?= gcc
CFLAGS ?= -g -O0
CFLAGS += -Wall -Wextra -std=c99 -pedantic
CFLAGS += -Wall -Wextra -Wno-zero-length-array -std=c99 -pedantic
GIT_VERSION := $(shell git describe --match "v[0-9]*" --abbrev=8 --dirty --tags | cut -c2-)
ifeq ($(GIT_VERSION),)
GIT_VERSION := $(shell cat VERSION)
@@ -31,12 +31,17 @@ ifneq (,$(shell which $(PKG_CONFIG)))
CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
LDFLAGS += $(shell $(PKG_CONFIG) --libs libusb-1.0)
else
# But it should still build if pkg-config is not available (e.g. Linux or Mac homebrew)
# But it should still build even if pkg-config is not available
CFLAGS += -I/usr/include/libusb-1.0
LDFLAGS += -lusb-1.0
endif

PROGRAM = uhubctl

.PHONY: all install clean

all: $(PROGRAM)

$(PROGRAM): $(PROGRAM).c
$(CC) $(CPPFLAGS) $(CFLAGS) $@.c -o $@ $(LDFLAGS)

Loading