• Alexander Viro's avatar
    [PATCH] seq_path(), /proc/mounts and /proc/swaps · 32ccd2b6
    Alexander Viro authored
    This adds a new seq_...() helper:
    
       seq_path(seq_file, mnt, dentry, escape)
    
    It spits the pathname into seq_file, does octal escapes for given set of
    characters, returns the number of characters it'd produced or -1 in case
    of error.  Long names are handled gracefully - you don't need anything
    to do, generic seq_file logics will do the right thing.
    
    /proc/mounts and /proc/swaps are converted to use of seq_path(), some
    junk removed.
    
    /proc/pid/maps will be converted next.
    32ccd2b6
swapfile.c 38.3 KB