def get_kernel_option(option):
    """Get a dictionary of args for the given kernel command line option"""
    args = {}
    try:
        cmdline = open('/proc/cmdline').read().split()
    except IOError:
        return args
    for cmd in cmdline:
        if '=' in cmd:
            optName, optArgs = cmd.split('=', 1)
        else:
            optName = cmd
            optArgs = ''
        if optName == option:
            for arg in optArgs.split(','):
                if ':' in arg:
                    k, v = arg.split(':', 1)
                    args[k] = v
                else:
                    args[arg] = ''
    return args
