mirror of
https://github.com/akatrevorjay/edid-generator.git
synced 2026-01-15 23:50:28 +01:00
limit name length to 12 characters
found at https://github.com/akatrevorjay/edid-generator/issues/21#issuecomment-1025054600
This commit is contained in:
@@ -32,6 +32,7 @@ template-S() {
|
|||||||
|
|
||||||
local name="${1//\"}"
|
local name="${1//\"}"
|
||||||
[[ -z "$name" ]] && echo "Could not parse modeline: $@" >&2 && return 1
|
[[ -z "$name" ]] && echo "Could not parse modeline: $@" >&2 && return 1
|
||||||
|
[[ "${#name}" -gt 12 ]] && echo "Name cannot be longer than 12 characters: $name is ${#name} characters long" >&2 && return 1
|
||||||
local fn="${name}.S"
|
local fn="${name}.S"
|
||||||
|
|
||||||
local -F pixel_clock_mhz=$2
|
local -F pixel_clock_mhz=$2
|
||||||
@@ -60,7 +61,7 @@ template-S() {
|
|||||||
case $ratio in
|
case $ratio in
|
||||||
compute)
|
compute)
|
||||||
ratio=$(find-supported-ratio $hdisp $vdisp 'UNKNOWN')
|
ratio=$(find-supported-ratio $hdisp $vdisp 'UNKNOWN')
|
||||||
printf 'Computed ratio: %s' $ratio
|
printf 'Computed ratio: %s\n' $ratio
|
||||||
[[ $ratio != 'UNKNOWN' ]] || return 1
|
[[ $ratio != 'UNKNOWN' ]] || return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user