1#!/usr/bin/env python
2import sys
3
4policy_size = 0
5
6sys.stdout.write("""
7/* This file is autogenerated by gen_policy.py */
8#include <xen/init.h>
9#include <xsm/xsm.h>
10
11const unsigned char xsm_init_policy[] __initconst = {
12""")
13
14for char in sys.stdin.read():
15    sys.stdout.write(" 0x%02x," % ord(char))
16    policy_size = policy_size + 1
17    if policy_size % 13 == 0:
18        sys.stdout.write("\n")
19
20sys.stdout.write("""
21};
22const unsigned int __initconst xsm_init_policy_size = %d;
23""" % policy_size)
24