def _escape_fstab(v):
    """Escape invalid characters in fstab fields.

    space (040)
    ampersand (046)
    backslash (134)
    """
    if isinstance(v, int):
        return v
    else:
        return v.replace('\\', '\\134').replace(' ', '\\040').replace('&',
            '\\046')
