8282ef0 Use /proc/self/mountinfo for bind mount detection.

Authored and Committed by mitr 13 years ago
    Use /proc/self/mountinfo for bind mount detection.
    
    2011-03-31  Miloslav Trmač  <mitr@redhat.com>
    
    	* bind-mount.c: Use __linux for #ifdef.
    	(MOUNTINFO_PATH, OBSTACK_OBJECT_SIZE, struct mount, mount_entries)
    	(num_mount_entries, mount_data_obstack, mount_data_mark)
    	(mount_string_obstack, mount_string_mark, mount_list_obstack)
    	(mountinfo_line_obstack, init_mount_entries, read_mount_line)
    	(parse_mount_string, read_mount_entry, read_mount_entries): New
    	definitions, reading /proc/self/mountinfo.
    	(mountinfo_fd): New variable.
    	(last_path_mounted_mtime): Removed variable.
    	(cmp_ints, cmp_mount_entry_pointers, cmp_id_mount_entry): New functions.
    	(rebuild_bind_mount_paths, is_bind_mount, bind_mount_init): Use data
    	from /proc/self/mountinfo.
    
    	* bind-mount.c (bind_mount_init): Rename from init_bind_mount_paths ().
    	All users changed.
    	* bind-mount.h (bind_mount_init): Rename from init_bind_mount_paths ().
    
        
file modified
+19 -0
file modified
+309 -48
file modified
+6 -6
file modified
+1 -1