mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
base-files: use consistent coding style
Add the opening bracket right after the function name, to do it the
same way for all functions in this file.
Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from ec28d2797c
)
This commit is contained in:
parent
a2b2a9c55f
commit
54278dfa69
@ -20,8 +20,7 @@ find_mtd_chardev() {
|
|||||||
echo "${INDEX:+$PREFIX$INDEX}"
|
echo "${INDEX:+$PREFIX$INDEX}"
|
||||||
}
|
}
|
||||||
|
|
||||||
mtd_get_mac_ascii()
|
mtd_get_mac_ascii() {
|
||||||
{
|
|
||||||
local mtdname="$1"
|
local mtdname="$1"
|
||||||
local key="$2"
|
local key="$2"
|
||||||
local part
|
local part
|
||||||
@ -87,22 +86,19 @@ macaddr_add() {
|
|||||||
echo $oui:$nic
|
echo $oui:$nic
|
||||||
}
|
}
|
||||||
|
|
||||||
macaddr_setbit_la()
|
macaddr_setbit_la() {
|
||||||
{
|
|
||||||
local mac=$1
|
local mac=$1
|
||||||
|
|
||||||
printf "%02x:%s" $((0x${mac%%:*} | 0x02)) ${mac#*:}
|
printf "%02x:%s" $((0x${mac%%:*} | 0x02)) ${mac#*:}
|
||||||
}
|
}
|
||||||
|
|
||||||
macaddr_2bin()
|
macaddr_2bin() {
|
||||||
{
|
|
||||||
local mac=$1
|
local mac=$1
|
||||||
|
|
||||||
echo -ne \\x${mac//:/\\x}
|
echo -ne \\x${mac//:/\\x}
|
||||||
}
|
}
|
||||||
|
|
||||||
macaddr_canonicalize()
|
macaddr_canonicalize() {
|
||||||
{
|
|
||||||
local mac="$1"
|
local mac="$1"
|
||||||
local canon=""
|
local canon=""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user