core.lua (8f3b36103b20049e207e64039ad3e99ffb5b51e2) | core.lua (94510c294d831a47ac24d691078d0221493ec68e) |
---|---|
1-- 2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3-- 4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org> 5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6-- All rights reserved. 7-- 8-- Redistribution and use in source and binary forms, with or without --- 305 unchanged lines hidden (view full) --- 314 local defname = "zfs:!" .. string.sub(core.bootenvDefault(), 5) 315 local bootenv_count = tonumber("bootenvs_check_count") 316 317 if bootenv_count == nil or bootenv_count <= 0 then 318 return defname 319 end 320 321 for curenv_idx = 0, bootenv_count - 1 do | 1-- 2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3-- 4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org> 5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6-- All rights reserved. 7-- 8-- Redistribution and use in source and binary forms, with or without --- 305 unchanged lines hidden (view full) --- 314 local defname = "zfs:!" .. string.sub(core.bootenvDefault(), 5) 315 local bootenv_count = tonumber("bootenvs_check_count") 316 317 if bootenv_count == nil or bootenv_count <= 0 then 318 return defname 319 end 320 321 for curenv_idx = 0, bootenv_count - 1 do |
322 curenv = loader.getenv("bootenvs_check[" .. curenv_idx .. "]") | 322 local curenv = loader.getenv("bootenvs_check[" .. curenv_idx .. "]") |
323 if curenv == defname then 324 return defname 325 end 326 end 327 328 return loader.getenv("bootenvs_check[0]") 329end 330 --- 160 unchanged lines hidden --- | 323 if curenv == defname then 324 return defname 325 end 326 end 327 328 return loader.getenv("bootenvs_check[0]") 329end 330 --- 160 unchanged lines hidden --- |