Skip to content

Commit b5a5e4c

Browse files
Felix FietkauSam Ravnborg
authored andcommitted
kbuild: fix unportability in gen_initramfs_list.sh
On a Mac OS X machine the output of ls -l is different from a standard Linux machine. Use readlink instead of parsing a hardcoded field number from the ls output. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
1 parent 01dee18 commit b5a5e4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/gen_initramfs_list.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ parse() {
135135
str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
136136
;;
137137
"slink")
138-
local target=`field 11 $(LC_ALL=C ls -l "${location}")`
138+
local target=`readlink "${location}"`
139139
str="${ftype} ${name} ${target} ${str}"
140140
;;
141141
*)

0 commit comments

Comments
 (0)