Hi Jonas, On Wed, 2015-11-11 at 12:19 +0100, Jonas Gorski wrote: > Hi Alexey, > > On Tue, Nov 10, 2015 at 5:40 PM, Alexey Brodkin > <[email protected]> wrote: > > Hi Jonas, > > > > On Tue, 2015-11-10 at 12:02 +0100, Jonas Gorski wrote:
> > > Hi Alexey, > I see what you want, but the way you are doing it is quite error prone > and inefficient. If you insist on using the compatible, i suggest: > > 1. Extract the first one instead of grepping through the full > compatible set, so you don't need to invoke grep for each comparison > (also dropping the misuse of cat ;p). The problem is how multientry compatible string is presented in /proc fs: -------------------->8------------------------ $ cat /proc/device-tree/compatible snps,axs101snps,arc-sdp -------------------->8------------------------ You see there's no delimiter between "snps,axs101" and "snps,arc-sdp". So how should I extract "snps,arc-sdp" from /proc/device-tree/compatible? -Alexey _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
