#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

main(int argc, char *argv[])
{
    int rv;
    u_long size;
    u_char buf[256]; 
    
    /* args check */
    if (argc != 3) {
	fprintf(stderr, "Usage: screate path size-in-decimal \n");
	exit (1);
    }
    size = atoi (argv[2]);
    sprintf (buf, "%s %x", argv[1], size);
    rv = creat (buf, 0); 
    printf ("creat (%s, %d) returns %d\n",
	    argv[1], size, rv);
    if (rv < 0) perror("creat");
    
    return 0; 
}
