Home | History | Annotate | Download | only in src
      1 // Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include <fcntl.h>
      6 #include <stdlib.h>
      7 #include <unistd.h>
      8 #include <asm/unistd.h>
      9 
     10 #define SIZE 1024
     11 
     12 int main(int argc, char **argv) {
     13   char buf[SIZE];
     14   int fd = syscall(__NR_open, "/dev/zero", O_RDONLY);
     15   int n = syscall(__NR_read, fd, buf, SIZE);
     16   syscall(__NR_close, fd);
     17   syscall(__NR_exit, 0);
     18 }
     19