8
#include <linux/unistd.h>
10
#include "sys/immunix.h"
12
#define SD_ID_MAGIC 0xdeadbeef
14
int main(int argc, char *argv[])
19
char *o_file = "/bin/ls";
22
hat_name = "/subprofile/foo";
23
hat_magic = SD_ID_MAGIC + 1;
27
printf("before entering change_hat\n");
28
error = change_hat(hat_name, hat_magic);
29
printf("change_hat(%s, 0x%x): %s\n", hat_name, hat_magic,
33
fd = open(o_file, O_RDONLY);
34
printf("open(%s): %s\n", o_file, strerror(errno));
39
printf("before leaving change_hat\n");
41
error = change_hat(hat_name, hat_magic);
42
printf("change_hat(%s, 0x%x): %s\n", "NULL", hat_magic,
46
fd = open(o_file, O_RDONLY);
47
printf("open(%s): %s\n", o_file, strerror(errno));