#define _GNU_SOURCE
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>

#ifndef AT_FDCWD
#define AT_FDCWD -100
#endif

#if defined(__i386__)
#define __NR_revokeat	324
#else
#error unsupported arch
#endif

int revokeat(int dfd, const char *path)
{
	return syscall(__NR_revokeat, dfd, path);
}

int main(int argc, char *argv[])
{
	int err;

	err = revokeat(AT_FDCWD, argv[1]);
	if (err) {
		perror("revoke");
		return 1;
	}
	return 0;
}

