mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
luci-app-diskman: sync with upstream source
This commit is contained in:
parent
48fe3ccd2e
commit
06a6e47d95
@ -412,8 +412,8 @@ d.list_devices = function()
|
||||
for i, bname in pairs(target_devnames) do
|
||||
local device_info = {}
|
||||
local device = "/dev/" .. bname
|
||||
local size = tonumber(fs.readfile(string.format("/sys/class/block/%s/size", bname)))
|
||||
local ss = tonumber(fs.readfile(string.format("/sys/class/block/%s/queue/logical_block_size", bname)))
|
||||
local size = tonumber(fs.readfile(string.format("/sys/class/block/%s/size", bname)) or "0")
|
||||
local ss = tonumber(fs.readfile(string.format("/sys/class/block/%s/queue/logical_block_size", bname)) or "0")
|
||||
local model = fs.readfile(string.format("/sys/class/block/%s/device/model", bname))
|
||||
local partitions = {}
|
||||
for part in nixio.fs.glob("/sys/block/" .. bname .."/" .. bname .. "*") do
|
||||
|
Loading…
x
Reference in New Issue
Block a user