# File lib/puppet/util/selinux.rb, line 186 186: def find_fs(path) 187: unless mnts = read_mounts 188: return nil 189: end 190: 191: # For a given file: 192: # Check if the filename is in the data structure; 193: # return the fstype if it is. 194: # Just in case: return something if you're down to "/" or "" 195: # Remove the last slash and everything after it, 196: # and repeat with that as the file for the next loop through. 197: path = realpath(path) 198: while not path.empty? 199: return mnts[path] if mnts.has_key?(path) 200: path = parent_directory(path) 201: end 202: mnts['/'] 203: end