Logo  

CS471/571 - Operating Systems

Displaying exercises/e1/files/from.c

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

#define K	1024

/**
 * This program should open a file (file-name given on the command line,) and
 * output it to the standard output.  You may only use the kernel system calls
 * for I/O, you may not use any C standard library I/O calls. An error should be
 * displayed if the file cannot be opened and the program should return an
 * non-successful return value.
 * 
 * This program should do I/O in blocks of at least 1K at a time, it is not
 * correct to read and write only 1 byte at a time.
 */

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

  return 0;
}