Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - kcc-4/lib/test/tchmod.c
There are 5 other files named tchmod.c in the archive. Click here to see a list.
/*
 *	tchmod - test chmod()
 */

#include "stdio.h"
#include "errno.h"

main(argc, argv)
int argc;
char **argv;
{
    char *file;
    int result, mode;

    if (argc < 3) {
	printf("usage: %s file mode\n", argv[0]);
	exit(0);
    }
    file = argv[1];
    mode = atoi(argv[2]);
    result = chmod(file, mode);
    printf("chmod(\"%s\", 0%o) = %d\n", file, mode, result);
    if (!result) puts("succeeded");
    else perror("failed");
}