Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2078 - tty noisy from /etc/hotplug.d/net/10-ar922x-led-fix #6938

Open
openwrt-bot opened this issue Jan 23, 2019 · 0 comments
Open

FS#2078 - tty noisy from /etc/hotplug.d/net/10-ar922x-led-fix #6938

openwrt-bot opened this issue Jan 23, 2019 · 0 comments
Labels
flyspray kernel

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jan 23, 2019

openalmeida:

Hi,

I think it is just a coding style issue,
but makes tty output noisy when procd debug level selected (3 or 4 for me).

noise examples:

cat: can't open '/sys/devices/virtual/ieee80211/phy*/name': No such file or directory
sh: add: unknown operand

or

cat: can't open '/sys/devices/virtual/ieee80211/phy*/name': No such file or directory
sh: remove: unknown operand

times depends on how many hotplug event happened

demo patch below

https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-ar922x-led-fix

  • phyname=$(cat $phydir/phy*/name)
  • phyname=$(cat $phydir/phy*/name 2>/dev/null)
  • [ -z $phyname -o $ACTION != "add" ] && exit 0
  • [ 0 != $? -o -z "$phyname" -o "$ACTION" != "add" ] && exit 0
  • [ $phyname -a $ACTION = "add" ] && {
  • [ ! -z "$phyname" -a "$ACTION" == "add" ] && {
@aparcar aparcar added the kernel label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray kernel
Projects
None yet
Development

No branches or pull requests

2 participants