Skip to content

Commit f0dc9f7

Browse files
abbradarmartinpitt
authored andcommitted
Don't expect size to be non-zero for mocked /sys (#93)
This isn't true for tmpfs, which leads to hard to debug errors.
1 parent 5e51ab7 commit f0dc9f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/umockdev.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ public bool in_mock_environment()
17401740
if (!__in_mock_env_initialized) {
17411741
Posix.Stat st;
17421742
if (Posix.stat("/sys", out st) >= 0)
1743-
__in_mock_env_result = st.st_ino > 1 && st.st_size > 0;
1743+
__in_mock_env_result = st.st_ino > 1;
17441744
__in_mock_env_initialized = true;
17451745
}
17461746

0 commit comments

Comments
 (0)