mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
cmd_show_super: Print backing file as the loop device "model"
Signed-off-by: Nikita Ofitserov <himikof@gmail.com>
This commit is contained in:
parent
a4f2c56ed4
commit
0a1ad84c02
@ -637,6 +637,13 @@ char *fd_to_dev_model(int fd)
|
||||
goto got_model;
|
||||
free(model_path);
|
||||
|
||||
/* loop device? try loop/backing_file */
|
||||
|
||||
model_path = mprintf("%s/loop/backing_file", sysfs_path);
|
||||
if (!access(model_path, R_OK))
|
||||
goto got_model;
|
||||
free(model_path);
|
||||
|
||||
free(sysfs_path);
|
||||
return strdup("(unknown model)");
|
||||
got_model:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user