mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-09 00:00:17 +03:00
nul-terminate readlink() output
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
53e144e93b
commit
459060f763
@ -590,6 +590,8 @@ struct bchfs_handle bchu_fs_open_by_dev(const char *path, int *idx)
|
||||
if (len <= 0)
|
||||
goto read_super;
|
||||
|
||||
buf[len] = '\0';
|
||||
|
||||
fs_str = strstr(buf, "bcachefs/");
|
||||
if (!fs_str)
|
||||
die("error parsing sysfs");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user